aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/st/stm32mp1/stm32mp1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 45f2ca8..fff1880 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -890,8 +890,10 @@ const char *env_ext4_get_dev_part(void)
int mmc_get_env_dev(void)
{
- if (CONFIG_SYS_MMC_ENV_DEV >= 0)
- return CONFIG_SYS_MMC_ENV_DEV;
+ const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1));
+
+ if (mmc_env_dev >= 0)
+ return mmc_env_dev;
/* use boot instance to select the correct mmc device identifier */
return mmc_get_boot();