aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 17a73ad7a20d..0b165f6ae08c 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -168,7 +168,12 @@ static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
168 u32 value; 168 u32 value;
169 int ret; 169 int ret;
170 170
171 if (!strcmp("pll_clk", parent->name)) 171 /* we really need a better way to determine parent index, but for
172 * now assume internal parent comes with CLK_ENABLE_ON_INIT set,
173 * no CLK_ENABLE_ON_INIT means external clock...
174 */
175
176 if (parent->flags & CLK_ENABLE_ON_INIT)
172 value = __raw_readl(clk->enable_reg) & ~(1 << 7); 177 value = __raw_readl(clk->enable_reg) & ~(1 << 7);
173 else 178 else
174 value = __raw_readl(clk->enable_reg) | (1 << 7); 179 value = __raw_readl(clk->enable_reg) | (1 << 7);