]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Unify reserve_arch() for all x86 boards
authorBin Meng <bmeng.cn@gmail.com>
Wed, 11 May 2016 14:45:00 +0000 (07:45 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 23 May 2016 07:18:00 +0000 (15:18 +0800)
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>
arch/x86/cpu/baytrail/valleyview.c
arch/x86/cpu/broadwell/sdram.c
arch/x86/cpu/cpu.c
arch/x86/cpu/ivybridge/sdram.c
arch/x86/cpu/quark/quark.c

index 25382f9aab1efdb8e944b2094786fc64c8f0b570..b31f24e262abf09c254607083c898c2391429fbe 100644 (file)
@@ -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)
index 4bf5d15b266bdac6f059f6cec2b88faea198cd18..e7befde6ad4070ff1fa4732b176660903d7b0f3d 100644 (file)
@@ -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);
index 1482153d8b58c945773765b5a275cc2a21e99072..2e27d782d1bd76334651fedf1b9e8711ab0f7bd9 100644 (file)
@@ -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
index e35e543c3e69ff6156e91230488c59cef081e42c..9d9f63d70c6974bd523c43190c47c77bc926825a 100644 (file)
@@ -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;
index afb346379737aec709ae8b731ef19b15eb7f5f1f..cf3fe7fb89a82eeeace37e7f41d680ecc1474829 100644 (file)
@@ -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
-}