All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] s3c6410: use correct divider_shift in setrate_clksrc()
@ 2009-09-08  5:26 ` thomas.ab at samsung.com
  0 siblings, 0 replies; 4+ messages in thread
From: thomas.ab @ 2009-09-08  5:26 UTC (permalink / raw)
  To: ben-linux; +Cc: linux-arm-kernel, linux-mmc, Thomas Abraham

From: Thomas Abraham <thomas.ab@samsung.com>

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>
---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index febac19..c972d2f 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -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;
-- 
1.5.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/4] s3c6410: use correct divider_shift in setrate_clksrc()
@ 2009-09-08  5:26 ` thomas.ab at samsung.com
  0 siblings, 0 replies; 4+ messages in thread
From: thomas.ab at samsung.com @ 2009-09-08  5:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thomas Abraham <thomas.ab@samsung.com>

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>
---
 arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index febac19..c972d2f 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -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;
-- 
1.5.3.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/4] s3c6410: use correct divider_shift in setrate_clksrc()
  2009-09-08  5:26 ` thomas.ab at samsung.com
@ 2009-09-15 23:57   ` Ben Dooks
  -1 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2009-09-15 23:57 UTC (permalink / raw)
  To: thomas.ab; +Cc: ben-linux, linux-mmc, linux-arm-kernel

On Tue, Sep 08, 2009 at 02:26:00PM +0900, thomas.ab@samsung.com wrote:
> From: Thomas Abraham <thomas.ab@samsung.com>
> 
> 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.
 
> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> ---
>  arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> index febac19..c972d2f 100644
> --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
> +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> @@ -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;
> -- 
> 1.5.3.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/4] s3c6410: use correct divider_shift in setrate_clksrc()
@ 2009-09-15 23:57   ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2009-09-15 23:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Sep 08, 2009 at 02:26:00PM +0900, thomas.ab at samsung.com wrote:
> From: Thomas Abraham <thomas.ab@samsung.com>
> 
> 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.
 
> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> ---
>  arch/arm/plat-s3c64xx/s3c6400-clock.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> index febac19..c972d2f 100644
> --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
> +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> @@ -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;
> -- 
> 1.5.3.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-15 23:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-08  5:26 [PATCH 1/4] s3c6410: use correct divider_shift in setrate_clksrc() thomas.ab
2009-09-08  5:26 ` thomas.ab at samsung.com
2009-09-15 23:57 ` Ben Dooks
2009-09-15 23:57   ` Ben Dooks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.