Accessing MMC/SD card storage on Raspberry Pi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

I've been trying to set up Barebox on a Raspberry Pi Compute Module 3. After some small fixes (see below) I've got 2019.01.0 to boot to a command line on the serial port. However I can't get access to the MMC storage to load a kernel ("no /dev/disk0.0. using default env")

Looking at the source, it seems that a "bcm2835-sdhost" driver is missing (bcm2835_mci seems to only be used for the other SDIO interface towards the wireless interface on other R. Pis) Is MMC storage indeed not supported on R. Pi at the moment or am I missing something?

Thanks
Tomaž




A list of things I needed to do to boot on R. Pi CM3, just in case it's useful for someone else:

Add board rev 10 to rpi_models_new_scheme in rpi-common.c

Note that rpi_model_init() segfaults if board rev is not found in the list because model remains NULL.

Use device tree in bcm2837-rpi-cm3-io3.dts. Most importantly, this disables the bcm2835_mci driver, which otherwise hangs on boot (I'm guessing unsuccessfully trying to init the empty SDIO bus where there would otherwise be a wireless interface on R.Pi 3.).


diff -ru a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c --- a/arch/arm/boards/raspberry-pi/rpi-common.c 2019-02-07 15:37:49.181360164 +0100 +++ b/arch/arm/boards/raspberry-pi/rpi-common.c 2019-02-11 08:48:36.000000000 +0100
@@ -175,6 +175,7 @@
        RPI_MODEL(0, "Unknown model", NULL),
        RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init),
        RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init),
+       RPI_MODEL(10, "Compute Module 3", NULL),
        RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init),
        RPI_MODEL(BCM2835_BOARD_REV_ZERO_W, "Zero W", rpi_b_plus_init),
 };
@@ -251,6 +252,9 @@

 static void rpi_model_init(void)
 {
+       if (!model)
+               return;
+
        if (!model->init)
                return;
diff -ru a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts
--- a/arch/arm/dts/bcm2837-rpi-3.dts    2019-01-14 09:05:44.000000000 +0100
+++ b/arch/arm/dts/bcm2837-rpi-3.dts    2019-02-11 09:49:55.000000000 +0100
@@ -1,4 +1,5 @@
-#include <arm64/broadcom/bcm2837-rpi-3-b.dts>
+//#include <arm64/broadcom/bcm2837-rpi-3-b.dts>
+#include <arm/bcm2837-rpi-cm3-io3.dts>

 / {
        chosen {

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux