All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3: Lock DPLL5 at boot
@ 2009-09-08 13:54 Anand Gadiyar
  2009-09-09 15:43 ` Paul Walmsley
  2009-09-30 18:43 ` [APPLIED] " Tony Lindgren
  0 siblings, 2 replies; 10+ messages in thread
From: Anand Gadiyar @ 2009-09-08 13:54 UTC (permalink / raw)
  To: linux-omap; +Cc: Rajendra Nayak, Anand Gadiyar

From: Rajendra Nayak <rnayak@ti.com>

OMAP3: Lock DPLL5 at boot

Lock DPLL5 at 120MHz at boot. The USBHOST 120MHz f-clock and
USBTLL f-clock are the only users of this DPLL, and 120MHz is
is the only recommended rate for these clocks.

With this patch, the 60 MHz ULPI clock is generated correctly.

Tested on an OMAP3430 SDP.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
Incorporated all 3 comments by Paul and Benoit. Updated
$SUBJECT to reflect the change.

 arch/arm/mach-omap2/clock34xx.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+)

Index: linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/clock34xx.c
+++ linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c
@@ -338,6 +338,13 @@ static struct omap_clk omap34xx_clks[] =
  */
 #define SDRC_MPURATE_LOOPS		96
 
+/*
+ * DPLL5_FREQ_FOR_USBHOST: USBHOST and USBTLL are the only clocks
+ * that are sourced by DPLL5, and both of these require this clock
+ * to be at 120 MHz for proper operation.
+ */
+#define DPLL5_FREQ_FOR_USBHOST		120000000
+
 /**
  * omap3430es2_clk_ssi_find_idlest - return CM_IDLEST info for SSI
  * @clk: struct clk * being enabled
@@ -1056,6 +1063,28 @@ void omap2_clk_prepare_for_reboot(void)
 #endif
 }
 
+static void omap3_clk_lock_dpll5(void)
+{
+	struct clk *dpll5_clk;
+	struct clk *dpll5_m2_clk;
+
+	dpll5_clk = clk_get(NULL, "dpll5_ck");
+	clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST);
+	clk_enable(dpll5_clk);
+
+	/* Enable autoidle to allow it to enter low power bypass */
+	omap3_dpll_allow_idle(dpll5_clk);
+
+	/* Program dpll5_m2_clk divider for no division */
+	dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck");
+	clk_enable(dpll5_m2_clk);
+	clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST);
+
+	clk_disable(dpll5_m2_clk);
+	clk_disable(dpll5_clk);
+	return;
+}
+
 /* REVISIT: Move this init stuff out into clock.c */
 
 /*
@@ -1148,6 +1177,12 @@ int __init omap2_clk_init(void)
 	 */
 	clk_enable_init_clocks();
 
+	/*
+	 * Lock DPLL5 and put it in autoidle.
+	 */
+	if (omap_rev() >= OMAP3430_REV_ES2_0)
+		omap3_clk_lock_dpll5();
+
 	/* Avoid sleeping during omap2_clk_prepare_for_reboot() */
 	/* REVISIT: not yet ready for 343x */
 #if 0

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

* Re: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-08 13:54 [PATCH] OMAP3: Lock DPLL5 at boot Anand Gadiyar
@ 2009-09-09 15:43 ` Paul Walmsley
  2009-09-09 16:22   ` Pandita, Vikram
  2009-09-30 18:43 ` [APPLIED] " Tony Lindgren
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2009-09-09 15:43 UTC (permalink / raw)
  To: Anand Gadiyar; +Cc: linux-omap, Rajendra Nayak, b-cousson

On Tue, 8 Sep 2009, Anand Gadiyar wrote:

> From: Rajendra Nayak <rnayak@ti.com>
> 
> OMAP3: Lock DPLL5 at boot
> 
> Lock DPLL5 at 120MHz at boot. The USBHOST 120MHz f-clock and
> USBTLL f-clock are the only users of this DPLL, and 120MHz is
> is the only recommended rate for these clocks.
> 
> With this patch, the 60 MHz ULPI clock is generated correctly.
> 
> Tested on an OMAP3430 SDP.
> 
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> ---
> Incorporated all 3 comments by Paul and Benoit. Updated
> $SUBJECT to reflect the change.

Thanks for the changes, I will queue this in a for-next branch for .33.


- Paul

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

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 15:43 ` Paul Walmsley
@ 2009-09-09 16:22   ` Pandita, Vikram
  2009-09-09 16:23     ` Paul Walmsley
  0 siblings, 1 reply; 10+ messages in thread
From: Pandita, Vikram @ 2009-09-09 16:22 UTC (permalink / raw)
  To: Paul Walmsley, Gadiyar, Anand
  Cc: linux-omap, Nayak, Rajendra, Cousson, Benoit


Paul

