The configuration of SDRAM needs two more writel() operations, otherwise some boards won't be able to boot. These additional writes are present in vendor assembly code but were forgotten during the rewriting in C.
Signed-off-by: Alessandro Rubini <rub...@gnudd.com> Acked-by: Matthias Kaehlcke <matth...@kaehlcke.net> --- board/edb93xx/sdram_cfg.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/board/edb93xx/sdram_cfg.c b/board/edb93xx/sdram_cfg.c index 6155f0e..418959a 100644 --- a/board/edb93xx/sdram_cfg.c +++ b/board/edb93xx/sdram_cfg.c @@ -59,13 +59,15 @@ void sdram_cfg(void) static void force_precharge(void) { + struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE; + + writel(GLCONFIG_INIT | GLCONFIG_CKE, &sdram->glconfig); /* * Errata most EP93xx revisions say that PRECHARGE ALL isn't always * issued. * * Do a read from each bank to make sure they're precharged */ - PRECHARGE_BANK(0); PRECHARGE_BANK(1); PRECHARGE_BANK(2); @@ -101,6 +103,9 @@ static void setup_refresh_timer(void) static void program_mode_registers(void) { + struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE; + + writel(GLCONFIG_MRS | GLCONFIG_CKE, &sdram->glconfig); /* * The mode registers are programmed by performing a read from each * SDRAM bank. The value of the address that is read defines the value -- 1.6.0.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot