aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/cpu/coreboot
diff options
context:
space:
mode:
authorSimon Glass2014-11-06 13:20:05 -0700
committerSimon Glass2014-11-21 07:24:09 +0100
commit07387d1769c7cc29ff2402117148477263c4c5ce (patch)
treed3e88335fbd000096018a6cff5ffdb75b1936363 /arch/x86/cpu/coreboot
parent76f90f3020433a2d06d9ebf897f65862d6248c8e (diff)
x86: Use the standard dram_init() function
Instead of having an x86-specific DRAM init function, adjust things so we can use the normal one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/coreboot')
-rw-r--r--arch/x86/cpu/coreboot/sdram.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index 959feaaea34..ca651c7584e 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -11,6 +11,7 @@
#include <asm/e820.h>
#include <asm/u-boot-x86.h>
#include <asm/global_data.h>
+#include <asm/init_helpers.h>
#include <asm/processor.h>
#include <asm/sections.h>
#include <asm/arch/sysinfo.h>
@@ -79,7 +80,7 @@ ulong board_get_usable_ram_top(ulong total_size)
return (ulong)dest_addr;
}
-int dram_init_f(void)
+int dram_init(void)
{
int i;
phys_size_t ram_size = 0;
@@ -94,7 +95,8 @@ int dram_init_f(void)
gd->ram_size = ram_size;
if (ram_size == 0)
return -1;
- return 0;
+
+ return calculate_relocation_address();
}
int dram_init_banksize(void)
@@ -116,8 +118,3 @@ int dram_init_banksize(void)
}
return 0;
}
-
-int dram_init(void)
-{
- return dram_init_banksize();
-}