public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Holger Brunck <holger.brunck@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/83xx: fix sdram initialization for keymile boards
Date: Thu, 10 Nov 2011 15:32:54 +0100	[thread overview]
Message-ID: <4EBBE096.9010304@keymile.com> (raw)
In-Reply-To: <4EBBBCA5.7070501@denx.de>

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

  reply	other threads:[~2011-11-10 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBBE096.9010304@keymile.com \
    --to=holger.brunck@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox