All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init.
@ 2009-06-17 13:35 Artem Bityutskiy
  2009-06-17 16:25 ` Paul Walmsley
  0 siblings, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2009-06-17 13:35 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap, Tony Lindgren, Samu Onkalo

From: Samu Onkalo <samu.p.onkalo@nokia.com>

Bootloader must configure proper settings for SDRC before starting
kernel from SDRAM. Furthermore, removed lines violated omap3430 and
omap2420 SDRC errata (see errata 1.150)

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
---
 arch/arm/mach-omap2/sdrc.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
index 2045441..0874687 100644
--- a/arch/arm/mach-omap2/sdrc.c
+++ b/arch/arm/mach-omap2/sdrc.c
@@ -86,8 +86,8 @@ void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
  * @sp: pointer to a null-terminated list of struct omap_sdrc_params
  *
  * Turn on smart idle modes for SDRAM scheduler and controller.
- * Program a known-good configuration for the SDRC to deal with buggy
- * bootloaders.
+ * Bootloaders should make proper configuration for SDRC since kernel
+ * is running from SDRAM.
  */
 void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
 {
@@ -104,10 +104,4 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
 	sdrc_write_reg(l, SDRC_SYSCONFIG);
 
 	sdrc_init_params = sp;
-
-	/* XXX Enable SRFRONIDLEREQ here also? */
-	l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) |
-		(1 << SDRC_POWER_PWDENA_SHIFT) |
-		(1 << SDRC_POWER_PAGEPOLICY_SHIFT);
-	sdrc_write_reg(l, SDRC_POWER);
 }
-- 
1.6.0.6


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

* Re: [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init.
  2009-06-17 13:35 [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init Artem Bityutskiy
@ 2009-06-17 16:25 ` Paul Walmsley
  2009-06-18  6:03   ` samu.p.onkalo
  2009-06-18 21:29   ` Paul Walmsley
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Walmsley @ 2009-06-17 16:25 UTC (permalink / raw)
  To: Samu Onkalo, Artem Bityutskiy; +Cc: linux-omap, Tony Lindgren

Hello Samu, Artem,

On Wed, 17 Jun 2009, Artem Bityutskiy wrote:

> From: Samu Onkalo <samu.p.onkalo@nokia.com>
> 
> Bootloader must configure proper settings for SDRC before starting
> kernel from SDRAM. Furthermore, removed lines violated omap3430 and
> omap2420 SDRC errata (see errata 1.150)

The 2420 and 3430 errata data here seems to be old; neither one contains 
1.150.  While I wait for a new version to arrive, can you provide some 
more context on this errata?  Does it imply any restrictions on 
programming SDRC_POWER from SRAM, e.g., the CORE DVFS code?


- Paul

> 
> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
> ---
>  arch/arm/mach-omap2/sdrc.c |   10 ++--------
>  1 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
> index 2045441..0874687 100644
> --- a/arch/arm/mach-omap2/sdrc.c
> +++ b/arch/arm/mach-omap2/sdrc.c
> @@ -86,8 +86,8 @@ void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
>   * @sp: pointer to a null-terminated list of struct omap_sdrc_params
>   *
>   * Turn on smart idle modes for SDRAM scheduler and controller.
> - * Program a known-good configuration for the SDRC to deal with buggy
> - * bootloaders.
> + * Bootloaders should make proper configuration for SDRC since kernel
> + * is running from SDRAM.
>   */
>  void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
>  {
> @@ -104,10 +104,4 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
>  	sdrc_write_reg(l, SDRC_SYSCONFIG);
>  
>  	sdrc_init_params = sp;
> -
> -	/* XXX Enable SRFRONIDLEREQ here also? */
> -	l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) |
> -		(1 << SDRC_POWER_PWDENA_SHIFT) |
> -		(1 << SDRC_POWER_PAGEPOLICY_SHIFT);
> -	sdrc_write_reg(l, SDRC_POWER);
>  }
> -- 
> 1.6.0.6
> 
> --
> 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
> 


- Paul

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

