From: Artem Lapkin Date: Thu, 27 May 2021 07:35:28 +0000 (+0800) Subject: VIM3: mmc_get_env_dev correct non emmc boot sources X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=786c514946d485b009f49f8cb2231b83dfb22718;p=u-boot.git VIM3: mmc_get_env_dev correct non emmc boot sources need return -1 if boot source is not EMMC or SD ( for example it will be useful if we have multy env sources configuration and device was booted from SPI flash and env need read from SPI not from mmc ) Signed-off-by: Artem Lapkin Reviewed-by: Jaehoon Chung Signed-off-by: Neil Armstrong --- diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c index 6cd5f2e115..71aaa0d804 100644 --- a/board/amlogic/vim3/vim3.c +++ b/board/amlogic/vim3/vim3.c @@ -19,9 +19,15 @@ int mmc_get_env_dev(void) { - if (meson_get_boot_device() == BOOT_DEVICE_EMMC) + switch (meson_get_boot_device()) { + case BOOT_DEVICE_EMMC: return 2; - return 1; + case BOOT_DEVICE_SD: + return 1; + default: + /* boot device is not EMMC|SD */ + return -1; + } } /*