Skip to contentSkip to conversation

s3c6410: use correct divider_shift in setrate_clksrc()

PATCH New thomas.ab at samsung.com 2 participants 2 messages Sep 8, 2009 – Sep 15, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 s3c6410: use correct divider_shift in setrate_clksrc()

From: Thomas Abraham <[email protected]>

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.

---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-s3c64xx/s3c6400-clock.c +2 -2
index febac19..c972d2f 100644
@@ -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;
Signature · 1 line
1.5.3.4
Applied
#1 lore raw

PATCH 1/4 s3c6410: use correct divider_shift in setrate_clksrc()

Quoted 5 lines · On Tue, Sep 08, 2009 at 02:26:00PM +0900, [email protected] wrote:

From: Thomas Abraham <[email protected]>

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.

applied to next-s3c64xx-fixes.

Quoted 28 lines
---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-s3c64xx/s3c6400-clock.c +2 -2
index febac19..c972d2f 100644
@@ -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;
Signature · 7 lines
1.5.3.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 5 lines
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.