Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-09 Thread Paul Walmsley
Hi Jean,

On Mon, 8 Jun 2009, Jean Pihet wrote:

> Here is the updated patch that fixes the Overo build as well.
> Can you check it?

> diff --git a/arch/arm/mach-omap2/board-overo.c 
> b/arch/arm/mach-omap2/board-overo.c
> index 9eae608..50902d4 100644
> --- a/arch/arm/mach-omap2/board-overo.c
> +++ b/arch/arm/mach-omap2/board-overo.c
> @@ -45,6 +45,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #include "sdram-micron-mt46h32m32lf-6.h"
> @@ -355,7 +356,9 @@ static int __init overo_i2c_init(void)
>  
>  static void __init overo_init_irq(void)
>  {
> - omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, NULL, NULL);
> + omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
> +  mt46h32m32lf6_sdrc_params,
> +  NULL, NULL, NULL);
>   omap_init_irq();
>   omap_gpio_init();
>  }
> @@ -391,6 +394,10 @@ static void __init overo_init(void)
>   overo_init_smsc911x();
>   overo_ads7846_init();
>  
> + /* Ensure SDRC pins are mux'd for self-refresh */
> + omap_cfg_reg(H16_34XX_SDRC_CKE0);
> + omap_cfg_reg(H17_34XX_SDRC_CKE1);
> +
>   if ((gpio_request(OVERO_GPIO_W2W_NRESET,
> "OVERO_GPIO_W2W_NRESET") == 0) &&
>   (gpio_direction_output(OVERO_GPIO_W2W_NRESET, 1) == 0)) {

These changes look fine to me based on a quick look.  Haven't tried 
building it.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Jean Pihet
Hi Kevin,

On Monday 08 June 2009 13:01:18 Grazvydas Ignotas wrote:
> >  static void __init omap3pandora_init_irq(void)
> >  {
> > -       omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL,
> > +       omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
> > +                            mt46h32m32lf6_sdrc_params,
> >                             NULL, NULL, NULL);
>
> Hm, since pandora uses OMAP3530, maybe it should also have
> omap3_*_rate_table args passed? Could also be true for Overo, at least
> for omap3_mpu_rate_table and omap3_l3_rate_table, as some models use
> OMAP3503 without the DSP.
Which table rates shall we pass for Overo and Pandora?
I will update the patch set with the needed ones.

Regards,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Jean Pihet
On Monday 08 June 2009 16:59:36 Kevin Hilman wrote:
> Jean Pihet  writes:
> > Paul,
> >
> > Here is the updated patch that fixes the Overo build as well.
> > Can you check it?
> >
> > Kevin, can you push it if it is correct?
>
> Can you run it through checkpatch, fix the errors and also merge Tero's
> RX51 patch if it looks good to you.
Ok. I will check. The cause might be the mailer.

I think we need the omap_cfg_reg calls in the RX51 board file as well, even if 
the bootloader has the mux setting already right. That way a warning will be 
issued in case of a faulty bootloader. Do you agree?

>
> Below are the checkpatch errors I get:  looks lik your mailer is
> probably wrapping the patch and there is also one error to fix.
>
> Kevin

Regards,
Jean
>
> ERROR: patch seems to be corrupt (line wrapped?)
> #306: FILE: arch/arm/mach-omap2/clock34xx.c:477:
> unsigned long rate)
>
> ERROR: trailing whitespace
> #494: FILE: arch/arm/mach-omap2/sdrc.c:128:
> + * @sdrc_cs[01]: pointers to a null-terminated list of struct $
>
> total: 2 errors, 0 warnings, 648 lines checked
>
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
>
> > Regards,
> > Jean
> >
> > From ebe57354b0de059e1f042e0c488f761853f0 Mon Sep 17 00:00:00 2001
> > From: Jean Pihet 
> > Date: Fri, 5 Jun 2009 17:19:00 +0200
> > Subject: OMAP3: add support for 2 SDRAM chip selects
> >
> > Some boards (Beagle Cx, Overo) have 2 SDRAM parts
> > connected to the SDRC.
> >
> > This patch adds the following:
> > - ensure that the CKE signals mux settings are correct
> > - add a new argument of type omap_sdrc_params struct*
> > to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
> > - adapted the OMAP boards files to the new prototype of
> > omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
> > - adapt the sram sleep code to configure the SDRC for the 2nd CS
> >
> > Note: If the 2nd param to omap2_init_common_hw is NULL, then the
> > parameters are not programmed into the SDRC CS1 registers
> >
> > Tested on 3430 SDP and Beagleboard rev C2 and B5, with
> > suspend/resume and frequency changes (cpufreq).
> >
> > Thanks to Paul Walmsley and Kevin Hilman for the suggestions
> > and code reviews.
> >
> > Signed-off-by: Jean Pihet 
> > ---
> >  arch/arm/mach-omap2/board-2430sdp.c  |2 +-
> >  arch/arm/mach-omap2/board-3430sdp.c  |6 +-
> >  arch/arm/mach-omap2/board-apollon.c  |2 +-
> >  arch/arm/mach-omap2/board-generic.c  |2 +-
> >  arch/arm/mach-omap2/board-h4.c   |2 +-
> >  arch/arm/mach-omap2/board-ldp.c  |2 +-
> >  arch/arm/mach-omap2/board-n800.c |2 +-
> >  arch/arm/mach-omap2/board-omap2evm.c |2 +-
> >  arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
> >  arch/arm/mach-omap2/board-omap3evm.c |6 +-
> >  arch/arm/mach-omap2/board-omap3pandora.c |3 +-
> >  arch/arm/mach-omap2/board-overo.c|9 ++-
> >  arch/arm/mach-omap2/board-rx51.c |6 +-
> >  arch/arm/mach-omap2/clock34xx.c  |   37 ++--
> >  arch/arm/mach-omap2/io.c |5 +-
> >  arch/arm/mach-omap2/mux.c|6 ++
> >  arch/arm/mach-omap2/sdrc.c   |   63 +-
> >  arch/arm/mach-omap2/sram34xx.S   |  137
> > +++---
> >  arch/arm/plat-omap/include/mach/io.h |3 +-
> >  arch/arm/plat-omap/include/mach/mux.h|4 +
> >  arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
> >  arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
> >  arch/arm/plat-omap/sram.c|   34 +---
> >  23 files changed, 267 insertions(+), 108 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-2430sdp.c
> > b/arch/arm/mach-omap2/board-2430sdp.c
> > index aa5df72..4cb7bc5 100644
> > --- a/arch/arm/mach-omap2/board-2430sdp.c
> > +++ b/arch/arm/mach-omap2/board-2430sdp.c
> > @@ -322,7 +322,7 @@ out:
> >
> >  static void __init omap_2430sdp_init_irq(void)
> >  {
> > -   omap2_init_common_hw(NULL);
> > +   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
> > omap_init_irq();
> > omap_gpio_init();
> > sdp2430_init_smc91x();
> > diff --git a/arch/arm/mach-omap2/board-3430sdp.c
> > b/arch/arm/mach-omap2/board-3430sdp.c
> > index 195b749..24e2728 100644
> > --- a/arch/arm/mach-omap2/board-3430sdp.c
> > +++ b/arch/arm/mach-omap2/board-3430sdp.c
> > @@ -302,8 +302,10 @@ static inline void __init sdp3430_init_smc91x(void)
> >
> >  static void __init omap_3430sdp_init_irq(void)
> >  {
> > -   omap2_init_common_hw(hyb18m512160af6_sdrc_params, omap3_mpu_rate_table,
> > -omap3_dsp_rate_table, omap3_l3_rate_table);
> > +   omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
> > +omap3_mpu_rate_table,
> > +omap3_dsp_rate_table,
> > +omap3_l3_rate_table);
> >

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Kevin Hilman
Jean Pihet  writes:

> Paul,
>
> Here is the updated patch that fixes the Overo build as well.
> Can you check it?
>
> Kevin, can you push it if it is correct?

Can you run it through checkpatch, fix the errors and also merge Tero's
RX51 patch if it looks good to you.

Below are the checkpatch errors I get:  looks lik your mailer is
probably wrapping the patch and there is also one error to fix.

Kevin

ERROR: patch seems to be corrupt (line wrapped?)
#306: FILE: arch/arm/mach-omap2/clock34xx.c:477:
unsigned long rate)

