uboot-imx6: fall back to MMC for SPL if boot mode is invalid
authorFelix Fietkau <nbd@nbd.name>
Sun, 26 Aug 2018 17:34:41 +0000 (19:34 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 3 Sep 2018 10:06:24 +0000 (12:06 +0200)
Fixes boot on Hummingboard

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch [new file with mode: 0644]

diff --git a/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch b/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
new file mode 100644 (file)
index 0000000..0883eb7
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
++++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
+@@ -334,6 +334,12 @@ int board_init(void)
+       return ret;
+ }
++void board_boot_order(u32 *spl_boot_list)
++{
++      spl_boot_list[0] = spl_boot_device();
++      spl_boot_list[1] = BOOT_DEVICE_MMC1;
++}
++
+ static bool is_hummingboard(void)
+ {
+       int val1, val2;
+--- a/arch/arm/mach-imx/spl.c
++++ b/arch/arm/mach-imx/spl.c
+@@ -136,7 +136,7 @@ int g_dnl_bind_fixup(struct usb_device_d
+ /* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */
+ u32 spl_boot_mode(const u32 boot_device)
+ {
+-      switch (spl_boot_device()) {
++      switch (boot_device) {
+       /* for MMC return either RAW or FAT mode */
+       case BOOT_DEVICE_MMC1:
+       case BOOT_DEVICE_MMC2: