aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7780.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7780.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
index 4c11f8917e40..0a22d50b109f 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
@@ -99,28 +99,17 @@ static struct clk *sh7780_onchip_clocks[] = {
99static int __init sh7780_clk_init(void) 99static int __init sh7780_clk_init(void)
100{ 100{
101 struct clk *clk = clk_get(NULL, "master_clk"); 101 struct clk *clk = clk_get(NULL, "master_clk");
102 int i; 102 int i, ret = 0;
103 103
104 for (i = 0; i < ARRAY_SIZE(sh7780_onchip_clocks); i++) { 104 for (i = 0; i < ARRAY_SIZE(sh7780_onchip_clocks); i++) {
105 struct clk *clkp = sh7780_onchip_clocks[i]; 105 struct clk *clkp = sh7780_onchip_clocks[i];
106 106
107 clkp->parent = clk; 107 clkp->parent = clk;
108 clk_register(clkp); 108 ret |= clk_register(clkp);
109 clk_enable(clkp);
110 } 109 }
111 110
112 /*
113 * Now that we have the rest of the clocks registered, we need to
114 * force the parent clock to propagate so that these clocks will
115 * automatically figure out their rate. We cheat by handing the
116 * parent clock its current rate and forcing child propagation.
117 */
118 clk_set_rate(clk, clk_get_rate(clk));
119
120 clk_put(clk); 111 clk_put(clk);
121 112
122 return 0; 113 return ret;
123} 114}
124
125arch_initcall(sh7780_clk_init); 115arch_initcall(sh7780_clk_init);
126