Skip to contentSkip to conversation

edb93xx: Fix SDRAM initialization

PATCH In review Matthias Kaehlcke 2 participants 2 messages Feb 10, 2010 – Feb 12, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 edb93xx: Fix SDRAM initialization

Before programming the SDRAM mode registers, mode register update mode must be selected by setting the MRS bit and clearing INIT in GlConfig

---
 board/edb93xx/sdram_cfg.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
board/edb93xx/sdram_cfg.c +5 -0
index 9f56f72..25b214b 100644
@@ -111,6 +111,11 @@ static void setup_refresh_timer(void)
 
 static void program_mode_registers(void)
 {
+	struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE;
+
+	/* Select mode register update mode */
+	writel(GLCONFIG_MRS | GLCONFIG_CKE, &sdram->glconfig);
+
 	PROGRAM_MODE_REG(0);
 
 #if (CONFIG_EP93XX_SDRAM_NUM_BANKS >= 2)
Signature · 7 lines
1.6.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 4 lines · Matthias Kaehlcke

Before programming the SDRAM mode registers, mode register update mode must be selected by setting the MRS bit and clearing INIT in GlConfig

Ok, applied

Sascha

Quoted 29 lines
---
 board/edb93xx/sdram_cfg.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
board/edb93xx/sdram_cfg.c +5 -0
index 9f56f72..25b214b 100644
@@ -111,6 +111,11 @@ static void setup_refresh_timer(void)
 
 static void program_mode_registers(void)
 {
+	struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE;
+
+	/* Select mode register update mode */
+	writel(GLCONFIG_MRS | GLCONFIG_CKE, &sdram->glconfig);
+
 	PROGRAM_MODE_REG(0);
 
 #if (CONFIG_EP93XX_SDRAM_NUM_BANKS >= 2)
Signature · 7 lines
1.6.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox