linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/05] OMAP3: SR: Use sysclk for SR CLKLENGTH calc
@ 2009-03-18  9:55 Nayak, Rajendra
  2009-03-18 15:57 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Nayak, Rajendra @ 2009-03-18  9:55 UTC (permalink / raw)
  To: linux-omap; +Cc: Nayak, Rajendra

From: Rajendra Nayak <rnayak@ti.com>

This patch uses the sysclk to set the SR CLKLENGTH instead
of the OSC clock speed used earlier.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
---
 arch/arm/mach-omap2/smartreflex.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Index: linux-omap-2.6/arch/arm/mach-omap2/smartreflex.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/smartreflex.c	2009-03-18 13:56:25.610250244 +0530
+++ linux-omap-2.6/arch/arm/mach-omap2/smartreflex.c	2009-03-18 13:56:26.106235150 +0530
@@ -146,14 +146,14 @@ static u32 cal_test_nvalue(u32 sennval, 
 
 static void sr_set_clk_length(struct omap_sr *sr)
 {
-	struct clk *osc_sys_ck;
-	u32 sys_clk = 0;
+	struct clk *sys_ck;
+	u32 sys_clk_speed = 0;
 
-	osc_sys_ck = clk_get(NULL, "osc_sys_ck");
-	sys_clk = clk_get_rate(osc_sys_ck);
-	clk_put(osc_sys_ck);
+	sys_ck = clk_get(NULL, "sys_ck");
+	sys_clk_speed = clk_get_rate(sys_ck);
+	clk_put(sys_ck);
 
-	switch (sys_clk) {
+	switch (sys_clk_speed) {
 	case 12000000:
 		sr->clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
 		break;
@@ -170,7 +170,7 @@ static void sr_set_clk_length(struct oma
 		sr->clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
 		break;
 	default :
-		printk(KERN_ERR "Invalid sysclk value: %d\n", sys_clk);
+		printk(KERN_ERR "Invalid sysclk value: %d\n", sys_clk_speed);
 		break;
 	}
 }

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

* Re: [PATCH 03/05] OMAP3: SR: Use sysclk for SR CLKLENGTH calc
  2009-03-18  9:55 [PATCH 03/05] OMAP3: SR: Use sysclk for SR CLKLENGTH calc Nayak, Rajendra
@ 2009-03-18 15:57 ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2009-03-18 15:57 UTC (permalink / raw)
  To: Nayak, Rajendra; +Cc: linux-omap

"Nayak, Rajendra" <rnayak@ti.com> writes:

> From: Rajendra Nayak <rnayak@ti.com>
>
> This patch uses the sysclk to set the SR CLKLENGTH instead
> of the OSC clock speed used earlier.
>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
> ---
>  arch/arm/mach-omap2/smartreflex.c |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
>
> Index: linux-omap-2.6/arch/arm/mach-omap2/smartreflex.c
> ===================================================================
> --- linux-omap-2.6.orig/arch/arm/mach-omap2/smartreflex.c	2009-03-18 13:56:25.610250244 +0530
> +++ linux-omap-2.6/arch/arm/mach-omap2/smartreflex.c	2009-03-18 13:56:26.106235150 +0530
> @@ -146,14 +146,14 @@ static u32 cal_test_nvalue(u32 sennval, 
>  
>  static void sr_set_clk_length(struct omap_sr *sr)
>  {
> -	struct clk *osc_sys_ck;
> -	u32 sys_clk = 0;
> +	struct clk *sys_ck;
> +	u32 sys_clk_speed = 0;

Don't need to init this to zero as it is always assigned below.

> -	osc_sys_ck = clk_get(NULL, "osc_sys_ck");
> -	sys_clk = clk_get_rate(osc_sys_ck);
> -	clk_put(osc_sys_ck);
> +	sys_ck = clk_get(NULL, "sys_ck");
> +	sys_clk_speed = clk_get_rate(sys_ck);
> +	clk_put(sys_ck);
>  
> -	switch (sys_clk) {
> +	switch (sys_clk_speed) {
>  	case 12000000:
>  		sr->clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
>  		break;
> @@ -170,7 +170,7 @@ static void sr_set_clk_length(struct oma
>  		sr->clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
>  		break;
>  	default :
> -		printk(KERN_ERR "Invalid sysclk value: %d\n", sys_clk);
> +		printk(KERN_ERR "Invalid sysclk value: %d\n", sys_clk_speed);
>  		break;
>  	}
>  }--
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18  9:55 [PATCH 03/05] OMAP3: SR: Use sysclk for SR CLKLENGTH calc Nayak, Rajendra
2009-03-18 15:57 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).