]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: spl: Reduce priority of the basic SPL image loader
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:11:39 +0000 (08:11 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:35 +0000 (13:57 +0800)
This image loader works on systems where the flash is directly mapped to
the last part of the 32-bit address space. On recent Intel systems (such
as apollolake) this is not the case.

Reduce the priority of this loader so that another one can override it.

While we are here, rename the loader to BOOT_DEVICE_SPI_MMAP since
BOOT_DEVICE_BOARD is not very descriptive.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/spl.h
arch/x86/lib/spl.c
arch/x86/lib/tpl.c

index 27432b2897913daadc6c7bfb701b87eaa074a486..1bef4877eb33ce57485a4cfe7c58ba09e95bcba5 100644 (file)
@@ -10,8 +10,7 @@
 #define CONFIG_SPL_BOARD_LOAD_IMAGE
 
 enum {
-       BOOT_DEVICE_SPI         = 10,
-       BOOT_DEVICE_BOARD,
+       BOOT_DEVICE_SPI_MMAP    = 10,
        BOOT_DEVICE_CROS_VBOOT,
 };
 
index 01a96d294bb6c30edd4fee2011826e0400e5b8c9..a73949130354f7fe580f6f09de130e3a629ddc9d 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/mrccache.h>
 #include <asm/mtrr.h>
 #include <asm/processor.h>
+#include <asm/spl.h>
 #include <asm-generic/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -142,7 +143,7 @@ void board_init_f_r(void)
 
 u32 spl_boot_device(void)
 {
-       return BOOT_DEVICE_BOARD;
+       return BOOT_DEVICE_SPI_MMAP;
 }
 
 int spl_start_uboot(void)
@@ -168,7 +169,7 @@ static int spl_board_load_image(struct spl_image_info *spl_image,
 
        return 0;
 }
-SPL_LOAD_IMAGE_METHOD("SPI", 0, BOOT_DEVICE_BOARD, spl_board_load_image);
+SPL_LOAD_IMAGE_METHOD("SPI", 5, BOOT_DEVICE_SPI_MMAP, spl_board_load_image);
 
 int spl_spi_load_image(void)
 {
index 3e662a8bdafcb5e51f3f38c28371df20011cf67e..cfefa78045e37120d9e42f121ee63a8d6bc95c13 100644 (file)
@@ -71,7 +71,7 @@ void board_init_f_r(void)
 u32 spl_boot_device(void)
 {
        return IS_ENABLED(CONFIG_CHROMEOS) ? BOOT_DEVICE_CROS_VBOOT :
-               BOOT_DEVICE_BOARD;
+               BOOT_DEVICE_SPI_MMAP;
 }
 
 int spl_start_uboot(void)
@@ -97,7 +97,7 @@ static int spl_board_load_image(struct spl_image_info *spl_image,
 
        return 0;
 }
-SPL_LOAD_IMAGE_METHOD("SPI", 0, BOOT_DEVICE_BOARD, spl_board_load_image);
+SPL_LOAD_IMAGE_METHOD("SPI", 5, BOOT_DEVICE_SPI_MMAP, spl_board_load_image);
 
 int spl_spi_load_image(void)
 {