ERROR: trailing whitespace
#494: FILE: arch/arm/mach-omap2/sdrc.c:128:
+ * @sdrc_cs[01]: pointers to a null-terminated list of struct $

total: 2 errors, 0 warnings, 648 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


>
> Regards,
> Jean
>
> From ebe57354b0de059e1f042e0c488f761853f0 Mon Sep 17 00:00:00 2001
> From: Jean Pihet 
> Date: Fri, 5 Jun 2009 17:19:00 +0200
> Subject: OMAP3: add support for 2 SDRAM chip selects
>
> Some boards (Beagle Cx, Overo) have 2 SDRAM parts
> connected to the SDRC.
>
> This patch adds the following:
> - ensure that the CKE signals mux settings are correct
> - add a new argument of type omap_sdrc_params struct*
> to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
> - adapted the OMAP boards files to the new prototype of
> omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
> - adapt the sram sleep code to configure the SDRC for the 2nd CS
>
> Note: If the 2nd param to omap2_init_common_hw is NULL, then the
> parameters are not programmed into the SDRC CS1 registers
>
> Tested on 3430 SDP and Beagleboard rev C2 and B5, with
> suspend/resume and frequency changes (cpufreq).
>
> Thanks to Paul Walmsley and Kevin Hilman for the suggestions
> and code reviews.
>
> Signed-off-by: Jean Pihet 
> ---
>  arch/arm/mach-omap2/board-2430sdp.c  |2 +-
>  arch/arm/mach-omap2/board-3430sdp.c  |6 +-
>  arch/arm/mach-omap2/board-apollon.c  |2 +-
>  arch/arm/mach-omap2/board-generic.c  |2 +-
>  arch/arm/mach-omap2/board-h4.c   |2 +-
>  arch/arm/mach-omap2/board-ldp.c  |2 +-
>  arch/arm/mach-omap2/board-n800.c |2 +-
>  arch/arm/mach-omap2/board-omap2evm.c |2 +-
>  arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
>  arch/arm/mach-omap2/board-omap3evm.c |6 +-
>  arch/arm/mach-omap2/board-omap3pandora.c |3 +-
>  arch/arm/mach-omap2/board-overo.c|9 ++-
>  arch/arm/mach-omap2/board-rx51.c |6 +-
>  arch/arm/mach-omap2/clock34xx.c  |   37 ++--
>  arch/arm/mach-omap2/io.c |5 +-
>  arch/arm/mach-omap2/mux.c|6 ++
>  arch/arm/mach-omap2/sdrc.c   |   63 +-
>  arch/arm/mach-omap2/sram34xx.S   |  137 
> +++---
>  arch/arm/plat-omap/include/mach/io.h |3 +-
>  arch/arm/plat-omap/include/mach/mux.h|4 +
>  arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
>  arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
>  arch/arm/plat-omap/sram.c|   34 +---
>  23 files changed, 267 insertions(+), 108 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
> b/arch/arm/mach-omap2/board-2430sdp.c
> index aa5df72..4cb7bc5 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -322,7 +322,7 @@ out:
>  
>  static void __init omap_2430sdp_init_irq(void)
>  {
> - omap2_init_common_hw(NULL);
> + omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
>   omap_init_irq();
>   omap_gpio_init();
>   sdp2430_init_smc91x();
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
> b/arch/arm/mach-omap2/board-3430sdp.c
> index 195b749..24e2728 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -302,8 +302,10 @@ static inline void __init sdp3430_init_smc91x(void)
>  
>  static void __init omap_3430sdp_init_irq(void)
>  {
> - omap2_init_common_hw(hyb18m512160af6_sdrc_params, omap3_mpu_rate_table,
> -  omap3_dsp_rate_table, omap3_l3_rate_table);
> + omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
> +  omap3_mpu_rate_table,
> +  omap3_dsp_rate_table,
> +  omap3_l3_rate_table);
>   omap_init_irq();
>   omap_gpio_init();
>   sdp3430_init_smc91x();
> diff --git a/arch/arm/mach-omap2/board-apollon.c 
> b/arch/arm/mach-omap2/board-apollon.c
> index 2e24812..2dd1350 100644
> --- a/arch/arm/mach-omap2/board-apollon.c
> +++ b/arch/arm/mach-omap2/board-apollon.c
> @@ -323,7 +323,7 @@ out:
>  
>  static void __init omap_apollon_init_irq(void)
>  {
> - omap2_init_common_hw(NULL, NULL, NULL, NULL);
> + omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
>   omap_init_irq();
> 

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Grazvydas Ignotas
On Mon, Jun 8, 2009 at 12:02 PM, Jean Pihet wrote:
> Paul, Gražvydas,
>
> Ok, thanks!
>
> Here is a patch that addresses the Pandora's use of 2 SDRAM chip selects.
> It applies on top of 'OMAP3: add support for 2 SDRAM chip selects'.
>
> Is that OK? It has been build tested only.

thanks!

>
> Regards,
> Jean
>
> From 297a0b09267fc1a0ae4428771ff54b73b27d5bbe Mon Sep 17 00:00:00 2001
> From: Jean Pihet 
> Date: Mon, 8 Jun 2009 10:49:53 +0200
> Subject: OMAP3 Pandora: add support for 2 SDRAM chip selects
>
> This allows the self refresh to work correctly on
> Pandora.
>
> Signed-off-by: Jean Pihet 
> ---
>  arch/arm/mach-omap2/board-omap3pandora.c |    8 +++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
> b/arch/arm/mach-omap2/board-omap3pandora.c
> index 05ab99e..ba015b4 100644
> --- a/arch/arm/mach-omap2/board-omap3pandora.c
> +++ b/arch/arm/mach-omap2/board-omap3pandora.c
> @@ -44,6 +44,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>
> @@ -220,7 +221,8 @@ static int __init omap3pandora_i2c_init(void)
>
>  static void __init omap3pandora_init_irq(void)
>  {
> -       omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL,
> +       omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
> +                            mt46h32m32lf6_sdrc_params,
>                             NULL, NULL, NULL);

Hm, since pandora uses OMAP3530, maybe it should also have
omap3_*_rate_table args passed? Could also be true for Overo, at least
for omap3_mpu_rate_table and omap3_l3_rate_table, as some models use
OMAP3503 without the DSP.

>        omap_init_irq();
>        omap_gpio_init();
> @@ -307,6 +309,10 @@ static void __init omap3pandora_init(void)
>        usb_ehci_init();
>        omap3pandora_flash_init();
>        omap3pandora_ads7846_init();
> +
> +       /* Ensure SDRC pins are mux'd for self-refresh */
> +       omap_cfg_reg(H16_34XX_SDRC_CKE0);
> +       omap_cfg_reg(H17_34XX_SDRC_CKE1);
>  }
>
>  static void __init omap3pandora_map_io(void)
> --
> 1.6.2.5.168.g3823
>
>
> On Saturday 06 June 2009 12:50:42 Grazvydas Ignotas wrote:
>> On Fri, Jun 5, 2009 at 10:14 PM, Paul Walmsley wrote:
>> > Hi Jean,
>> >
>> > On Fri, 5 Jun 2009, Jean Pihet wrote:
>> >> Some notes:
>> >> - all calls to omap2_init_common_hw have been adapted in the board
>> >> files. it looks like 2430SDP and Pandora board files are broken since
>> >> they use only one param. Can that be checked on those boards?
>> >
>> > Yep, builds with those two boards are broken on the PM branch, and it
>> > looks like your patch fixes both.
>> >
>> > Gražyvdas, looks like Pandora might use 2 SDRAM chipselects also?
>>
>> Yes it does, it uses different part than Beagle rev C (256/512
>> RAM/NAND instead of 256/256), but RAM portion should be identical I
>> guess.
>>
>>
>> Gražvydas
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Jean Pihet
Paul, Gražvydas,

Ok, thanks!

Here is a patch that addresses the Pandora's use of 2 SDRAM chip selects.
It applies on top of 'OMAP3: add support for 2 SDRAM chip selects'.

Is that OK? It has been build tested only.

Regards,
Jean

>From 297a0b09267fc1a0ae4428771ff54b73b27d5bbe Mon Sep 17 00:00:00 2001
From: Jean Pihet 
Date: Mon, 8 Jun 2009 10:49:53 +0200
Subject: OMAP3 Pandora: add support for 2 SDRAM chip selects

This allows the self refresh to work correctly on
Pandora.

Signed-off-by: Jean Pihet 
---
 arch/arm/mach-omap2/board-omap3pandora.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 05ab99e..ba015b4 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -220,7 +221,8 @@ static int __init omap3pandora_i2c_init(void)
 
 static void __init omap3pandora_init_irq(void)
 {
-   omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL,
+   omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+mt46h32m32lf6_sdrc_params,
 NULL, NULL, NULL);
omap_init_irq();
omap_gpio_init();
@@ -307,6 +309,10 @@ static void __init omap3pandora_init(void)
usb_ehci_init();
omap3pandora_flash_init();
omap3pandora_ads7846_init();
+
+   /* Ensure SDRC pins are mux'd for self-refresh */
+   omap_cfg_reg(H16_34XX_SDRC_CKE0);
+   omap_cfg_reg(H17_34XX_SDRC_CKE1);
 }
 
 static void __init omap3pandora_map_io(void)
