[PATCH] Fix MMC numbering issue for Raspberry Pi 3

From: Mike Karels karels@FreeBSD.org
Using mmc.dtbo from rpi-firmware to switch the controller for the SD card slot from sdhci to sdhost causes the numbering to change; the SD card is then not recognized at boot. Add to the range checked. --- include/configs/rpi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 55768a46da..4c5c1ac31f 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -137,7 +137,8 @@ #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, 2) #else #define BOOT_TARGET_MMC(func) #endif

On Wed, 27 Oct 2021 22:26:15 +0000 karels@FreeBSD.org wrote:
From: Mike Karels karels@FreeBSD.org
Using mmc.dtbo from rpi-firmware to switch the controller for the SD card slot from sdhci to sdhost causes the numbering to change; the SD card is then not recognized at boot. Add to the range checked.
include/configs/rpi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 55768a46da..4c5c1ac31f 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -137,7 +137,8 @@ #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, 2)
#else #define BOOT_TARGET_MMC(func)
#endif
2.32.0
Reviewed-by: Emmanuel Vadot manu@FreeBSD.org

On Thu, Oct 28, 2021 at 09:44:09AM +0200, Emmanuel Vadot wrote:
On Wed, 27 Oct 2021 22:26:15 +0000 karels@FreeBSD.org wrote:
From: Mike Karels karels@FreeBSD.org
Using mmc.dtbo from rpi-firmware to switch the controller for the SD card slot from sdhci to sdhost causes the numbering to change; the SD card is then not recognized at boot. Add to the range checked.
include/configs/rpi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 55768a46da..4c5c1ac31f 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -137,7 +137,8 @@ #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, 2)
#else #define BOOT_TARGET_MMC(func)
#endif
2.32.0
Reviewed-by: Emmanuel Vadot manu@FreeBSD.org
Applied to rpi-next
Thanks!
-- Emmanuel Vadot manu@bidouilliste.com manu@freebsd.org
participants (3)
-
Emmanuel Vadot
-
karelsīŧ FreeBSD.org
-
Matthias Brugger