]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sunxi: Enable a second mmc socket as boot target in the environment
authorKarsten Merker <merker@debian.org>
Wed, 16 Dec 2015 19:59:40 +0000 (20:59 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 21 Dec 2015 19:37:51 +0000 (20:37 +0100)
Some sunxi-based boards (such as the Olimex A20-SOM-EVB) have a
second MMC socket. This socket is not bootable hardware-wise,
i.e. u-boot itself cannot be loaded from it, but once u-boot has
started, the second socket can be used in the boot process
provided by config_distro_bootcmd.h.

If a second MMC socket is present, place it in the boot order
after the first MMC socket.

Signed-off-by: Karsten Merker <merker@debian.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
include/configs/sunxi-common.h

index da6ab61d1bc53956b7967862f55817762914ea29..8042073c455645cc5a8eff1af23e42c26775af16 100644 (file)
@@ -419,8 +419,14 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
+#endif
 #else
 #define BOOT_TARGET_DEVICES_MMC(func)
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 
 #ifdef CONFIG_AHCI
@@ -448,6 +454,7 @@ extern int soft_i2c_gpio_scl;
 #define BOOT_TARGET_DEVICES(func) \
        func(FEL, fel, na) \
        BOOT_TARGET_DEVICES_MMC(func) \
+       BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
        BOOT_TARGET_DEVICES_SCSI(func) \
        BOOT_TARGET_DEVICES_USB(func) \
        func(PXE, pxe, na) \