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