All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rockchip: Fix MMC boot order
@ 2021-06-17  9:01 Alex Bee
  2021-06-18  2:23 ` Kever Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bee @ 2021-06-17  9:01 UTC (permalink / raw)
  To: u-boot; +Cc: Alex Bee

Basically all, i.e. rk3036.dtsi, rk3128.dtsi, rk3xxx.dtsi, rk322x.dtsi,
rk3288.dtsi, rk3308-u-boot.dtsi, rk3328-u-boot.dtsi, rk3399-u-boot.dtsi
and px30-u-boot.dtsi Rockchip SoC devicetrees which have mmc indexes
are defining eMMC as mmc0 and sdmmc as mmc1.
This means that the rule to try to boot from the SD card first is ignored,
which as per comment is what we want and is important for distros, which
rely on that.

Fix this by setting the correct mmc index, i.e. first from mmc1 (SD card),
second from mmc0 (eMMC).

Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
 include/configs/rockchip-common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 0b9e24d1db..ba7061a287 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -14,11 +14,11 @@
 
 #ifndef CONFIG_SPL_BUILD
 
-/* First try to boot from SD (index 0), then eMMC (index 1) */
+/* First try to boot from SD (index 1), then eMMC (index 0) */
 #if CONFIG_IS_ENABLED(CMD_MMC)
 	#define BOOT_TARGET_MMC(func) \
-		func(MMC, mmc, 0) \
-		func(MMC, mmc, 1)
+		func(MMC, mmc, 1) \
+		func(MMC, mmc, 0)
 #else
 	#define BOOT_TARGET_MMC(func)
 #endif
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rockchip: Fix MMC boot order
  2021-06-17  9:01 [PATCH] rockchip: Fix MMC boot order Alex Bee
@ 2021-06-18  2:23 ` Kever Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Kever Yang @ 2021-06-18  2:23 UTC (permalink / raw)
  To: Alex Bee, u-boot


On 2021/6/17 下午5:01, Alex Bee wrote:
> Basically all, i.e. rk3036.dtsi, rk3128.dtsi, rk3xxx.dtsi, rk322x.dtsi,
> rk3288.dtsi, rk3308-u-boot.dtsi, rk3328-u-boot.dtsi, rk3399-u-boot.dtsi
> and px30-u-boot.dtsi Rockchip SoC devicetrees which have mmc indexes
> are defining eMMC as mmc0 and sdmmc as mmc1.
> This means that the rule to try to boot from the SD card first is ignored,
> which as per comment is what we want and is important for distros, which
> rely on that.
>
> Fix this by setting the correct mmc index, i.e. first from mmc1 (SD card),
> second from mmc0 (eMMC).
>
> Signed-off-by: Alex Bee <knaerzche@gmail.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   include/configs/rockchip-common.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
> index 0b9e24d1db..ba7061a287 100644
> --- a/include/configs/rockchip-common.h
> +++ b/include/configs/rockchip-common.h
> @@ -14,11 +14,11 @@
>   
>   #ifndef CONFIG_SPL_BUILD
>   
> -/* First try to boot from SD (index 0), then eMMC (index 1) */
> +/* First try to boot from SD (index 1), then eMMC (index 0) */
>   #if CONFIG_IS_ENABLED(CMD_MMC)
>   	#define BOOT_TARGET_MMC(func) \
> -		func(MMC, mmc, 0) \
> -		func(MMC, mmc, 1)
> +		func(MMC, mmc, 1) \
> +		func(MMC, mmc, 0)
>   #else
>   	#define BOOT_TARGET_MMC(func)
>   #endif



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-18  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  9:01 [PATCH] rockchip: Fix MMC boot order Alex Bee
2021-06-18  2:23 ` Kever Yang

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.