Message ID | 1320936763-32197-1-git-send-email-holger.brunck@keymile.com |
---|---|
State | Accepted |
Delegated to: | Kim Phillips |
Headers | show |
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
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
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();