diff options
author | Ye Li <ye.li@nxp.com> | 2019-02-19 00:07:33 -0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2019-02-19 00:07:33 -0800 |
commit | 675cc6031033fbe5e7d8cfe01ebe1dedfd6c1b96 (patch) | |
tree | 1d0d4bdc7465573e54e5d5c43c35c5d8832fe7a0 /arch | |
parent | 7ea7a16fd892558098fb8cbea134ac275d1220d3 (diff) |
MLK-20945-5 imx8: Select boot device dynamically
For fspi build, we will enable both SPL NOR support and SPL SPI
support. SPL will dynamically check the resource owner then
select corresponding boot device.
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/imx8/cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index 50aa4638768..abb6dc790d3 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -29,6 +29,7 @@ #include <asm/setup.h> #include <asm/arch/lpcg.h> #include <asm/mach-imx/imx_vservice.h> +#include <spl.h> DECLARE_GLOBAL_DATA_PTR; @@ -1957,3 +1958,14 @@ int board_imx_lpi2c_bind(struct udevice *dev) return -ENODEV; } + +void board_boot_order(u32 *spl_boot_list) +{ + spl_boot_list[0] = spl_boot_device(); + + if (spl_boot_list[0] == BOOT_DEVICE_SPI) { + /* Check whether we own the flexspi0, if not, use NOR boot */ + if (!check_owned_resource(SC_R_FSPI_0)) + spl_boot_list[0] = BOOT_DEVICE_NOR; + } +} |