aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-02-19 04:12:00 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-22 05:11:19 -0500
commitde7ca2144c36291a491bd39afad172f56432a4bb (patch)
tree1a86bde64f584151b4213e8b70bcbe3ac4bfbfc4 /arch/sh
parent8c563a30cdfff2833c4c2078d25b5d1469706a6d (diff)
sh: clock-cpg div4 set_rate() shift fix
Make sure the div4 bitfield is shifted according to the enable_bit value in sh_clk_div4_set_rate(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 2827abb5d2ab..72a5e621a9bb 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -192,8 +192,8 @@ static int sh_clk_div4_set_rate(struct clk *clk, unsigned long rate, int algo_id
192 return idx; 192 return idx;
193 193
194 value = __raw_readl(clk->enable_reg); 194 value = __raw_readl(clk->enable_reg);
195 value &= ~0xf; 195 value &= ~(0xf << clk->enable_bit);
196 value |= idx; 196 value |= (idx << clk->enable_bit);
197 __raw_writel(value, clk->enable_reg); 197 __raw_writel(value, clk->enable_reg);
198 198
199 return 0; 199 return 0;