* [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources
@ 2021-05-27 7:35 ` Artem Lapkin
2021-05-27 7:43 ` Neil Armstrong
2021-05-27 7:51 ` Jaehoon Chung
0 siblings, 2 replies; 3+ messages in thread
From: Artem Lapkin @ 2021-05-27 7:35 UTC (permalink / raw)
To: narmstrong
Cc: u-boot, u-boot-amlogic, m.szyprowski, christianshewitt,
jh80.chung, art, nick, gouwa
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources
2021-05-27 7:35 ` [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources Artem Lapkin
@ 2021-05-27 7:43 ` Neil Armstrong
2021-05-27 7:51 ` Jaehoon Chung
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2021-05-27 7:43 UTC (permalink / raw)
To: Artem Lapkin
Cc: u-boot, u-boot-amlogic, m.szyprowski, christianshewitt,
jh80.chung, art, nick, gouwa
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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources
2021-05-27 7:35 ` [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources Artem Lapkin
2021-05-27 7:43 ` Neil Armstrong
@ 2021-05-27 7:51 ` Jaehoon Chung
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2021-05-27 7:51 UTC (permalink / raw)
To: Artem Lapkin, narmstrong
Cc: u-boot, u-boot-amlogic, m.szyprowski, christianshewitt, art, nick, gouwa
On 5/27/21 4:35 PM, 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@khadas.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> 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;
> + }
> }
>
> /*
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-27 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210527073541epcas1p392c6f080fbaf0bde20dff63385607689@epcas1p3.samsung.com>
2021-05-27 7:35 ` [PATCH] VIM3: mmc_get_env_dev correct non emmc boot sources Artem Lapkin
2021-05-27 7:43 ` Neil Armstrong
2021-05-27 7:51 ` Jaehoon Chung
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.