* RE: [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init.
  2009-06-17 16:25 ` Paul Walmsley
@ 2009-06-18  6:03   ` samu.p.onkalo
  2009-06-18 19:00     ` Mike Chan
  2009-06-18 21:29   ` Paul Walmsley
  1 sibling, 1 reply; 6+ messages in thread
From: samu.p.onkalo @ 2009-06-18  6:03 UTC (permalink / raw)
  To: dderrick, r-woodruff2, rnayak, Artem.Bityutskiy, paul; +Cc: linux-omap, tony


Hi, 

Perhaps someone from TI could comment that. I'm not sure if I can share
errata information for public discussion.

Br,
Samu

>-----Original Message-----
>From: ext Paul Walmsley [mailto:paul@pwsan.com] 
>Sent: 17 June, 2009 19:25
>To: Onkalo Samu.P (Nokia-D/Tampere); Bityutskiy Artem 
>(Nokia-D/Helsinki)
>Cc: linux-omap@vger.kernel.org; Tony Lindgren
>Subject: Re: [PATCH] SDRC: Remove SDRC_POWER register 
>configuration from SDRC init.
>
>Hello Samu, Artem,
>
>On Wed, 17 Jun 2009, Artem Bityutskiy wrote:
>
>> From: Samu Onkalo <samu.p.onkalo@nokia.com>
>> 
>> Bootloader must configure proper settings for SDRC before starting 
>> kernel from SDRAM. Furthermore, removed lines violated omap3430 and 
>> omap2420 SDRC errata (see errata 1.150)
>
>The 2420 and 3430 errata data here seems to be old; neither 
>one contains 1.150.  While I wait for a new version to arrive, 
>can you provide some more context on this errata?  Does it 
>imply any restrictions on programming SDRC_POWER from SRAM, 
>e.g., the CORE DVFS code?
>
>
>- Paul
>
>> 
>> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
>> ---
>>  arch/arm/mach-omap2/sdrc.c |   10 ++--------
>>  1 files changed, 2 insertions(+), 8 deletions(-)
>> 
>> diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c 
>> index 2045441..0874687 100644
>> --- a/arch/arm/mach-omap2/sdrc.c
>> +++ b/arch/arm/mach-omap2/sdrc.c
>> @@ -86,8 +86,8 @@ void __init omap2_set_globals_sdrc(struct 
>omap_globals *omap2_globals)
>>   * @sp: pointer to a null-terminated list of struct omap_sdrc_params
>>   *
>>   * Turn on smart idle modes for SDRAM scheduler and controller.
>> - * Program a known-good configuration for the SDRC to deal 
>with buggy
>> - * bootloaders.
>> + * Bootloaders should make proper configuration for SDRC 
>since kernel
>> + * is running from SDRAM.
>>   */
>>  void __init omap2_sdrc_init(struct omap_sdrc_params *sp)  { @@ 
>> -104,10 +104,4 @@ void __init omap2_sdrc_init(struct 
>omap_sdrc_params *sp)
>>  	sdrc_write_reg(l, SDRC_SYSCONFIG);
>>  
>>  	sdrc_init_params = sp;
>> -
>> -	/* XXX Enable SRFRONIDLEREQ here also? */
>> -	l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) |
>> -		(1 << SDRC_POWER_PWDENA_SHIFT) |
>> -		(1 << SDRC_POWER_PAGEPOLICY_SHIFT);
>> -	sdrc_write_reg(l, SDRC_POWER);
>>  }
>> --
>> 1.6.0.6
>> 
>> --
>> 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
>> 
>
>
>- Paul
>

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

