diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7786.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7786.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c index 2825494f85dc..825556fe2306 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c | |||
@@ -123,26 +123,17 @@ static struct clk *sh7786_onchip_clocks[] = { | |||
123 | static int __init sh7786_clk_init(void) | 123 | static int __init sh7786_clk_init(void) |
124 | { | 124 | { |
125 | struct clk *clk = clk_get(NULL, "master_clk"); | 125 | struct clk *clk = clk_get(NULL, "master_clk"); |
126 | int i; | 126 | int i, ret = 0; |
127 | 127 | ||
128 | for (i = 0; i < ARRAY_SIZE(sh7786_onchip_clocks); i++) { | 128 | for (i = 0; i < ARRAY_SIZE(sh7786_onchip_clocks); i++) { |
129 | struct clk *clkp = sh7786_onchip_clocks[i]; | 129 | struct clk *clkp = sh7786_onchip_clocks[i]; |
130 | 130 | ||
131 | clkp->parent = clk; | 131 | clkp->parent = clk; |
132 | clk_register(clkp); | 132 | ret |= clk_register(clkp); |
133 | clk_enable(clkp); | ||
134 | } | 133 | } |
135 | 134 | ||
136 | /* | ||
137 | * Now that we have the rest of the clocks registered, we need to | ||
138 | * force the parent clock to propagate so that these clocks will | ||
139 | * automatically figure out their rate. We cheat by handing the | ||
140 | * parent clock its current rate and forcing child propagation. | ||
141 | */ | ||
142 | clk_set_rate(clk, clk_get_rate(clk)); | ||
143 | |||
144 | clk_put(clk); | 135 | clk_put(clk); |
145 | 136 | ||
146 | return 0; | 137 | return ret; |
147 | } | 138 | } |
148 | arch_initcall(sh7786_clk_init); | 139 | arch_initcall(sh7786_clk_init); |