imx: spl: add spl_board_boot_device for i.MX8MM
authorPeng Fan <peng.fan@nxp.com>
Tue, 27 Aug 2019 06:25:07 +0000 (06:25 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:36:36 +0000 (16:36 +0200)
Differnet board has different controller used, it is
hard to use one layout for them all.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/spl.c

index f33b9f09622cd8451d954809113edde2e117c8cc..30fa6aeb25fdb02d224b7bdf6ac8f9ce81b9cba6 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+__weak int spl_board_boot_device(enum boot_device boot_dev_spl)
+{
+       return 0;
+}
+
 #if defined(CONFIG_MX6)
 /* determine boot device from SRC_SBMR1 (BOOT_CFG[4:1]) or SRC_GPR9 register */
 u32 spl_boot_device(void)
@@ -132,6 +137,9 @@ u32 spl_boot_device(void)
 
        enum boot_device boot_device_spl = get_boot_device();
 
+       if (IS_ENABLED(CONFIG_IMX8MM))
+               return spl_board_boot_device(boot_device_spl);
+
        switch (boot_device_spl) {
 #if defined(CONFIG_MX7)
        case SD1_BOOT: