summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-09-08 00:45:38 -0700
committerYe Li <ye.li@nxp.com>2020-09-08 19:40:42 -0700
commite6db58b5e0846a9610e65d9f5549ba9d006b4305 (patch)
treec3389ba6d240cb7e3cf4433d2545541115c02b6c /board/freescale
parent5775dd85750a67a585f7b0a177406a3a9eae6ad7 (diff)
MLK-24750-2 iMX8DXL: Implement the spl_board_boot_device for EVK and VAL
Re-map the boot devices of iMX8DXL EVK and VAL with SPL devices. DDR3 Validation board does not have eMMC, so SD2 should be the first mmc device with index 0. Otherwise, mmc uclass will fail to get the device with default index 1. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/imx8dxl_evk/spl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/freescale/imx8dxl_evk/spl.c b/board/freescale/imx8dxl_evk/spl.c
index 53782cefc6..bd98d0852b 100644
--- a/board/freescale/imx8dxl_evk/spl.c
+++ b/board/freescale/imx8dxl_evk/spl.c
@@ -13,9 +13,32 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <bootm.h>
+#include <asm/mach-imx/boot_mode.h>
DECLARE_GLOBAL_DATA_PTR;
+int spl_board_boot_device(enum boot_device boot_dev_spl)
+{
+ switch (boot_dev_spl) {
+ case MMC1_BOOT:
+ return BOOT_DEVICE_MMC1;
+ case SD2_BOOT:
+#ifdef CONFIG_TARGET_IMX8DXL_DDR3_VAL
+ return BOOT_DEVICE_MMC1;
+#else
+ return BOOT_DEVICE_MMC2_2;
+#endif
+ case FLEXSPI_BOOT:
+ return BOOT_DEVICE_SPI;
+ case NAND_BOOT:
+ return BOOT_DEVICE_NAND;
+ case USB_BOOT:
+ return BOOT_DEVICE_BOARD;
+ default:
+ return BOOT_DEVICE_NONE;
+ }
+}
+
void spl_board_init(void)
{
struct udevice *dev;