Skip to content

Commit

Permalink
ARM: S3C6410: use correct divider_shift in setrate_clksrc()
Browse files Browse the repository at this point in the history
In s3c64xx_setrate_clksrc() we used sclk->shift, but actually need to
use sclk->divider_shift to correctly calculate the value for the divider
register.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
[ben-linux@fluff.org: Minor re-indentation of description]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Thomas Abraham authored and Ben Dooks committed Sep 15, 2009
1 parent baa28e3 commit 9adb15b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-s3c64xx/s3c6400-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate)
return -EINVAL;

val = __raw_readl(reg);
val &= ~(0xf << sclk->shift);
val |= (div - 1) << sclk->shift;
val &= ~(0xf << sclk->divider_shift);
val |= (div - 1) << sclk->divider_shift;
__raw_writel(val, reg);

return 0;
Expand Down

0 comments on commit 9adb15b

Please sign in to comment.