summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/clock-shx3.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-12 05:59:27 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-05-12 05:59:27 +0900
commitf5c84cf50812c80133e64683d0500b2416d55cb3 (patch)
treeeb116c797a5b56d96deeca62f5122d0de197f601 /arch/sh/kernel/cpu/sh4a/clock-shx3.c
parentaa87aa343f2cd236b5eccd643abd4df918ed5c4f (diff)
downloadblackbird-op-linux-f5c84cf50812c80133e64683d0500b2416d55cb3.tar.gz
blackbird-op-linux-f5c84cf50812c80133e64683d0500b2416d55cb3.zip
sh: clkfwk: Tidy up on-chip clock registration and rate propagation.
This tidies up the set_rate hack that the on-chip clocks were abusing to trigger rate propagation, which is now handled generically. Additionally, now that CLK_ENABLE_ON_INIT is wired up where it needs to be for these clocks, the clk_enable() can go away. In some cases this was bumping up the refcount higher than it should have been. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-shx3.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-shx3.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
index 6e5c864cf40f..1eb149b0fe6e 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
@@ -110,26 +110,17 @@ static struct clk *shx3_onchip_clocks[] = {
static int __init shx3_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
- int i;
+ int i, ret = 0;
for (i = 0; i < ARRAY_SIZE(shx3_onchip_clocks); i++) {
struct clk *clkp = shx3_onchip_clocks[i];
clkp->parent = clk;
- clk_register(clkp);
- clk_enable(clkp);
+ ret |= clk_register(clkp);
}
- /*
- * Now that we have the rest of the clocks registered, we need to
- * force the parent clock to propagate so that these clocks will
- * automatically figure out their rate. We cheat by handing the
- * parent clock its current rate and forcing child propagation.
- */
- clk_set_rate(clk, clk_get_rate(clk));
-
clk_put(clk);
- return 0;
+ return ret;
}
arch_initcall(shx3_clk_init);
OpenPOWER on IntegriCloud