mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: rpi: detect mci1 as well when searching for environment
@ 2024-04-03  9:06 Ahmad Fatoum
  2024-04-03 12:26 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-04-03  9:06 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

On Raspberry Pi 4, which lacks aliases like other Raspberry Pis,
the SD-Card is named mci1, while mci0 is the SDIO card.

Therefore detect both mci0 and mci1 in hope that one of them will
provide disk0. This is safe to do as barebox will now gracefully
skip SDIO cards during probe.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 7c82c740e256..924d4425bd87 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -192,6 +192,7 @@ static int rpi_env_init(void)
 	int ret;
 
 	device_detect_by_name("mci0");
+	device_detect_by_name("mci1");
 
 	diskdev = "/dev/disk0.0";
 	ret = stat(diskdev, &s);
-- 
2.39.2




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

* Re: [PATCH] ARM: rpi: detect mci1 as well when searching for environment
  2024-04-03  9:06 [PATCH] ARM: rpi: detect mci1 as well when searching for environment Ahmad Fatoum
@ 2024-04-03 12:26 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-04-03 12:26 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Wed, 03 Apr 2024 11:06:02 +0200, Ahmad Fatoum wrote:
> On Raspberry Pi 4, which lacks aliases like other Raspberry Pis,
> the SD-Card is named mci1, while mci0 is the SDIO card.
> 
> Therefore detect both mci0 and mci1 in hope that one of them will
> provide disk0. This is safe to do as barebox will now gracefully
> skip SDIO cards during probe.
> 
> [...]

Applied, thanks!

[1/1] ARM: rpi: detect mci1 as well when searching for environment
      https://git.pengutronix.de/cgit/barebox/commit/?id=8f1923ac8ff6 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2024-04-03 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03  9:06 [PATCH] ARM: rpi: detect mci1 as well when searching for environment Ahmad Fatoum
2024-04-03 12:26 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox