]> git.sur5r.net Git - u-boot/commitdiff
powerpc/83xx: fix sdram initialization for keymile boards
authorAndreas Huber <andreas.huber@keymile.com>
Thu, 10 Nov 2011 14:52:43 +0000 (15:52 +0100)
committerKim Phillips <kim.phillips@freescale.com>
Fri, 11 Nov 2011 22:41:04 +0000 (16:41 -0600)
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>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
board/keymile/km83xx/km83xx.c

index 17560c8dbae52ba8c028d7b76aa378d7736280e9..16ae2e4c3cc7fb2937ee9699f9449bc354644ab7 100644 (file)
@@ -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();