[PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources
Neil Armstrong
narmstrong at baylibre.com
Thu May 27 09:43:16 CEST 2021
On 27/05/2021 09:35, Artem Lapkin wrote:
> 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 <art at khadas.com>
> ---
> board/amlogic/vim3/vim3.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c
> index 6cd5f2e1..71aaa0d8 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;
> + }
> }
>
> /*
>
Looks fine, I'll let other comment on it and apply it if it's ok for everyone,
Neil
More information about the U-Boot
mailing list