From: Artem Lapkin <email2tema@gmail.com>
To: narmstrong@baylibre.com
Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io,
m.szyprowski@samsung.com, christianshewitt@gmail.com,
jh80.chung@samsung.com, art@khadas.com, nick@khadas.com,
gouwa@khadas.com
Subject: [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources
Date: Thu, 27 May 2021 15:35:28 +0800 [thread overview]
Message-ID: <20210527073528.87293-1-art@khadas.com> (raw)
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@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;
+ }
}
/*
--
2.25.1
next reply other threads:[~2021-05-27 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210527073541epcas1p392c6f080fbaf0bde20dff63385607689@epcas1p3.samsung.com>
2021-05-27 7:35 ` Artem Lapkin [this message]
2021-05-27 7:43 ` [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources Neil Armstrong
2021-05-27 7:51 ` Jaehoon Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210527073528.87293-1-art@khadas.com \
--to=email2tema@gmail.com \
--cc=art@khadas.com \
--cc=christianshewitt@gmail.com \
--cc=gouwa@khadas.com \
--cc=jh80.chung@samsung.com \
--cc=m.szyprowski@samsung.com \
--cc=narmstrong@baylibre.com \
--cc=nick@khadas.com \
--cc=u-boot-amlogic@groups.io \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.