-- 
1.6.2.5.168.g3823


On Saturday 06 June 2009 12:50:42 Grazvydas Ignotas wrote:
> On Fri, Jun 5, 2009 at 10:14 PM, Paul Walmsley wrote:
> > Hi Jean,
> >
> > On Fri, 5 Jun 2009, Jean Pihet wrote:
> >> Some notes:
> >> - all calls to omap2_init_common_hw have been adapted in the board
> >> files. it looks like 2430SDP and Pandora board files are broken since
> >> they use only one param. Can that be checked on those boards?
> >
> > Yep, builds with those two boards are broken on the PM branch, and it
> > looks like your patch fixes both.
> >
> > Gražyvdas, looks like Pandora might use 2 SDRAM chipselects also?
>
> Yes it does, it uses different part than Beagle rev C (256/512
> RAM/NAND instead of 256/256), but RAM portion should be identical I
> guess.
>
>
> Gražvydas


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Jean Pihet
Paul,

Here is the updated patch that fixes the Overo build as well.
Can you check it?

Kevin, can you push it if it is correct?

Regards,
Jean

>From ebe57354b0de059e1f042e0c488f761853f0 Mon Sep 17 00:00:00 2001
From: Jean Pihet 
Date: Fri, 5 Jun 2009 17:19:00 +0200
Subject: OMAP3: add support for 2 SDRAM chip selects

