summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-05-11 07:45:00 -0700
committerBin Meng <bmeng.cn@gmail.com>2016-05-23 15:18:00 +0800
commit0c2b7eef97b00c3d1e5545518b2647b8fbf42537 (patch)
treecab1f41b8bda5bd47c63717a41fa10075cb879ee /arch/x86
parent789b6dceccbb852b0be235334b713467f88e2f8e (diff)
downloadblackbird-obmc-uboot-0c2b7eef97b00c3d1e5545518b2647b8fbf42537.tar.gz
blackbird-obmc-uboot-0c2b7eef97b00c3d1e5545518b2647b8fbf42537.zip
x86: Unify reserve_arch() for all x86 boards
Instead of asking each platform to provide reserve_arch(), supply it in arch/x86/cpu/cpu.c in a unified way. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/baytrail/valleyview.c8
-rw-r--r--arch/x86/cpu/broadwell/sdram.c5
-rw-r--r--arch/x86/cpu/cpu.c12
-rw-r--r--arch/x86/cpu/ivybridge/sdram.c5
-rw-r--r--arch/x86/cpu/quark/quark.c9
5 files changed, 12 insertions, 27 deletions
diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c
index 25382f9aab..b31f24e262 100644
--- a/arch/x86/cpu/baytrail/valleyview.c
+++ b/arch/x86/cpu/baytrail/valleyview.c
@@ -53,14 +53,6 @@ int arch_misc_init(void)
return 0;
}
-int reserve_arch(void)
-{
-#ifdef CONFIG_ENABLE_MRC_CACHE
- return mrccache_reserve();
-#else
- return 0;
-#endif
-}
#endif
void reset_cpu(ulong addr)
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index 4bf5d15b26..e7befde6ad 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -190,11 +190,6 @@ static int prepare_mrc_cache(struct pei_data *pei_data)
return 0;
}
-int reserve_arch(void)
-{
- return mrccache_reserve();
-}
-
int dram_init(void)
{
struct pei_data _pei_data __aligned(8);
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 1482153d8b..2e27d782d1 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -29,6 +29,7 @@
#include <asm/lapic.h>
#include <asm/microcode.h>
#include <asm/mp.h>
+#include <asm/mrccache.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
#include <asm/post.h>
@@ -751,3 +752,14 @@ int cpu_init_r(void)
return 0;
}
+
+#ifndef CONFIG_EFI_STUB
+int reserve_arch(void)
+{
+#ifdef CONFIG_ENABLE_MRC_CACHE
+ return mrccache_reserve();
+#else
+ return 0;
+#endif
+}
+#endif
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index e35e543c3e..9d9f63d70c 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -201,11 +201,6 @@ static int recovery_mode_enabled(void)
return false;
}
-int reserve_arch(void)
-{
- return mrccache_reserve();
-}
-
static int copy_spd(struct udevice *dev, struct pei_data *peid)
{
const void *data;
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index afb3463797..cf3fe7fb89 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -360,12 +360,3 @@ void board_final_cleanup(void)
return;
}
-
-int reserve_arch(void)
-{
-#ifdef CONFIG_ENABLE_MRC_CACHE
- return mrccache_reserve();
-#else
- return 0;
-#endif
-}
OpenPOWER on IntegriCloud