>-----Original Message-----
>From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Paul
>Walmsley
>Sent: Wednesday, September 09, 2009 10:43 AM
>To: Gadiyar, Anand
>Cc: linux-omap@vger.kernel.org; Nayak, Rajendra; Cousson, Benoit
>Subject: Re: [PATCH] OMAP3: Lock DPLL5 at boot
>
>On Tue, 8 Sep 2009, Anand Gadiyar wrote:
>
>> From: Rajendra Nayak <rnayak@ti.com>
>>
>> OMAP3: Lock DPLL5 at boot
>>
>> Lock DPLL5 at 120MHz at boot. The USBHOST 120MHz f-clock and
>> USBTLL f-clock are the only users of this DPLL, and 120MHz is
>> is the only recommended rate for these clocks.
>>
>> With this patch, the 60 MHz ULPI clock is generated correctly.
>>
>> Tested on an OMAP3430 SDP.
>>
>> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
>> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
>> ---
>> Incorporated all 3 comments by Paul and Benoit. Updated
>> $SUBJECT to reflect the change.
>
>Thanks for the changes, I will queue this in a for-next branch for .33.

Is this for .33 or .32? 

>
>
>- Paul
>--
>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] 10+ messages in thread

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 16:22   ` Pandita, Vikram
@ 2009-09-09 16:23     ` Paul Walmsley
  2009-09-09 16:33       ` Gadiyar, Anand
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2009-09-09 16:23 UTC (permalink / raw)
  To: Pandita, Vikram
  Cc: Gadiyar, Anand, linux-omap, Nayak, Rajendra, Cousson, Benoit

On Wed, 9 Sep 2009, Pandita, Vikram wrote:

> >From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Paul
> >Walmsley
> >> $SUBJECT to reflect the change.
> >
> >Thanks for the changes, I will queue this in a for-next branch for .33.
> 
> Is this for .33 or .32? 

I think it might be a little late for .32.  If there is some crash or 
instability that this fixes, we could queue it up for .32-fixes ?


- Paul

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

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 16:23     ` Paul Walmsley
@ 2009-09-09 16:33       ` Gadiyar, Anand
  2009-09-09 16:47         ` Paul Walmsley
  0 siblings, 1 reply; 10+ messages in thread
From: Gadiyar, Anand @ 2009-09-09 16:33 UTC (permalink / raw)
  To: Paul Walmsley, Pandita, Vikram
  Cc: linux-omap, Nayak, Rajendra, Cousson, Benoit

On Wed, 9 Sep 2009, Paul Walmsley wrote:
> On Wed, 9 Sep 2009, Pandita, Vikram wrote:
> 
> > >From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Paul
> > >Walmsley
> > >> $SUBJECT to reflect the change.
> > >
> > >Thanks for the changes, I will queue this in a for-next branch for .33.
> >
> > Is this for .33 or .32?
> 
> I think it might be a little late for .32.  If there is some crash or
> instability that this fixes, we could queue it up for .32-fixes ?
> 

Well, without this, there's no way the child clocks can be enabled correctly.

Possibly it qualifies as a bug-fix in clock framework?

Rajendra had created this patch quite a while ago and it has received
sufficient testing on various codebases - I guess we just missed sending
it out to l-o early enough.

- Anand


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

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 16:33       ` Gadiyar, Anand
@ 2009-09-09 16:47         ` Paul Walmsley
  2009-09-09 16:51           ` Gadiyar, Anand
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2009-09-09 16:47 UTC (permalink / raw)
  To: Gadiyar, Anand
  Cc: Pandita, Vikram, linux-omap, Nayak, Rajendra, Cousson, Benoit

On Wed, 9 Sep 2009, Gadiyar, Anand wrote:

> On Wed, 9 Sep 2009, Paul Walmsley wrote:
> > On Wed, 9 Sep 2009, Pandita, Vikram wrote:
> > 
> > > >From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Paul
> > > >Walmsley
> > > >> $SUBJECT to reflect the change.
> > > >
> > > >Thanks for the changes, I will queue this in a for-next branch for .33.
> > >
> > > Is this for .33 or .32?
> > 
> > I think it might be a little late for .32.  If there is some crash or
> > instability that this fixes, we could queue it up for .32-fixes ?
> 
> Well, without this, there's no way the child clocks can be enabled correctly.

OK.  So is it the case that USBHOST/USBTLL/USIM won't work without this 
fix?  

If so then we'll queue it for .32-fixes.  Since .32 is already at -rc9, I 
think it is too late for .32.


- Paul

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

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 16:47         ` Paul Walmsley
@ 2009-09-09 16:51           ` Gadiyar, Anand
  2009-09-30 16:59             ` Gadiyar, Anand
  0 siblings, 1 reply; 10+ messages in thread
From: Gadiyar, Anand @ 2009-09-09 16:51 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Pandita, Vikram, linux-omap, Nayak, Rajendra, Cousson, Benoit

> > > > >Thanks for the changes, I will queue this in a for-next branch for .33.
> > > >
> > > > Is this for .33 or .32?
> > >
> > > I think it might be a little late for .32.  If there is some crash or
> > > instability that this fixes, we could queue it up for .32-fixes ?
> >
> > Well, without this, there's no way the child clocks can be enabled correctly.
> 
> OK.  So is it the case that USBHOST/USBTLL/USIM won't work without this
> fix?

Yup. Not sure about USIM - will check.

> 
> If so then we'll queue it for .32-fixes.  Since .32 is already at -rc9, I
> think it is too late for .32.
> 

Would be nice. Thanks!

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

* RE: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-09 16:51           ` Gadiyar, Anand
@ 2009-09-30 16:59             ` Gadiyar, Anand
  2009-09-30 18:38               ` Tony Lindgren
  0 siblings, 1 reply; 10+ messages in thread
From: Gadiyar, Anand @ 2009-09-30 16:59 UTC (permalink / raw)
  To: Gadiyar, Anand, Paul Walmsley
  Cc: Pandita, Vikram, linux-omap, Nayak, Rajendra, Cousson, Benoit

> > > > > >Thanks for the changes, I will queue this in a for-next branch for .33.
> > > > >
> > > > > Is this for .33 or .32?
> > > >
> > > > I think it might be a little late for .32.  If there is some crash or
> > > > instability that this fixes, we could queue it up for .32-fixes ?
> > >
> > > Well, without this, there's no way the child clocks can be enabled correctly.
> > 
> > OK.  So is it the case that USBHOST/USBTLL/USIM won't work without this
> > fix?
> 
> Yup. Not sure about USIM - will check.
> 
> > 
> > If so then we'll queue it for .32-fixes.  Since .32 is already at -rc9, I
> > think it is too late for .32.
> > 
> 
> Would be nice. Thanks!


Paul,

Is this patch already queued up somewhere, or are you waiting for a clarification
from me on the USIM?

(I haven't had a chance to look yet, since this is not in the regular TRM)

- Anand

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

* Re: [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-30 16:59             ` Gadiyar, Anand
@ 2009-09-30 18:38               ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2009-09-30 18:38 UTC (permalink / raw)
  To: Gadiyar, Anand
  Cc: Paul Walmsley, Pandita, Vikram, linux-omap, Nayak, Rajendra,
	Cousson, Benoit

* Gadiyar, Anand <gadiyar@ti.com> [090930 09:59]:
> > > > > > >Thanks for the changes, I will queue this in a for-next branch for .33.
> > > > > >
> > > > > > Is this for .33 or .32?
> > > > >
> > > > > I think it might be a little late for .32.  If there is some crash or
> > > > > instability that this fixes, we could queue it up for .32-fixes ?
> > > >
> > > > Well, without this, there's no way the child clocks can be enabled correctly.
> > > 
> > > OK.  So is it the case that USBHOST/USBTLL/USIM won't work without this
> > > fix?
> > 
> > Yup. Not sure about USIM - will check.
> > 
> > > 
> > > If so then we'll queue it for .32-fixes.  Since .32 is already at -rc9, I
> > > think it is too late for .32.
> > > 
> > 
> > Would be nice. Thanks!
> 
> 
> Paul,
> 
> Is this patch already queued up somewhere, or are you waiting for a clarification
> from me on the USIM?
> 
> (I haven't had a chance to look yet, since this is not in the regular TRM)

I'll add this to omap-fixes-testing while we're waiting to put his fixes
queue together. This way we can get rid of the remaining nasty stuff in
the ehci branch.

Tony

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

* [APPLIED] [PATCH] OMAP3: Lock DPLL5 at boot
  2009-09-08 13:54 [PATCH] OMAP3: Lock DPLL5 at boot Anand Gadiyar
  2009-09-09 15:43 ` Paul Walmsley
@ 2009-09-30 18:43 ` Tony Lindgren
  1 sibling, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2009-09-30 18:43 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-fixes-testing

Initial commit ID (Likely to change): d3c59a8141676bc45f0341b470845b298d6a2a51

PatchWorks
http://patchwork.kernel.org/patch/46216/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=d3c59a8141676bc45f0341b470845b298d6a2a51



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

end of thread, other threads:[~2009-09-30 18:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-08 13:54 [PATCH] OMAP3: Lock DPLL5 at boot Anand Gadiyar
2009-09-09 15:43 ` Paul Walmsley
2009-09-09 16:22   ` Pandita, Vikram
2009-09-09 16:23     ` Paul Walmsley
2009-09-09 16:33       ` Gadiyar, Anand
2009-09-09 16:47         ` Paul Walmsley
2009-09-09 16:51           ` Gadiyar, Anand
2009-09-30 16:59             ` Gadiyar, Anand
2009-09-30 18:38               ` Tony Lindgren
2009-09-30 18:43 ` [APPLIED] " 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.