]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/x86/lib/init_helpers.c
x86: qemu: Support operation as an EFI payload
[karo-tx-uboot.git] / arch / x86 / lib / init_helpers.c
index be4eb12c53c0e5f12dbe3af235a10d0fdf6b9392..4fd47fc0360e0f915594d60b1f700ffdea0dca07 100644 (file)
@@ -7,6 +7,8 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <spi.h>
+#include <asm/errno.h>
+#include <asm/mtrr.h>
 #include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -66,6 +68,14 @@ int calculate_relocation_address(void)
 
 int init_cache_f_r(void)
 {
+#if defined(CONFIG_X86_RESET_VECTOR) & !defined(CONFIG_HAVE_FSP)
+       int ret;
+
+       ret = mtrr_commit(false);
+       /* If MTRR MSR is not implemented by the processor, just ignore it */
+       if (ret && ret != -ENOSYS)
+               return ret;
+#endif
        /* Initialise the CPU cache(s) */
        return init_cache();
 }
@@ -79,11 +89,3 @@ int init_bd_struct_r(void)
 
        return 0;
 }
-
-int init_func_spi(void)
-{
-       puts("SPI:   ");
-       spi_init();
-       puts("ready\n");
-       return 0;
-}