* Re: [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init.
  2009-06-18  6:03   ` samu.p.onkalo
@ 2009-06-18 19:00     ` Mike Chan
  2009-06-18 19:07       ` Woodruff, Richard
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Chan @ 2009-06-18 19:00 UTC (permalink / raw)
  To: samu.p.onkalo
  Cc: dderrick, r-woodruff2, rnayak, Artem.Bityutskiy, paul, linux-omap, tony

On Wed, Jun 17, 2009 at 11:03 PM, <samu.p.onkalo@nokia.com> wrote:
>
> Hi,
>
> Perhaps someone from TI could comment that. I'm not sure if I can share
> errata information for public discussion.
>
> Br,
> Samu
>
> >-----Original Message-----
> >From: ext Paul Walmsley [mailto:paul@pwsan.com]
> >Sent: 17 June, 2009 19:25
> >To: Onkalo Samu.P (Nokia-D/Tampere); Bityutskiy Artem
> >(Nokia-D/Helsinki)
> >Cc: linux-omap@vger.kernel.org; Tony Lindgren
> >Subject: Re: [PATCH] SDRC: Remove SDRC_POWER register
> >configuration from SDRC init.
> >
> >Hello Samu, Artem,
> >
> >On Wed, 17 Jun 2009, Artem Bityutskiy wrote:
> >
> >> From: Samu Onkalo <samu.p.onkalo@nokia.com>
> >>
> >> Bootloader must configure proper settings for SDRC before starting
> >> kernel from SDRAM. Furthermore, removed lines violated omap3430 and
> >> omap2420 SDRC errata (see errata 1.150)
> >

This seems like it will make the kernel even more dependent on the
bootloader. As an example, there's code such as the IVA2 reset which
attempts to put the hardware in a good state even if the bootloader
screws up. Unfortunately not everyone has access to their bootloader
code.

-- Mike

>
> >The 2420 and 3430 errata data here seems to be old; neither
> >one contains 1.150.  While I wait for a new version to arrive,
> >can you provide some more context on this errata?  Does it
> >imply any restrictions on programming SDRC_POWER from SRAM,
> >e.g., the CORE DVFS code?
> >
> >
> >- Paul
> >
> >>
> >> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
> >> ---
> >>  arch/arm/mach-omap2/sdrc.c |   10 ++--------
> >>  1 files changed, 2 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
> >> index 2045441..0874687 100644
> >> --- a/arch/arm/mach-omap2/sdrc.c
> >> +++ b/arch/arm/mach-omap2/sdrc.c
> >> @@ -86,8 +86,8 @@ void __init omap2_set_globals_sdrc(struct
> >omap_globals *omap2_globals)
> >>   * @sp: pointer to a null-terminated list of struct omap_sdrc_params
> >>   *
> >>   * Turn on smart idle modes for SDRAM scheduler and controller.
> >> - * Program a known-good configuration for the SDRC to deal
> >with buggy
> >> - * bootloaders.
> >> + * Bootloaders should make proper configuration for SDRC
> >since kernel
> >> + * is running from SDRAM.
> >>   */
> >>  void __init omap2_sdrc_init(struct omap_sdrc_params *sp)  { @@
> >> -104,10 +104,4 @@ void __init omap2_sdrc_init(struct
> >omap_sdrc_params *sp)
> >>      sdrc_write_reg(l, SDRC_SYSCONFIG);
> >>
> >>      sdrc_init_params = sp;
> >> -
> >> -    /* XXX Enable SRFRONIDLEREQ here also? */
> >> -    l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) |
> >> -            (1 << SDRC_POWER_PWDENA_SHIFT) |
> >> -            (1 << SDRC_POWER_PAGEPOLICY_SHIFT);
> >> -    sdrc_write_reg(l, SDRC_POWER);
> >>  }
> >> --
> >> 1.6.0.6
> >>
> >> --
> >> 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
> >>
> >
> >
> >- 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
--
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] 6+ messages in thread

* RE: [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC  init.
  2009-06-18 19:00     ` Mike Chan
@ 2009-06-18 19:07       ` Woodruff, Richard
  0 siblings, 0 replies; 6+ messages in thread
From: Woodruff, Richard @ 2009-06-18 19:07 UTC (permalink / raw)
  To: Mike Chan, samu.p.onkalo
  Cc: Derrick, David, Nayak, Rajendra, Artem.Bityutskiy, paul,
	linux-omap, tony


> From: Mike Chan [mailto:mike@android.com]
> Sent: Thursday, June 18, 2009 2:01 PM

> > >> Bootloader must configure proper settings for SDRC before starting
> > >> kernel from SDRAM. Furthermore, removed lines violated omap3430 and
> > >> omap2420 SDRC errata (see errata 1.150)
> > >
>
> This seems like it will make the kernel even more dependent on the
> bootloader. As an example, there's code such as the IVA2 reset which
> attempts to put the hardware in a good state even if the bootloader
> screws up. Unfortunately not everyone has access to their bootloader
> code.

Yes, I agree with Mike here.  Not every one can touch the bootloader.  And many operations the boot loader doesn't have context to know what the best setting for an application will be.

The boot loader needs to setup a valid DDR config for sure.  However, its unlikely it will setup for 'optimal' power management.  Further, when there are run time bugs fixes really only the kernel can do this.

You will need to turn on and off autocount before OFF mode on ES3.1.  Not doing so can result in trouble as the mask ROM itself before restoring context to kernel makes a mistake.  There are some SDRC_POWER settings you have to have at run time.

The init code shouldn't through out ACTIMINGS for DDR unless there is some policy in place, but it has less authority around power mode settings.

Regards,
Richard W.

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

* Re: [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init.
  2009-06-17 16:25 ` Paul Walmsley
  2009-06-18  6:03   ` samu.p.onkalo
@ 2009-06-18 21:29   ` Paul Walmsley
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2009-06-18 21:29 UTC (permalink / raw)
  To: Samu Onkalo, Artem Bityutskiy
  Cc: r-woodruff2, linux-omap, mike, khilman, Tony Lindgren

Hi, 

On Wed, 17 Jun 2009, Paul Walmsley wrote:

> On Wed, 17 Jun 2009, Artem Bityutskiy wrote:
> 
> > From: Samu Onkalo <samu.p.onkalo@nokia.com>
> > 
> > Bootloader must configure proper settings for SDRC before starting
> > kernel from SDRAM. Furthermore, removed lines violated omap3430 and
> > omap2420 SDRC errata (see errata 1.150)
> 
> The 2420 and 3430 errata data here seems to be old; neither one contains 
> 1.150.  While I wait for a new version to arrive, can you provide some 
> more context on this errata?  Does it imply any restrictions on 
> programming SDRC_POWER from SRAM, e.g., the CORE DVFS code?

Okay, so erratum 1.150 basically is that when SDRC_POWER.PWDENA is set, 
the SDRC can power down the SDRAM before writes complete, and so PWDENA 
should never be used.  That's easy enough to deal with by removing the 
PWDENA bit set from the SDRC_POWER register write.  So I'll pass on this 
patch.

The patch description does raise another issue, which is that SDRC_POWER 
should probably be written from SRAM, per TRM section 11.2.4.4.9.2.  We 
could do this as part of omap3_sram_configure_core_dpll, which is is 
called at boot for boards that define their SDRAM memory parameters.  
Another option would be to add another SRAM function to do this.  I'm 
leaning towards the former.  Any other opinions on this?


- Paul

> 
> 
> - Paul
> 
> > 
> > Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
> > ---
> >  arch/arm/mach-omap2/sdrc.c |   10 ++--------
> >  1 files changed, 2 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
> > index 2045441..0874687 100644
> > --- a/arch/arm/mach-omap2/sdrc.c
> > +++ b/arch/arm/mach-omap2/sdrc.c
> > @@ -86,8 +86,8 @@ void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
> >   * @sp: pointer to a null-terminated list of struct omap_sdrc_params
> >   *
> >   * Turn on smart idle modes for SDRAM scheduler and controller.
> > - * Program a known-good configuration for the SDRC to deal with buggy
> > - * bootloaders.
> > + * Bootloaders should make proper configuration for SDRC since kernel
> > + * is running from SDRAM.
> >   */
> >  void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
> >  {
> > @@ -104,10 +104,4 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sp)
> >  	sdrc_write_reg(l, SDRC_SYSCONFIG);
> >  
> >  	sdrc_init_params = sp;
> > -
> > -	/* XXX Enable SRFRONIDLEREQ here also? */
> > -	l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) |
> > -		(1 << SDRC_POWER_PWDENA_SHIFT) |
> > -		(1 << SDRC_POWER_PAGEPOLICY_SHIFT);
> > -	sdrc_write_reg(l, SDRC_POWER);
> >  }
> > -- 
> > 1.6.0.6
> > 
> > --
> > 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
> > 
> 
> 
> - 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
> 


- Paul

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

end of thread, other threads:[~2009-06-18 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 13:35 [PATCH] SDRC: Remove SDRC_POWER register configuration from SDRC init Artem Bityutskiy
2009-06-17 16:25 ` Paul Walmsley
2009-06-18  6:03   ` samu.p.onkalo
2009-06-18 19:00     ` Mike Chan
2009-06-18 19:07       ` Woodruff, Richard
2009-06-18 21:29   ` Paul Walmsley

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.