summaryrefslogtreecommitdiffstats
path: root/drivers/sh/clk/cpg.c
Commit message (Collapse)AuthorAgeFilesLines
* sh: clkfwk: Consolidate div clk registration helper.Paul Mundt2012-05-251-107/+75
| | | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Consolidate div6/div4 clk_ops definitions.Paul Mundt2012-05-251-25/+17
| | | | | | | Everything with the exception of the _reparent ops are now shared, so switch everything over to common types. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Use shared sh_clk_div_enable/disable().Paul Mundt2012-05-251-43/+34
| | | | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Use shared sh_clk_div_set_rate()Paul Mundt2012-05-251-42/+28
| | | | | | Follows the sh_clk_div_recalc() change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Use shared sh_clk_div_recalc().Paul Mundt2012-05-251-36/+26
| | | | | | | This generalizes the div4 recalc routine for use by div6 and others, then makes it the default. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Introduce a div_mask for variable div types.Paul Mundt2012-05-251-5/+5
| | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Move to common clk_div_table accessors for div4/div6.Paul Mundt2012-05-251-11/+35
| | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Support variable size accesses for div4/div6 clocks.Paul Mundt2012-04-121-34/+37
| | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Support variable size accesses for MSTP clocks.Paul Mundt2012-04-111-11/+27
| | | | | | | | | 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 <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: convert cpg code to sh_clk_opsMagnus Damm2012-03-121-8/+8
| | | | | | | Convert the CPG code to use sh_clk_ops. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* sh: clkfwk: bugfix: use clk_reparent() for div6 clocksKuninori Morimoto2012-01-241-1/+1
| | | | | | | | Various problems will happen if clk parent was set up directly. it should use clk_reparent() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: sh_clk_init_parent() should be called after clk_register()Kuninori Morimoto2012-01-101-2/+2
| | | | | | | | sh_clk_init_parent() are using clk->mapped_reg which is mapped in clk_register() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use ioread32/iowrite32 and mapped_reg for div6Magnus Damm2011-12-091-10/+10
| | | | | | | | Convert the CPG DIV6 helper code to use the new mapped_reg together with ioread32() and iowrite32(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use ioread32/iowrite32 and mapped_reg for div4Magnus Damm2011-12-091-8/+8
| | | | | | | | Convert the CPG DIV4 helper code to use the new mapped_reg together with ioread32() and iowrite32(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: use ioread32/iowrite32 and mapped_reg for mstp32Magnus Damm2011-12-091-4/+4
| | | | | | | | Convert the CPG MSTP32 helper code to use the new mapped_reg together with ioread32() and iowrite32(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: setup clock parent from current register valueKuninori Morimoto2011-11-241-0/+35
| | | | | | | | | | | 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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: fixup clk_rate_table_build parameter in div6 clockKuninori Morimoto2011-04-181-1/+1
| | | | | | | | | | 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 <kuninori.morimoto.gx@renesas.com> Cc: stable@kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Build fix for non-legacy CPG changes.Paul Mundt2010-11-191-1/+1
| | | | | | | | | 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 <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Kill off now unused algo_id in set_rate op.Paul Mundt2010-11-151-3/+2
| | | | | | | | 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 <lethal@linux-sh.org>
* sh: clkfwk: Shuffle around to match the intc split up.Paul Mundt2010-10-181-0/+359
This shuffles the clock framework code around to a drivers/sh/clk subdir, to follow the intc split up. This will make it easier to subsequently break things out as well as plug in different helpers for non-CPG users. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud