* [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards
@ 2011-11-10 10:35 Holger Brunck
2011-11-10 11:59 ` Heiko Schocher
2011-11-10 14:52 ` [U-Boot] [PATCH v2] " Holger Brunck
0 siblings, 2 replies; 7+ messages in thread
From: Holger Brunck @ 2011-11-10 10:35 UTC (permalink / raw)
To: u-boot
From: Andreas Huber <andreas.huber@keymile.com>
commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
introduces a bug according the SDRAM initialization for all
km83xx boards.
im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
was replaced with
out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
and this is wrong, because this overwrites the intial value
CONFIG_SYS_DDR_SDRAM_CFG.
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
---
board/keymile/km83xx/km83xx.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 17560c8..c0238c8 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -217,7 +217,8 @@ int fixed_sdram(void)
out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL);
out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL);
udelay(200);
- out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
+ out_be32(&im->ddr.sdram_cfg,
+ SDRAM_CFG_MEM_EN | CONFIG_SYS_DDR_SDRAM_CFG);
msize = CONFIG_SYS_DDR_SIZE << 20;
disable_addr_trans();
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 10:35 [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards Holger Brunck
@ 2011-11-10 11:59 ` Heiko Schocher
2011-11-10 14:32 ` Holger Brunck
2011-11-10 14:52 ` [U-Boot] [PATCH v2] " Holger Brunck
1 sibling, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2011-11-10 11:59 UTC (permalink / raw)
To: u-boot
Hello Holger,
Holger Brunck wrote:
> From: Andreas Huber <andreas.huber@keymile.com>
>
> commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
> introduces a bug according the SDRAM initialization for all
> km83xx boards.
>
> im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
> was replaced with
> out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
> and this is wrong, because this overwrites the intial value
> CONFIG_SYS_DDR_SDRAM_CFG.
>
> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Heiko Schocher <hs@denx.de>
> cc: Kim Phillips <kim.phillips@freescale.com>
> ---
> board/keymile/km83xx/km83xx.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
> index 17560c8..c0238c8 100644
> --- a/board/keymile/km83xx/km83xx.c
> +++ b/board/keymile/km83xx/km83xx.c
> @@ -217,7 +217,8 @@ int fixed_sdram(void)
> out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL);
> out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL);
> udelay(200);
> - out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
> + out_be32(&im->ddr.sdram_cfg,
> + SDRAM_CFG_MEM_EN | CONFIG_SYS_DDR_SDRAM_CFG);
Wouldn't a
setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
be better?
>
> msize = CONFIG_SYS_DDR_SIZE << 20;
> disable_addr_trans();
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 11:59 ` Heiko Schocher
@ 2011-11-10 14:32 ` Holger Brunck
2011-11-10 14:38 ` Heiko Schocher
0 siblings, 1 reply; 7+ messages in thread
From: Holger Brunck @ 2011-11-10 14:32 UTC (permalink / raw)
To: u-boot
Hi Heiko,
On 11/10/2011 12:59 PM, Heiko Schocher wrote:
> Holger Brunck wrote:
>> From: Andreas Huber <andreas.huber@keymile.com>
>>
>> commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
>> introduces a bug according the SDRAM initialization for all
>> km83xx boards.
>>
>> im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
>> was replaced with
>> out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>> and this is wrong, because this overwrites the intial value
>> CONFIG_SYS_DDR_SDRAM_CFG.
>>
>> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
>> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
>> cc: Heiko Schocher <hs@denx.de>
>> cc: Kim Phillips <kim.phillips@freescale.com>
>> ---
>> board/keymile/km83xx/km83xx.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
>> index 17560c8..c0238c8 100644
>> --- a/board/keymile/km83xx/km83xx.c
>> +++ b/board/keymile/km83xx/km83xx.c
>> @@ -217,7 +217,8 @@ int fixed_sdram(void)
>> out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL);
>> out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL);
>> udelay(200);
>> - out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>> + out_be32(&im->ddr.sdram_cfg,
>> + SDRAM_CFG_MEM_EN | CONFIG_SYS_DDR_SDRAM_CFG);
>
> Wouldn't a
>
> setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>
> be better?
>
yes this works too and is slightly nicer, I will send an updated version.
Thanks!
Best regards
Holger
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 14:32 ` Holger Brunck
@ 2011-11-10 14:38 ` Heiko Schocher
0 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2011-11-10 14:38 UTC (permalink / raw)
To: u-boot
Hello Holger,
Holger Brunck wrote:
> Hi Heiko,
>
> On 11/10/2011 12:59 PM, Heiko Schocher wrote:
>> Holger Brunck wrote:
>>> From: Andreas Huber <andreas.huber@keymile.com>
>>>
>>> commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
>>> introduces a bug according the SDRAM initialization for all
>>> km83xx boards.
>>>
>>> im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
>>> was replaced with
>>> out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>>> and this is wrong, because this overwrites the intial value
>>> CONFIG_SYS_DDR_SDRAM_CFG.
>>>
>>> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
>>> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
>>> cc: Heiko Schocher <hs@denx.de>
>>> cc: Kim Phillips <kim.phillips@freescale.com>
>>> ---
>>> board/keymile/km83xx/km83xx.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
>>> index 17560c8..c0238c8 100644
>>> --- a/board/keymile/km83xx/km83xx.c
>>> +++ b/board/keymile/km83xx/km83xx.c
>>> @@ -217,7 +217,8 @@ int fixed_sdram(void)
>>> out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL);
>>> out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL);
>>> udelay(200);
>>> - out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>>> + out_be32(&im->ddr.sdram_cfg,
>>> + SDRAM_CFG_MEM_EN | CONFIG_SYS_DDR_SDRAM_CFG);
>> Wouldn't a
>>
>> setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
>>
>> be better?
>>
>
> yes this works too and is slightly nicer, I will send an updated version.
Ok, thanks! Please fell free to add my
Acked-by: Heiko Schocher<hs@denx.de>
to it!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 10:35 [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards Holger Brunck
2011-11-10 11:59 ` Heiko Schocher
@ 2011-11-10 14:52 ` Holger Brunck
2011-11-10 16:36 ` Kim Phillips
1 sibling, 1 reply; 7+ messages in thread
From: Holger Brunck @ 2011-11-10 14:52 UTC (permalink / raw)
To: u-boot
From: Andreas Huber <andreas.huber@keymile.com>
commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
introduces a bug according the SDRAM initialization for all
km83xx boards.
im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
was replaced with
out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
and this is wrong, because this overwrites the intial value
CONFIG_SYS_DDR_SDRAM_CFG.
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
---
board/keymile/km83xx/km83xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 17560c8..16ae2e4 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -217,7 +217,7 @@ int fixed_sdram(void)
out_be32(&im->ddr.sdram_interval, CONFIG_SYS_DDR_INTERVAL);
out_be32(&im->ddr.sdram_clk_cntl, CONFIG_SYS_DDR_CLK_CNTL);
udelay(200);
- out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
+ setbits_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
msize = CONFIG_SYS_DDR_SIZE << 20;
disable_addr_trans();
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 14:52 ` [U-Boot] [PATCH v2] " Holger Brunck
@ 2011-11-10 16:36 ` Kim Phillips
2011-11-11 23:10 ` Kim Phillips
0 siblings, 1 reply; 7+ messages in thread
From: Kim Phillips @ 2011-11-10 16:36 UTC (permalink / raw)
To: u-boot
On Thu, 10 Nov 2011 15:52:43 +0100
Holger Brunck <holger.brunck@keymile.com> wrote:
> From: Andreas Huber <andreas.huber@keymile.com>
>
> commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
> introduces a bug according the SDRAM initialization for all
> km83xx boards.
>
> im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
> was replaced with
> out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
> and this is wrong, because this overwrites the intial value
> CONFIG_SYS_DDR_SDRAM_CFG.
>
> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Acked-by: Heiko Schocher <hs@denx.de>
> cc: Kim Phillips <kim.phillips@freescale.com>
> ---
good catch.
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Kim
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2] powerpc/83xx: fix sdram initialization for keymile boards
2011-11-10 16:36 ` Kim Phillips
@ 2011-11-11 23:10 ` Kim Phillips
0 siblings, 0 replies; 7+ messages in thread
From: Kim Phillips @ 2011-11-11 23:10 UTC (permalink / raw)
To: u-boot
On Thu, 10 Nov 2011 10:36:18 -0600
Kim Phillips <kim.phillips@freescale.com> wrote:
> On Thu, 10 Nov 2011 15:52:43 +0100
> Holger Brunck <holger.brunck@keymile.com> wrote:
>
> > From: Andreas Huber <andreas.huber@keymile.com>
> >
> > commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
> > introduces a bug according the SDRAM initialization for all
> > km83xx boards.
> >
> > im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
> > was replaced with
> > out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
> > and this is wrong, because this overwrites the intial value
> > CONFIG_SYS_DDR_SDRAM_CFG.
> >
> > Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
> > Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> > Acked-by: Heiko Schocher <hs@denx.de>
> > cc: Kim Phillips <kim.phillips@freescale.com>
> > ---
>
> good catch.
>
> Acked-by: Kim Phillips <kim.phillips@freescale.com>
Just noticed this can go through 83xx, so I've applied it to
mpc83xx/master.
Kim
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-11 23:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10 10:35 [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards Holger Brunck
2011-11-10 11:59 ` Heiko Schocher
2011-11-10 14:32 ` Holger Brunck
2011-11-10 14:38 ` Heiko Schocher
2011-11-10 14:52 ` [U-Boot] [PATCH v2] " Holger Brunck
2011-11-10 16:36 ` Kim Phillips
2011-11-11 23:10 ` Kim Phillips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox