MLK-15323-4: imx8m: evk: invoke board_late_mmc_env_init
authorPeng Fan <peng.fan@nxp.com>
Mon, 3 Jul 2017 07:41:17 +0000 (15:41 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:36:59 +0000 (02:36 +0800)
Invoke board_late_mmc_init to support dynamically changing mmcroot.
Add board_mmc_get_env_dev to read/save env into correct mmc/sd device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8mq_evk/imx8m_evk.c

index dbf04e0..0e6bf05 100644 (file)
@@ -362,6 +362,11 @@ int board_init(void)
        return 0;
 }
 
+int board_mmc_get_env_dev(int devno)
+{
+       return devno;
+}
+
 int board_late_init(void)
 {
        struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
@@ -370,6 +375,8 @@ int board_late_init(void)
 
        set_wdog_reset(wdog);
 
+       board_late_mmc_env_init();
+
        return 0;
 }