Some boards (Beagle Cx, Overo) have 2 SDRAM parts
connected to the SDRC.

This patch adds the following:
- ensure that the CKE signals mux settings are correct
- add a new argument of type omap_sdrc_params struct*
to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
- adapted the OMAP boards files to the new prototype of
omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
- adapt the sram sleep code to configure the SDRC for the 2nd CS

Note: If the 2nd param to omap2_init_common_hw is NULL, then the
parameters are not programmed into the SDRC CS1 registers

Tested on 3430 SDP and Beagleboard rev C2 and B5, with
suspend/resume and frequency changes (cpufreq).

Thanks to Paul Walmsley and Kevin Hilman for the suggestions
and code reviews.

Signed-off-by: Jean Pihet 
---
 arch/arm/mach-omap2/board-2430sdp.c  |2 +-
 arch/arm/mach-omap2/board-3430sdp.c  |6 +-
 arch/arm/mach-omap2/board-apollon.c  |2 +-
 arch/arm/mach-omap2/board-generic.c  |2 +-
 arch/arm/mach-omap2/board-h4.c   |2 +-
 arch/arm/mach-omap2/board-ldp.c  |2 +-
 arch/arm/mach-omap2/board-n800.c |2 +-
 arch/arm/mach-omap2/board-omap2evm.c |2 +-
 arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
 arch/arm/mach-omap2/board-omap3evm.c |6 +-
 arch/arm/mach-omap2/board-omap3pandora.c |3 +-
 arch/arm/mach-omap2/board-overo.c|9 ++-
 arch/arm/mach-omap2/board-rx51.c |6 +-
 arch/arm/mach-omap2/clock34xx.c  |   37 ++--
 arch/arm/mach-omap2/io.c |5 +-
 arch/arm/mach-omap2/mux.c|6 ++
 arch/arm/mach-omap2/sdrc.c   |   63 +-
 arch/arm/mach-omap2/sram34xx.S   |  137 
