From 70170a678f3b75f4898ef4e867484b2212062caf Mon Sep 17 00:00:00 2001 From: Ye Li Date: Fri, 17 Mar 2017 16:23:46 +0800 Subject: [PATCH] MLK-14445-8 mx7ulp_evk: Add dynamical MMC device detection Add board_late_mmc_env_init to support MMC device detection for environment variables. Signed-off-by: Ye Li (cherry picked from commit 6c2fe5b60692e7d0e86383c44792e5f2938bfa14) (cherry picked from commit 74f5fffe9aee3e1434b63b95e33e7ecc7e5a2b08) (cherry picked from commit 74b505dd70fc5ba5bb00ec0359ec6f79be757388) (cherry picked from commit b3f5ed546092f557e0a68c78e181990e0a637af8) (cherry picked from commit 1ae79a71818aec55613456b408e3e1fa4d0e7be3) --- board/freescale/mx7ulp_evk/mx7ulp_evk.c | 14 ++++++++++++++ configs/mx7ulp_evk_defconfig | 1 + configs/mx7ulp_evk_plugin_defconfig | 1 + 3 files changed, 16 insertions(+) diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index ce58cc05d8..e7f5a3b7c8 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -168,3 +168,17 @@ add: return 0; } #endif + +int board_mmc_get_env_dev(int devno) +{ + return devno; +} + +int board_late_init(void) +{ +#ifdef CONFIG_ENV_IS_IN_MMC + board_late_mmc_env_init(); +#endif + + return 0; +} diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig index 49372820dd..a6666e06b0 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -11,6 +11,7 @@ CONFIG_TARGET_MX7ULP_EVK=y CONFIG_DEFAULT_DEVICE_TREE="imx7ulp-evk-qspi" CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7ulp_evk/imximage.cfg" +CONFIG_BOARD_LATE_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig index bd4b620ba7..2eab6d1846 100644 --- a/configs/mx7ulp_evk_plugin_defconfig +++ b/configs/mx7ulp_evk_plugin_defconfig @@ -11,6 +11,7 @@ CONFIG_TARGET_MX7ULP_EVK=y CONFIG_DEFAULT_DEVICE_TREE="imx7ulp-evk-qspi" CONFIG_USE_IMXIMG_PLUGIN=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7ulp_evk/imximage.cfg" +CONFIG_BOARD_LATE_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y -- 2.17.1