[linux-sunxi] Re: [PATCH] sunxi: Bring back SD card as MMC device 0
On Sun, Apr 25, 2021 at 3:30 PM Andre Przywara wrote: > > On Fri, 16 Apr 2021 12:08:09 +0100 > Andre Przywara wrote: > > Hi, > > > Commit 2243d19e5618 ("mmc: mmc-uclass: Use dev_seq() to read aliases > > node's index") now actually enforces U-Boot's device enumeration policy, > > where explicitly named devices come first, then any other non-named > > devices follow, without filling gaps. > > > > For quite a while we have had an "mmc1 = " alias in our > > sunxi-u-boot.dtsi, which now leads to the problem that the SD card > > (which was always mmc device 0) now gets to be number 2. > > I guess this breaks quite some boot scripts, and is confusing at least. > > > > Just add an explicit mmc0 alias in the very same file to fix this and > > restore the old behaviour. > > Can someone please say if this is the right solution? > I think the SD card has always been mmc device 0 in U-Boot, so I think > it's worth keeping that. Just not sure if this is the right way of > fixing that? Playing with aliases always gets confused and might get a different behavior, IMHO. Detect the dev number by U-Boot itself and look at traverse bootenv by all possible dev numbers in sunxi-common.h, but this has one slide effect that we mark mmc2 as devnum 1 for the sake of fastboot so if we mark fastboot number for specific board properly (by static or runtime) then explicit aliases wouldn't required. Jagan. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/CAMty3ZBfRNxHzRnvo%2BVSdUR3das0TdOFUTuKoWveJKJAN%2Bn7iw%40mail.gmail.com.
[linux-sunxi] Re: [PATCH] sunxi: Bring back SD card as MMC device 0
On Fri, 16 Apr 2021 12:08:09 +0100 Andre Przywara wrote: Hi, > Commit 2243d19e5618 ("mmc: mmc-uclass: Use dev_seq() to read aliases > node's index") now actually enforces U-Boot's device enumeration policy, > where explicitly named devices come first, then any other non-named > devices follow, without filling gaps. > > For quite a while we have had an "mmc1 = " alias in our > sunxi-u-boot.dtsi, which now leads to the problem that the SD card > (which was always mmc device 0) now gets to be number 2. > I guess this breaks quite some boot scripts, and is confusing at least. > > Just add an explicit mmc0 alias in the very same file to fix this and > restore the old behaviour. Can someone please say if this is the right solution? I think the SD card has always been mmc device 0 in U-Boot, so I think it's worth keeping that. Just not sure if this is the right way of fixing that? Cheers, Andre > > Signed-off-by: Andre Przywara > Reported-by: Samuel Holland > --- > arch/arm/dts/sunxi-u-boot.dtsi | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi > index a4227a3c22d..06da009fa28 100644 > --- a/arch/arm/dts/sunxi-u-boot.dtsi > +++ b/arch/arm/dts/sunxi-u-boot.dtsi > @@ -12,6 +12,7 @@ > > / { > aliases { > + mmc0 = > mmc1 = > }; > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210425105933.7345f9d7%40slackpad.fritz.box.