summaryrefslogtreecommitdiff
path: root/cpu/mpc83xx/spd_sdram.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-01-12 23:30:40 +0100
committerWolfgang Denk <wd@denx.de>2010-01-12 23:30:40 +0100
commit02c631e6eec5439daea46f8cbdb1572b0df3c843 (patch)
treebdc82731cdc493dfe35c13f39f985199c8bd5ba3 /cpu/mpc83xx/spd_sdram.c
parent8b0ab304943b07d13a29db6d3d2ca3edad32cdcb (diff)
parenta3f5da1bee9a8c343a411080d7d468bdc78794a4 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
Diffstat (limited to 'cpu/mpc83xx/spd_sdram.c')
-rw-r--r--cpu/mpc83xx/spd_sdram.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu/mpc83xx/spd_sdram.c b/cpu/mpc83xx/spd_sdram.c
index 0f611804a07..44aaa9abc21 100644
--- a/cpu/mpc83xx/spd_sdram.c
+++ b/cpu/mpc83xx/spd_sdram.c
@@ -29,6 +29,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/io.h>
#include <i2c.h>
#include <spd.h>
#include <asm/mmu.h>
@@ -150,6 +151,14 @@ long int spd_sdram()
unsigned int ddrc_ecc_enable;
unsigned int pvr = get_pvr();
+ /*
+ * First disable the memory controller (could be enabled
+ * by the debugger)
+ */
+ clrsetbits_be32(&ddr->sdram_cfg, SDRAM_CFG_MEM_EN, 0);
+ sync();
+ isync();
+
/* Read SPD parameters with I2C */
CONFIG_SYS_READ_SPD(SPD_EEPROM_ADDRESS, 0, 1, (uchar *) & spd, sizeof (spd));
#ifdef SPD_DEBUG