From 74b505dd70fc5ba5bb00ec0359ec6f79be757388 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) --- board/freescale/mx7ulp_evk/mx7ulp_evk.c | 14 ++++++++++++++ configs/mx7ulp_evk_defconfig | 2 ++ configs/mx7ulp_evk_plugin_defconfig | 2 ++ include/configs/mx7ulp_evk.h | 2 -- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index 309b8c1502..4877c14465 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -189,3 +189,17 @@ int board_init(void) return 0; } + +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 c9f2ec8229..25cd9aa9da 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -5,6 +5,8 @@ CONFIG_TARGET_MX7ULP_EVK=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7ulp_evk/imximage.cfg" CONFIG_BOUNCE_BUFFER=y +CONFIG_BOARD_LATE_INIT=y +CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig index 77c740309b..91f8ce55e0 100644 --- a/configs/mx7ulp_evk_plugin_defconfig +++ b/configs/mx7ulp_evk_plugin_defconfig @@ -6,6 +6,8 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_USE_IMXIMG_PLUGIN=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7ulp_evk/imximage.cfg" CONFIG_BOUNCE_BUFFER=y +CONFIG_BOARD_LATE_INIT=y +CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h index e2561c4141..515f8404f8 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -55,8 +55,6 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M) -#define CONFIG_BOARD_EARLY_INIT_F - /* UART */ #define LPUART_BASE LPUART4_RBASE -- 2.17.1