All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate
@ 2008-09-25 14:38 Paul Walmsley
  2008-09-26  8:17 ` Tero.Kristo
  2008-10-03 13:45 ` Tony Lindgren
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Walmsley @ 2008-09-25 14:38 UTC (permalink / raw)
  To: linux-omap; +Cc: tero.kristo, rnayak


When a non-CORE DPLL is enabled via omap3_noncore_dpll_enable(), use
the user's desired rate in clk->rate to determine whether to put the
DPLL into bypass or lock mode, rather than reading the DPLL's current
idle state from its hardware registers.

This fixes a bug observed when leaving retention. Non-CORE DPLLs were
not being relocked when downstream clocks re-enabled; rather, the DPLL
entered bypass mode.

Problem reported by Tero Kristo <tero.kristo@nokia.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/clock34xx.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index c89d6bc..df258f7 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -281,9 +281,7 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
 	if (!dd)
 		return -EINVAL;
 
-	rate = omap2_get_dpll_rate(clk);
-
-	if (dd->bypass_clk->rate == rate)
+	if (clk->rate == dd->bypass_clk->rate)
 		r = _omap3_noncore_dpll_bypass(clk);
 	else
 		r = _omap3_noncore_dpll_lock(clk);

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

* RE: [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate
  2008-09-25 14:38 [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate Paul Walmsley
@ 2008-09-26  8:17 ` Tero.Kristo
  2008-10-03 13:45 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Tero.Kristo @ 2008-09-26  8:17 UTC (permalink / raw)
  To: paul, linux-omap; +Cc: rnayak

Hi,

The three patches you sent (fix CONFIG_OMAP_RESET_CLOCKS, fix
dss1_alwon_clk and this one) seem to fix problems I was seeing with
retention.

-Tero

>-----Original Message-----
>From: ext Paul Walmsley [mailto:paul@pwsan.com] 
>Sent: 25 September, 2008 17:39
>To: linux-omap@vger.kernel.org
>Cc: Kristo Tero (Nokia-D/Tampere); rnayak@ti.com
>Subject: [PATCH] OMAP3 clock: put DPLL into bypass if bypass 
>rate = clk->rate, not hardware rate
>
>
>When a non-CORE DPLL is enabled via 
>omap3_noncore_dpll_enable(), use the user's desired rate in 
>clk->rate to determine whether to put the DPLL into bypass or 
>lock mode, rather than reading the DPLL's current idle state 
>from its hardware registers.
>
>This fixes a bug observed when leaving retention. Non-CORE 
>DPLLs were not being relocked when downstream clocks 
>re-enabled; rather, the DPLL entered bypass mode.
>
>Problem reported by Tero Kristo <tero.kristo@nokia.com>.
>
>Signed-off-by: Paul Walmsley <paul@pwsan.com>
>---
> arch/arm/mach-omap2/clock34xx.c |    4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
>diff --git a/arch/arm/mach-omap2/clock34xx.c 
>b/arch/arm/mach-omap2/clock34xx.c index c89d6bc..df258f7 100644
>--- a/arch/arm/mach-omap2/clock34xx.c
>+++ b/arch/arm/mach-omap2/clock34xx.c
>@@ -281,9 +281,7 @@ static int 
>omap3_noncore_dpll_enable(struct clk *clk)
> 	if (!dd)
> 		return -EINVAL;
> 
>-	rate = omap2_get_dpll_rate(clk);
>-
>-	if (dd->bypass_clk->rate == rate)
>+	if (clk->rate == dd->bypass_clk->rate)
> 		r = _omap3_noncore_dpll_bypass(clk);
> 	else
> 		r = _omap3_noncore_dpll_lock(clk);
>

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

* Re: [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate
  2008-09-25 14:38 [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate Paul Walmsley
  2008-09-26  8:17 ` Tero.Kristo
@ 2008-10-03 13:45 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2008-10-03 13:45 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap, tero.kristo, rnayak

* Paul Walmsley <paul@pwsan.com> [080925 17:40]:
> 
> When a non-CORE DPLL is enabled via omap3_noncore_dpll_enable(), use
> the user's desired rate in clk->rate to determine whether to put the
> DPLL into bypass or lock mode, rather than reading the DPLL's current
> idle state from its hardware registers.
> 
> This fixes a bug observed when leaving retention. Non-CORE DPLLs were
> not being relocked when downstream clocks re-enabled; rather, the DPLL
> entered bypass mode.
> 
> Problem reported by Tero Kristo <tero.kristo@nokia.com>.

Pushing.

Tony

> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
>  arch/arm/mach-omap2/clock34xx.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
> index c89d6bc..df258f7 100644
> --- a/arch/arm/mach-omap2/clock34xx.c
> +++ b/arch/arm/mach-omap2/clock34xx.c
> @@ -281,9 +281,7 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
>  	if (!dd)
>  		return -EINVAL;
>  
> -	rate = omap2_get_dpll_rate(clk);
> -
> -	if (dd->bypass_clk->rate == rate)
> +	if (clk->rate == dd->bypass_clk->rate)
>  		r = _omap3_noncore_dpll_bypass(clk);
>  	else
>  		r = _omap3_noncore_dpll_lock(clk);
> --
> 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] 3+ messages in thread

end of thread, other threads:[~2008-10-03 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 14:38 [PATCH] OMAP3 clock: put DPLL into bypass if bypass rate = clk->rate, not hardware rate Paul Walmsley
2008-09-26  8:17 ` Tero.Kristo
2008-10-03 13:45 ` Tony Lindgren

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.