summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/kirkwood
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-29 22:03:00 +0200
committerWolfgang Denk <wd@denx.de>2010-10-29 22:03:00 +0200
commit0c0892be0d93a5a892b93739c5eb3bf692fed4ff (patch)
treea046b11024bdf0a41082647c95df23a10cb206fc /arch/arm/cpu/arm926ejs/kirkwood
parentd75c2a3d7f34ff1eb9920ad72483cff7cb6d358f (diff)
parent28e57108a61bd0e554d9847170b8ad9dad093e07 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-marvell
Conflicts: include/configs/km_arm.h Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/kirkwood')
-rw-r--r--arch/arm/cpu/arm926ejs/kirkwood/dram.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 342afe9cd0..2441554ae3 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -81,6 +81,16 @@ int dram_init(void)
gd->ram_size += gd->bd->bi_dram[i].size;
}
+
+ for (; i < CONFIG_NR_DRAM_BANKS; i++) {
+ /* If above loop terminated prematurely, we need to set
+ * remaining banks' start address & size as 0. Otherwise other
+ * u-boot functions and Linux kernel gets wrong values which
+ * could result in crash */
+ gd->bd->bi_dram[i].start = 0;
+ gd->bd->bi_dram[i].size = 0;
+ }
+
return 0;
}