24 Nov, 2015
2 commits
-
Several clock API functions handle NULL clocks when the Common Clock
Framework is used, while their legacy SH counterparts don't, and would
just crash when a NULL clock is passed.Add NULL checks to clk_get_rate(), clk_set_rate(), clk_get_parent(), and
clk_round_rate(), to avoid different behavior in drivers shared between
legacy and CCF-based platforms.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Simon Horman -
clk_round_parent() was only ever used by AP4EVB, until commit
b24bd7e97b3784af ("ARM: shmobile: Remove AP4EVB board support").The Common Clock Framework does not provide clk_round_parent(), hence
remove it.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Simon Horman
30 Apr, 2014
1 commit
-
The cpufreq core now supports the cpufreq_for_each_valid_entry macro
helper for iteration over the cpufreq_frequency_table, so use it.It should have no functional changes.
Signed-off-by: Stratos Karafotis
Acked-by: Viresh Kumar
Signed-off-by: Rafael J. Wysocki
04 Feb, 2014
1 commit
-
On r-/sh-mobile SoCs MSTP clocks are used by the runtime PM to dynamically
enable and disable peripheral clocks. To make sure the clock has really
started we have to read back its status register until it confirms success.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Simon Horman
04 Jun, 2013
1 commit
-
The "index" field of struct cpufreq_frequency_table was never an
index and isn't used at all by the cpufreq core. It only is useful
for cpufreq drivers for their internal purposes.Many people nowadays blindly set it in ascending order with the
assumption that the core will use it, which is a mistake.Rename it to "driver_data" as that's what its purpose is. All of its
users are updated accordingly.[rjw: Changelog]
Signed-off-by: Viresh Kumar
Acked-by: Simon Horman
Signed-off-by: Rafael J. Wysocki
11 Jan, 2013
1 commit
-
764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
(sh: clkfwk: Use shared sh_clk_div_enable/disable())
shared enable/disable funcions for div4/div6.
But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
which is required on div6 clock.
This patch fixes it.Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt
13 Nov, 2012
1 commit
-
This patch solves above warning
${LINUX}/drivers/sh/clk/cpg.c:404:6: warning: \
unused variable 'val' [-Wunused-variable]Signed-off-by: Kuninori Morimoto
Signed-off-by: Simon Horman
08 Nov, 2012
1 commit
-
This patch adds sh_clk_fsidiv_register() to share FSI-DIV clock code
Signed-off-by: Kuninori Morimoto
Acked-by: Paul Mundt
Signed-off-by: Simon Horman
25 May, 2012
7 commits
-
This consolidates the div6/4 versions of the clk registration wrapper.
The existing wrappers with their own sh_clk_ops are maintained for API
compatability, though in the future it should be possible to be rid of
them entirely.Signed-off-by: Paul Mundt
-
Everything with the exception of the _reparent ops are now shared, so
switch everything over to common types.Signed-off-by: Paul Mundt
-
This introduces a new flag for clocks that need to have their divisor
ratio set back to their initial mask at disable time to prevent
interactivity problems with the clock stop bit (presently div6 only).
With this in place it's possible to handle the corner case on top of the
div4 op without any particular need for leaving things split out.Signed-off-by: Paul Mundt
-
Follows the sh_clk_div_recalc() change.
Signed-off-by: Paul Mundt
-
This generalizes the div4 recalc routine for use by div6 and others, then
makes it the default.Signed-off-by: Paul Mundt
-
This plugs in a div_mask for the clock and sets it up for the existing
div6/4 cases. This will make it possible to support other div types, as
well as share more div6/4 infrastructure.Signed-off-by: Paul Mundt
-
This plugs in a generic clk_div_table, based on the div4 version. div6 is
then adopted to use it for encapsulating its div table, which permits us
to start div6/4 unification, as well as preparation for other div types.Signed-off-by: Paul Mundt
12 Apr, 2012
1 commit
-
This follows the MSTP clock change and implements variable access size
support for the rest of the CPG clocks, too. Upcoming SH-2A support has
need of this for 16-bit div4 clocks, while others will follow.Signed-off-by: Paul Mundt
11 Apr, 2012
1 commit
-
The bulk of the MSTP users require 32-bit access, but this isn't the case
for some of the SH-2A parts, so add in some basic infrastructure to let
the CPU define its required access size in preparation.Requested-by: Phil Edworthy
Signed-off-by: Paul Mundt
13 Mar, 2012
1 commit
-
Convert the CPG code to use sh_clk_ops.
Signed-off-by: Magnus Damm
Signed-off-by: Rafael J. Wysocki
24 Jan, 2012
1 commit
-
Various problems will happen if clk parent was set up directly.
it should use clk_reparent()Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt
10 Jan, 2012
1 commit
-
sh_clk_init_parent() are using clk->mapped_reg
which is mapped in clk_register()Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt
09 Dec, 2011
4 commits
-
Convert the CPG DIV6 helper code to use the new mapped_reg
together with ioread32() and iowrite32().Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Convert the CPG DIV4 helper code to use the new mapped_reg
together with ioread32() and iowrite32().Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Convert the CPG MSTP32 helper code to use the new mapped_reg
together with ioread32() and iowrite32().Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt -
Add a "mapped_reg" member to struct clk and use that
to keep the ioremapped register based on enable_reg.Signed-off-by: Magnus Damm
Signed-off-by: Paul Mundt
24 Nov, 2011
1 commit
-
Some clocks can select its parent clock by CPG register.
But it might have been modified by boot-loader or something.
This patch removed fixed initial parent clock,
and setup it from their current register settings.
It works on div6 reparent clocks for now.Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt
11 Nov, 2011
1 commit
-
Now that all of the named string association with clocks has been
migrated to clkdev lookups there's no meaningful named topology that can
be constructed for a debugfs tree view. Get rid of the left over bits,
and shrink struct clk a bit in the process.Signed-off-by: Paul Mundt
04 Nov, 2011
1 commit
-
This provides a clk_rate_mult_range_round() helper for use by some of the
CPG PLL ranged multipliers, following the same approach as used by the
div ranges.Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt
02 Aug, 2011
1 commit
-
* 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x: (39 commits)
SH: static should be at beginning of declaration
sh: move CLKDEV_xxx_ID macro to sh_clk.h
sh: clock-shx3: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7786: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7785: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7757: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7366: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7343: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7722: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7724: add CLKDEV_ICK_ID for cleanup
sh: clock-sh7366: modify I2C clock settings
sh: clock-sh7343: modify I2C clock settings
sh: clock-sh7723: modify I2C clock settings
sh: clock-sh7722: modify I2C clock settings
sh: clock-sh7724: modify I2C clock settings
serial: sh-sci: Fix up pretty name printing for port IRQs.
serial: sh-sci: Kill off per-port enable/disable callbacks.
serial: sh-sci: Add missing module description/author bits.
serial: sh-sci: Regtype probing doesn't need to be fatal.
sh: Tidy up pre-clkdev clk_get() error handling.
...
21 Jul, 2011
1 commit
-
Signed-off-by: Al Viro
24 Jun, 2011
2 commits
-
Trivial cleanup.
Signed-off-by: Paul Mundt
-
This V2 patch changes the clock disabling behavior during boot.
Two different changes are made:1) Delay disabling of clocks until late in the boot process.
This fixes an existing issue where in-use clocks without
software reference are disabled by mistake during boot.
One example of this is the handling of the Mackerel serial
console output that shares clock with the I2C controller.2) Write out the "disabled" state to the hardware for clocks
that not have been used by the kernel. In other words,
make sure so far unused clocks actually get turned off.Signed-off-by: Magnus Damm
Acked-by: Simon Horman
Signed-off-by: Paul Mundt
14 Jun, 2011
1 commit
-
Extend the SH / SH-Mobile ARM clock framework to only
resume clocks that have been enabled.Without this fix divide-by-zero is triggering on sh7372
FSIDIV during system wide resume of Suspend-to-RAM.Signed-off-by: Magnus Damm
Reviewed-by: Simon Horman
Signed-off-by: Paul Mundt
18 Apr, 2011
1 commit
-
div6 clock should not use arch_flags for clk_rate_table_build,
because SH_CLK_DIV6_EXT doesn't care .arch_flags.
clk->freq_table[] will be all CPUFREQ_ENTRY_INVALID without this patch.Signed-off-by: Kuninori Morimoto
Cc: stable@kernel.org
Signed-off-by: Paul Mundt
23 Mar, 2011
1 commit
-
Convert the SuperH clocks framework and shared interrupt handling
code to using struct syscore_ops instead of a sysdev classes and
sysdevs for power managment.This reduces the code size significantly and simplifies it. The
optimizations causing things not to be restored after creating a
hibernation image are removed, but they might lead to undesirable
effects during resume from hibernation (e.g. the clocks would be left
as the boot kernel set them, which might be not the same way as the
hibernated kernel had seen them before the hibernation).This also is necessary for removing sysdevs from the kernel entirely
in the future.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Paul Mundt
11 Jan, 2011
1 commit
-
Remove kobject.h from files which don't need it, notably,
sched.h and fs.h.Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
19 Nov, 2010
1 commit
-
The disabling of the init op for non-legacy clocks neglected to do the
same in the core clock framework, resulting in a build failure. Fix it
up.Reported-by: Guennadi Liakhovetski
Signed-off-by: Paul Mundt
15 Nov, 2010
2 commits
-
Now that clk_set_rate_ex() is gone, there is also no way to get at rate
setting algo id, which is now also completely unused. Kill it off before
new clock ops start using it.Signed-off-by: Paul Mundt
-
With the refactoring of the SH7722 clock framework some time ago this
abstraction has become unecessary. Kill it off before anyone else gets
the bright idea to start using it.Signed-off-by: Paul Mundt
10 Nov, 2010
1 commit
-
CC drivers/sh/clk/core.o
drivers/sh/clk/core.c: In function 'clk_round_parent':
drivers/sh/clk/core.c:574: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
drivers/sh/clk/core.c:594: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'Signed-off-by: Paul Mundt
08 Nov, 2010
1 commit
-
The clk_round_parent() change introduced various checkpatch warnings,
tidy them up.Signed-off-by: Paul Mundt