]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ARM: omap3: overo: Fix MMC init for SPL
authorAnselm Busse <anselm.busse@outlook.com>
Wed, 31 Jul 2019 15:30:28 +0000 (17:30 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 12 Aug 2019 11:24:29 +0000 (07:24 -0400)
The SPL for the Overo board does not initialise the MMC. Hence, it
cannot load the main boot loader from the SD card susequently. This
patch moves the initialisation code for the MMC so it gets included in
the SPL.

[trini: Add missing header]
Signed-off-by: Tom Rini <trini@konsulko.com>
board/overo/common.c
board/overo/overo.c

index fc02d66d531fbc93b5dd02e23bcc403e8a6a7157..2c4f412e5d36712d5cca74d09fffe5bc7bcd5617 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
+#include <asm/omap_mmc.h>
 #include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -38,6 +39,31 @@ int board_init(void)
        return 0;
 }
 
+#if defined(CONFIG_MMC)
+int board_mmc_init(bd_t *bis)
+{
+       return omap_mmc_init(0, 0, 0, -1, -1);
+}
+#endif
+
+#if defined(CONFIG_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
+#if defined(CONFIG_SPL_OS_BOOT)
+int spl_start_uboot(void)
+{
+       /* break into full u-boot on 'c' */
+       if (serial_tstc() && serial_getc() == 'c')
+               return 1;
+
+       return 0;
+}
+#endif /* CONFIG_SPL_OS_BOOT */
+
 #define MUX_OVERO() \
  /*SDRC*/\
        MUX_VAL(CP(SDRC_D0),            (IEN  | PTD | DIS | M0)) /*SDRC_D0*/\
index 8fa41f81550cf362d33363564245b97439c3ddde..3d57f945f4b83b5bb4e4285b2cc6d0fd5b9ca3d0 100644 (file)
@@ -376,20 +376,6 @@ int board_eth_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_MMC)
-int board_mmc_init(bd_t *bis)
-{
-       return omap_mmc_init(0, 0, 0, -1, -1);
-}
-#endif
-
-#if defined(CONFIG_MMC)
-void board_mmc_power_init(void)
-{
-       twl4030_power_mmc_init(0);
-}
-#endif
-
 #if defined(CONFIG_USB_EHCI_HCD)
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,