summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-04-15 11:22:49 +0000
committerSimon Glass <sjg@chromium.org>2013-04-15 16:26:09 -0700
commit8b42dfc3b6a2c9204be2fb1079d235daa1b733fc (patch)
treea9b8da4b5b03016a958ad5e5ce9a0c23522b46b6 /arch/x86
parentcba6494f24d711ba63afb22b1ee691a41fee121c (diff)
downloadu-boot-imx-8b42dfc3b6a2c9204be2fb1079d235daa1b733fc.zip
u-boot-imx-8b42dfc3b6a2c9204be2fb1079d235daa1b733fc.tar.gz
u-boot-imx-8b42dfc3b6a2c9204be2fb1079d235daa1b733fc.tar.bz2
x86: Fix DRAM bank size init with generic board
The intention of the memory init code is that it should work the same with CONFIG_SYS_GENERIC_BOARD and without. This is tricky because dram_init() is called prior to relocation with generic board (matching other archs) and after relocation without generic board. Adjust the init sequence so that dram_init() is not called in the generic board case, which seems like the easiest fix for now. Also ensure that relocation addresses are still calculated. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/coreboot/sdram.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index 786009c..b4fe6c9 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -113,7 +113,7 @@ int dram_init_f(void)
return 0;
}
-int dram_init(void)
+int dram_init_banksize(void)
{
int i, j;
@@ -132,3 +132,8 @@ int dram_init(void)
}
return 0;
}
+
+int dram_init(void)
+{
+ return dram_init_banksize();
+}