+++---
 arch/arm/plat-omap/include/mach/io.h |3 +-
 arch/arm/plat-omap/include/mach/mux.h|4 +
 arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
 arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
 arch/arm/plat-omap/sram.c|   34 +---
 23 files changed, 267 insertions(+), 108 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index aa5df72..4cb7bc5 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -322,7 +322,7 @@ out:
 
 static void __init omap_2430sdp_init_irq(void)
 {
-   omap2_init_common_hw(NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
omap_gpio_init();
sdp2430_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 195b749..24e2728 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -302,8 +302,10 @@ static inline void __init sdp3430_init_smc91x(void)
 
 static void __init omap_3430sdp_init_irq(void)
 {
-   omap2_init_common_hw(hyb18m512160af6_sdrc_params, omap3_mpu_rate_table,
-omap3_dsp_rate_table, omap3_l3_rate_table);
+   omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
+omap3_mpu_rate_table,
+omap3_dsp_rate_table,
+omap3_l3_rate_table);
omap_init_irq();
omap_gpio_init();
sdp3430_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index 2e24812..2dd1350 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -323,7 +323,7 @@ out:
 
 static void __init omap_apollon_init_irq(void)
 {
-   omap2_init_common_hw(NULL, NULL, NULL, NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
omap_gpio_init();
apollon_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-generic.c 
b/arch/arm/mach-omap2/board-generic.c
index be763a9..763329b 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -33,7 +33,7 @@
 
 static void __init omap_generic_init_irq(void)
 {
-   omap2_init_common_hw(NULL, NULL, NULL, NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
 }
 
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 8f54939..17c3599 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -348,7 +348,7 @@ static void __init h4_init_flash(void)
 
 static void __init omap_h4_init_irq(void)
 {
-   omap2_init_common_hw(NULL, NULL, NULL, NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();

RE: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-08 Thread Tero.Kristo


>-Original Message-
>From: ext Paul Walmsley [mailto:p...@pwsan.com]
>Sent: 05 June, 2009 21:11
>To: Jean Pihet; Kristo Tero (Nokia-D/Tampere)
>Cc: Kevin Hilman; linux-omap
>Subject: Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip
>selects (was: Re: Beagleboard rev C memory timings & suspend/resume)
>
>Hi Jean,
>
>On Fri, 5 Jun 2009, Jean Pihet wrote:
>
>> Here is the new patch that includes all the remarks and suggestion.
>> The description is here below.
>>
>> Some notes:
>> - all calls to omap2_init_common_hw have been adapted in the board
>> files. it looks like 2430SDP and Pandora board files are
>broken since
>> they use only one param. Can that be checked on those boards?
>> - it is assumed that RX51 only uses 1 CS. Is that correct?
>>
>> Can you review it and possibly merge?
>
>Looks great.
>
>Tero, does RX51 use two SDRC chipselects!

Yes, I'll take a look at this and post a patch on top of this. I did this for 
the earlier version already, but need to re-check this one.

-Tero

>
>Acked-by: Paul Walmsley 
>
>
>>
>> Thanks & regards,
>> Jean
>>
>> --
>> From 097a640997b74638e0e7200ecd5834205204c956 Mon Sep 17
>00:00:00 2001
>> From: Jean Pihet 
>> Date: Fri, 5 Jun 2009 17:19:00 +0200
>> Subject: [PATCH] [PATCH] OMAP3: add support for 2 SDRAM chip selects
>>
>> Some boards (Beagle Cx, Overo) have 2 SDRAM parts connected to the
>> SDRC.
>>
>> This patch adds the following:
>> - ensure that the CKE signals mux settings are correct
>> - add a new argument of type omap_sdrc_params struct* to
>> omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
>> - adapted the OMAP boards files to the new prototype of
>> omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
>> - adapt the sram sleep code to configure the SDRC for the 2nd CS
>>
>> Note: If the 2nd param to omap2_init_common_hw is NULL, then the
>> parameters are not programmed into the SDRC CS1 registers
>>
>> Tested on 3430 SDP and Beagleboard rev C2 and B5, with
>suspend/resume
>> and frequency changes (cpufreq).
>>
>> Thanks to Paul Walmsley and Kevin Hilman for the suggestions
>and code
>> reviews.
>>
>> Signed-off-by: Jean Pihet 
>> ---
>>  arch/arm/mach-omap2/board-2430sdp.c  |2 +-
>>  arch/arm/mach-omap2/board-3430sdp.c  |6 +-
>>  arch/arm/mach-omap2/board-apollon.c  |2 +-
>>  arch/arm/mach-omap2/board-generic.c  |2 +-
>>  arch/arm/mach-omap2/board-h4.c   |2 +-
>>  arch/arm/mach-omap2/board-ldp.c  |2 +-
>>  arch/arm/mach-omap2/board-n800.c |2 +-
>>  arch/arm/mach-omap2/board-omap2evm.c |2 +-
>>  arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
>>  arch/arm/mach-omap2/board-omap3evm.c |6 +-
>>  arch/arm/mach-omap2/board-omap3pandora.c |3 +-
>>  arch/arm/mach-omap2/board-overo.c|8 ++-
>>  arch/arm/mach-omap2/board-rx51.c |6 +-
>>  arch/arm/mach-omap2/clock34xx.c  |   37 ++--
>>  arch/arm/mach-omap2/io.c |5 +-
>>  arch/arm/mach-omap2/mux.c|6 ++
>>  arch/arm/mach-omap2/sdrc.c   |   63 +-
>>  arch/arm/mach-omap2/sram34xx.S   |  137
>> +++---
>>  arch/arm/plat-omap/include/mach/io.h |3 +-
>>  arch/arm/plat-omap/include/mach/mux.h|4 +
>>  arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
>>  arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
>>  arch/arm/plat-omap/sram.c|   34 +---
>>  23 files changed, 266 insertions(+), 108 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c
>> b/arch/arm/mach-omap2/board-2430sdp.c
>> index aa5df72..4cb7bc5 100644
>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>> @@ -322,7 +322,7 @@ out:
>>
>>  static void __init omap_2430sdp_init_irq(void)  {
>> -omap2_init_common_hw(NULL);
>> +omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
>>  omap_init_irq();
>>  omap_gpio_init();
>>  sdp2430_init_smc91x();
>> diff --git a/arch/arm/mach-omap2/board-3430sdp.c
>> b/arch/arm/mach-omap2/board-3430sdp.c
>> index 195b749..24e2728 100644
>> --- a/arch/arm/mach-omap2/board-3430sdp.c
>> +++ b/arch/arm/mach-omap2/board-3430sdp.c
>> @@ -302,8 +302,10 @@ static inline void __init
>> sdp3430_init_smc91x(void)
>>
>>  static void __init omap_343

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-06 Thread Grazvydas Ignotas
On Fri, Jun 5, 2009 at 10:14 PM, Paul Walmsley wrote:
> Hi Jean,
>
> On Fri, 5 Jun 2009, Jean Pihet wrote:
>
>> Some notes:
>> - all calls to omap2_init_common_hw have been adapted in the board files. it
>> looks like 2430SDP and Pandora board files are broken since they use only one
>> param. Can that be checked on those boards?
>
> Yep, builds with those two boards are broken on the PM branch, and it
> looks like your patch fixes both.
>
> Gražyvdas, looks like Pandora might use 2 SDRAM chipselects also?

Yes it does, it uses different part than Beagle rev C (256/512
RAM/NAND instead of 256/256), but RAM portion should be identical I
guess.


Gražvydas
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-05 Thread Paul Walmsley
Hi Jean,

On Fri, 5 Jun 2009, Jean Pihet wrote:

> Some notes:
> - all calls to omap2_init_common_hw have been adapted in the board files. it 
> looks like 2430SDP and Pandora board files are broken since they use only one 
> param. Can that be checked on those boards?

Yep, builds with those two boards are broken on the PM branch, and it 
looks like your patch fixes both.  

Gražyvdas, looks like Pandora might use 2 SDRAM chipselects also?


- Paul

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-05 Thread Paul Walmsley
Hi Jean,

On Fri, 5 Jun 2009, Jean Pihet wrote:

> Here is the new patch that includes all the remarks and suggestion. The 
> description is here below.
> 
> Some notes:
> - all calls to omap2_init_common_hw have been adapted in the board files. it 
> looks like 2430SDP and Pandora board files are broken since they use only one 
> param. Can that be checked on those boards?
> - it is assumed that RX51 only uses 1 CS. Is that correct?
> 
> Can you review it and possibly merge?

Looks great.

Tero, does RX51 use two SDRC chipselects!

Acked-by: Paul Walmsley 


> 
> Thanks & regards,
> Jean
> 
> --
> From 097a640997b74638e0e7200ecd5834205204c956 Mon Sep 17 00:00:00 2001
> From: Jean Pihet 
> Date: Fri, 5 Jun 2009 17:19:00 +0200
> Subject: [PATCH] [PATCH] OMAP3: add support for 2 SDRAM chip selects
> 
> Some boards (Beagle Cx, Overo) have 2 SDRAM parts
> connected to the SDRC.
> 
> This patch adds the following:
> - ensure that the CKE signals mux settings are correct
> - add a new argument of type omap_sdrc_params struct*
> to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
> - adapted the OMAP boards files to the new prototype of
> omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
> - adapt the sram sleep code to configure the SDRC for the 2nd CS
> 
> Note: If the 2nd param to omap2_init_common_hw is NULL, then the
> parameters are not programmed into the SDRC CS1 registers
> 
> Tested on 3430 SDP and Beagleboard rev C2 and B5, with
> suspend/resume and frequency changes (cpufreq).
> 
> Thanks to Paul Walmsley and Kevin Hilman for the suggestions
> and code reviews.
> 
> Signed-off-by: Jean Pihet 
> ---
>  arch/arm/mach-omap2/board-2430sdp.c  |2 +-
>  arch/arm/mach-omap2/board-3430sdp.c  |6 +-
>  arch/arm/mach-omap2/board-apollon.c  |2 +-
>  arch/arm/mach-omap2/board-generic.c  |2 +-
>  arch/arm/mach-omap2/board-h4.c   |2 +-
>  arch/arm/mach-omap2/board-ldp.c  |2 +-
>  arch/arm/mach-omap2/board-n800.c |2 +-
>  arch/arm/mach-omap2/board-omap2evm.c |2 +-
>  arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
>  arch/arm/mach-omap2/board-omap3evm.c |6 +-
>  arch/arm/mach-omap2/board-omap3pandora.c |3 +-
>  arch/arm/mach-omap2/board-overo.c|8 ++-
>  arch/arm/mach-omap2/board-rx51.c |6 +-
>  arch/arm/mach-omap2/clock34xx.c  |   37 ++--
>  arch/arm/mach-omap2/io.c |5 +-
>  arch/arm/mach-omap2/mux.c|6 ++
>  arch/arm/mach-omap2/sdrc.c   |   63 +-
>  arch/arm/mach-omap2/sram34xx.S   |  137 
> +++---
>  arch/arm/plat-omap/include/mach/io.h |3 +-
>  arch/arm/plat-omap/include/mach/mux.h|4 +
>  arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
>  arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
>  arch/arm/plat-omap/sram.c|   34 +---
>  23 files changed, 266 insertions(+), 108 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
> b/arch/arm/mach-omap2/board-2430sdp.c
> index aa5df72..4cb7bc5 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -322,7 +322,7 @@ out:
>  
>  static void __init omap_2430sdp_init_irq(void)
>  {
> - omap2_init_common_hw(NULL);
> + omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
>   omap_init_irq();
>   omap_gpio_init();
>   sdp2430_init_smc91x();
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
> b/arch/arm/mach-omap2/board-3430sdp.c
> index 195b749..24e2728 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -302,8 +302,10 @@ static inline void __init sdp3430_init_smc91x(void)
>  
>  static void __init omap_3430sdp_init_irq(void)
>  {
> - omap2_init_common_hw(hyb18m512160af6_sdrc_params, omap3_mpu_rate_table,
> -  omap3_dsp_rate_table, omap3_l3_rate_table);
> + omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
> +  omap3_mpu_rate_table,
> +  omap3_dsp_rate_table,
> +  omap3_l3_rate_table);
>   omap_init_irq();
>   omap_gpio_init();
>   sdp3430_init_smc91x();
> diff --git a/arch/arm/mach-omap2/board-apollon.c 
> b/arch/arm/mach-omap2/board-apollon.c
> index 2e24812..2dd1350 100644
> --- a/arch/arm/mach-omap2/board-apollon.c
> +++ b/arch/arm/mach-omap2/board-apollon.c
> @@ -323,7 +323,7 @@ out:
>  
>  static void __init omap_apollon_init_irq(void)
>  {
> - omap2_init_common_hw(NULL, NULL, NULL, NULL);
> + omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
>   omap_init_irq();
>   omap_gpio_init();
>   apollon_init_smc91x();
> diff --git a/arch/arm/mach-omap2/board-generic.c 
> b/arch/arm/mach-omap2/board-generic.c
> index be763a9..763329b 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-05 Thread Jean Pihet
Hi Paul, Kevin,

Here is the new patch that includes all the remarks and suggestion. The 
description is here below.

Some notes:
- all calls to omap2_init_common_hw have been adapted in the board files. it 
looks like 2430SDP and Pandora board files are broken since they use only one 
param. Can that be checked on those boards?
- it is assumed that RX51 only uses 1 CS. Is that correct?

Can you review it and possibly merge?

Thanks & regards,
Jean

--
>From 097a640997b74638e0e7200ecd5834205204c956 Mon Sep 17 00:00:00 2001
From: Jean Pihet 
Date: Fri, 5 Jun 2009 17:19:00 +0200
Subject: [PATCH] [PATCH] OMAP3: add support for 2 SDRAM chip selects

Some boards (Beagle Cx, Overo) have 2 SDRAM parts
connected to the SDRC.

This patch adds the following:
- ensure that the CKE signals mux settings are correct
- add a new argument of type omap_sdrc_params struct*
to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
- adapted the OMAP boards files to the new prototype of
omap2_init_common_hw. Only Beagle and Overo are using the 2 CS'es
- adapt the sram sleep code to configure the SDRC for the 2nd CS

Note: If the 2nd param to omap2_init_common_hw is NULL, then the
parameters are not programmed into the SDRC CS1 registers

Tested on 3430 SDP and Beagleboard rev C2 and B5, with
suspend/resume and frequency changes (cpufreq).

Thanks to Paul Walmsley and Kevin Hilman for the suggestions
and code reviews.

Signed-off-by: Jean Pihet 
---
 arch/arm/mach-omap2/board-2430sdp.c  |2 +-
 arch/arm/mach-omap2/board-3430sdp.c  |6 +-
 arch/arm/mach-omap2/board-apollon.c  |2 +-
 arch/arm/mach-omap2/board-generic.c  |2 +-
 arch/arm/mach-omap2/board-h4.c   |2 +-
 arch/arm/mach-omap2/board-ldp.c  |2 +-
 arch/arm/mach-omap2/board-n800.c |2 +-
 arch/arm/mach-omap2/board-omap2evm.c |2 +-
 arch/arm/mach-omap2/board-omap3beagle.c  |   11 ++-
 arch/arm/mach-omap2/board-omap3evm.c |6 +-
 arch/arm/mach-omap2/board-omap3pandora.c |3 +-
 arch/arm/mach-omap2/board-overo.c|8 ++-
 arch/arm/mach-omap2/board-rx51.c |6 +-
 arch/arm/mach-omap2/clock34xx.c  |   37 ++--
 arch/arm/mach-omap2/io.c |5 +-
 arch/arm/mach-omap2/mux.c|6 ++
 arch/arm/mach-omap2/sdrc.c   |   63 +-
 arch/arm/mach-omap2/sram34xx.S   |  137 
+++---
 arch/arm/plat-omap/include/mach/io.h |3 +-
 arch/arm/plat-omap/include/mach/mux.h|4 +
 arch/arm/plat-omap/include/mach/sdrc.h   |8 +-
 arch/arm/plat-omap/include/mach/sram.h   |   23 +++--
 arch/arm/plat-omap/sram.c|   34 +---
 23 files changed, 266 insertions(+), 108 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index aa5df72..4cb7bc5 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -322,7 +322,7 @@ out:
 
 static void __init omap_2430sdp_init_irq(void)
 {
-   omap2_init_common_hw(NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
omap_gpio_init();
sdp2430_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 195b749..24e2728 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -302,8 +302,10 @@ static inline void __init sdp3430_init_smc91x(void)
 
 static void __init omap_3430sdp_init_irq(void)
 {
-   omap2_init_common_hw(hyb18m512160af6_sdrc_params, omap3_mpu_rate_table,
-omap3_dsp_rate_table, omap3_l3_rate_table);
+   omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL,
+omap3_mpu_rate_table,
+omap3_dsp_rate_table,
+omap3_l3_rate_table);
omap_init_irq();
omap_gpio_init();
sdp3430_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index 2e24812..2dd1350 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -323,7 +323,7 @@ out:
 
 static void __init omap_apollon_init_irq(void)
 {
-   omap2_init_common_hw(NULL, NULL, NULL, NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
omap_gpio_init();
apollon_init_smc91x();
diff --git a/arch/arm/mach-omap2/board-generic.c 
b/arch/arm/mach-omap2/board-generic.c
index be763a9..763329b 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -33,7 +33,7 @@
 
 static void __init omap_generic_init_irq(void)
 {
-   omap2_init_common_hw(NULL, NULL, NULL, NULL);
+   omap2_init_common_hw(NULL, NULL, NULL, NULL, NULL);
omap_init_irq();
 }
 
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 8f54939..17c359

Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-03 Thread Jean Pihet
Hi Paul,

OK I will rework the code and send a patch when done.

Regards,
Jean

On Wednesday 03 June 2009 01:40:13 Paul Walmsley wrote:
> Hi Jean,
>
> a minor request: it is easier to comment on these patches if they are
> included inline in the E-mail message, rather than attached.  That way
> code comments can be inlined in the reply.
>
> On Tue, 26 May 2009, Jean Pihet wrote:
> > Here is a patch for the SDRC 2nd CS support. It applies on top of the
> > current pm branch.
>
> Thanks for doing this work.
>
> > I have some questions:
> > - Is it OK to copy the micron sdram params file to a new file with the 2
> > CSes params? One could use a unique file with #ifdef SDRC_SUPPORT_2_CSES.
>
> Is it possible for the SDRAM parameter files to remain unchanged, and to
> simply pass two struct omap_sdrc_params * to omap2_init_common_hw() and
> then to omap2_sdrc_init()?  Boards with only CS0 in use should pass NULL
> for the second omap_sdrc_params *.
>
> So something like this (I realize the PM branch has additional parameters
> here also):
>
> void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
>  struct omap_sdrc_params *sdrc_cs1)
>
> Then:
>
> void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
> struct omap_sdrc_params *sdrc_cs1)
>
> I would prefer that approach.
>
> It would also be good to avoid changing the SDRC CS1 parameters in the
> SRAM code if the board does not use CS1.  Maybe pass in a flag that
> indicates whether CS1 is in use, and if not, avoid programming those
> registers?  The (admittedly minor) overhead of loading the CS1 registers
> off the stack would be nice to avoid also.
>
> > - Does the RX51 board have 2 sdram parts? If so I need to update the
> > board file as well.
>
> Probably best if someone from Nokia handles this.
>
>
> - Paul


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-06-02 Thread Paul Walmsley
Hi Jean,

a minor request: it is easier to comment on these patches if they are 
included inline in the E-mail message, rather than attached.  That way 
code comments can be inlined in the reply.

On Tue, 26 May 2009, Jean Pihet wrote:

> Here is a patch for the SDRC 2nd CS support. It applies on top of the current 
> pm branch.

Thanks for doing this work.

> I have some questions:
> - Is it OK to copy the micron sdram params file to a new file with the 2 CSes 
> params? One could use a unique file with #ifdef SDRC_SUPPORT_2_CSES.

Is it possible for the SDRAM parameter files to remain unchanged, and to 
simply pass two struct omap_sdrc_params * to omap2_init_common_hw() and 
then to omap2_sdrc_init()?  Boards with only CS0 in use should pass NULL 
for the second omap_sdrc_params *.

So something like this (I realize the PM branch has additional parameters 
here also):

void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 struct omap_sdrc_params *sdrc_cs1)

Then:

void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1)

I would prefer that approach.

It would also be good to avoid changing the SDRC CS1 parameters in the 
SRAM code if the board does not use CS1.  Maybe pass in a flag that 
indicates whether CS1 is in use, and if not, avoid programming those 
registers?  The (admittedly minor) overhead of loading the CS1 registers 
off the stack would be nice to avoid also.

> - Does the RX51 board have 2 sdram parts? If so I need to update the board 
> file as well.

Probably best if someone from Nokia handles this.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH] OMAP3: add support for 2 SDRAM chip selects (was: Re: Beagleboard rev C memory timings & suspend/resume)

2009-05-26 Thread Jean Pihet
Hi Paul, Kevin,

Here is a patch for the SDRC 2nd CS support. It applies on top of the current 
pm branch.

I have some questions:
- Is it OK to copy the micron sdram params file to a new file with the 2 CSes 
params? One could use a unique file with #ifdef SDRC_SUPPORT_2_CSES.
- Does the RX51 board have 2 sdram parts? If so I need to update the board 
file as well.

Comments are welcome.

Regards,
Jean

From 517f52f4bef8225c5921b55ecd96eda2e0c4b697 Mon Sep 17 00:00:00 2001
From: Jean Pihet 
Date: Tue, 26 May 2009 14:55:57 +0200
Subject: [PATCH] OMAP3: add support for 2 SDRAM chip selects

Some boards (Beagle Cx, Overo) have 2 SDRAM parts
connected to the SDRC.

This patch adds the following:
- ensure that the CKE signals mux settings are correct
- extend the omap_sdrc_params struct with the 2nd CS params
- add a new file for the micron sdram params for 2 CSes
- adapt the sram sleep code to configure the SDRC for the 2nd CS

Thanks to Paul Walmsley and Kevin Hilman for the suggestions
and code reviews.

Tested on Beagleboard rev C2 and B5.

Signed-off-by: Jean Pihet 

On Monday 11 May 2009 22:27:50 Paul Walmsley wrote:
> Hi Jean,
>
> On Mon, 11 May 2009, Jean Pihet wrote:
> > On Saturday 09 May 2009 00:43:43 Paul Walmsley wrote:
> > > One possibility: perhaps the problem is with Beagle's pin mux settings.
> > > You might want to boot with mem=128M and make sure
> > > CONTROL_PADCONF_SAD2D_SBUSFLAG and CONTROL_PADCONF_SDRC_CKE1 are in
> > > mode 0 before suspend and after resume.
> >
> > Yes that definitely is the root cause. I should have checked this first
> > ;-( The U-Boot change is committed, cf.
> > http://gitorious.org/u-boot-omap3/mainline/commit/c6f01ad390308800693c62d
> >bdb096ab59e03630b and
> > http://gitorious.org/u-boot-omap3/mainline/commit/4025cfbde3611b14c0d4831
> >a5524e5e061128e30
>
> Nice work!
>
> Sounds like we should also patch mach-omap2/sdrc.c:omap2_sdrc_init() to
> warn if the sdrc_cke1 pin mux is wrong if a second struct omap_sdrc_params
> * is passed.  Probably board-omap3beagle.c should also remux the pad if
> it's wrong.  Otherwise there will be a lot of unhappy Rev C BeagleBoard
> users.
>
> > I am looking at a fix for the SDRC setup with 2 CSes. I will propose the
> > changes asap.
>
> Excellent, thanks Jean.
>
>
> - Paul


From 517f52f4bef8225c5921b55ecd96eda2e0c4b697 Mon Sep 17 00:00:00 2001
From: Jean Pihet 
Date: Tue, 26 May 2009 14:55:57 +0200
Subject: [PATCH] OMAP3: add support for 2 SDRAM chip selects

Some boards (Beagle Cx, Overo) have 2 SDRAM parts
connected to the SDRC.

This patch adds the following:
- ensure that the CKE signals mux settings are correct
- extend the omap_sdrc_params struct with the 2nd CS params
- add a new file for the micron sdram params for 2 CSes
- adapt the sram sleep code to configure the SDRC for the 2nd CS

Thanks to Paul Walmsley and Kevin Hilman for the suggestions
and code reviews.

Tested on Beagleboard rev C2 and B5.

Signed-off-by: Jean Pihet 
---
 arch/arm/mach-omap2/board-omap3beagle.c|6 +-
 arch/arm/mach-omap2/board-overo.c  |6 +-
 arch/arm/mach-omap2/board-rx51-sdram.c |8 +-
 arch/arm/mach-omap2/clock34xx.c|   18 ++-
 arch/arm/mach-omap2/mux.c  |6 +
 .../mach-omap2/sdram-micron-mt46h32m32lf-6-2cses.h |   93 ++
 arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6.h  |   60 +-
 .../mach-omap2/sdram-qimonda-hyb18m512160af-6.h|   40 +++---
 arch/arm/mach-omap2/sdrc.c |   15 ++-
 arch/arm/mach-omap2/sram34xx.S |  128 +++-
 arch/arm/plat-omap/include/mach/mux.h  |4 +
 arch/arm/plat-omap/include/mach/sdrc.h |   23 +++--
 arch/arm/plat-omap/include/mach/sram.h |   12 +-
 arch/arm/plat-omap/sram.c  |   34 +++--
 14 files changed, 329 insertions(+), 124 deletions(-)
 create mode 100644 arch/arm/mach-omap2/sdram-micron-mt46h32m32lf-6-2cses.h

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7294dbf..7128213 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -110,7 +110,7 @@ static struct platform_device omap3beagle_nand_device = {
 	.resource	= &omap3beagle_nand_resource,
 };
 
-#include "sdram-micron-mt46h32m32lf-6.h"
+#include "sdram-micron-mt46h32m32lf-6-2cses.h"
 
 static struct omap_uart_config omap3_beagle_uart_config __initdata = {
 	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
@@ -441,6 +441,10 @@ static void __init omap3_beagle_init(void)
 	usb_musb_init();
 	usb_ehci_init();
 	omap3beagle_flash_init();
+
+	/* Ensure SDRC pins are mux'd for self-refresh */
+	omap_cfg_reg(H16_34XX_SDRC_CKE0);
+	omap_cfg_reg(H17_34XX_SDRC_CKE1);
 }
 
 static void __init omap3_beagle_map_io(void)
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 9eae608..a6ac353 100