]> git.sur5r.net Git - u-boot/commitdiff
ARM: sunxi: Fix build break when CONFIG_MMC is not defined
authorChen-Yu Tsai <wens@csie.org>
Tue, 7 Oct 2014 07:11:49 +0000 (15:11 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Oct 2014 07:35:38 +0000 (09:35 +0200)
BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when
CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally
include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI.

This is used when we want to use uart0 from port F, which conflicts
with mmc0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
include/configs/sunxi-common.h

index 5f54c01653a8045dbfd5e62be3e92b0d14298bcb..d55e4cab0636e55b5f0dce57bb79a2452fba1fbd 100644 (file)
        "pxefile_addr_r=0x43200000\0" \
        "ramdisk_addr_r=0x43300000\0"
 
+#ifdef CONFIG_MMC
+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#else
+#define BOOT_TARGET_DEVICES_MMC(func)
+#endif
+
 #ifdef CONFIG_AHCI
 #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
 #else
 #endif
 
 #define BOOT_TARGET_DEVICES(func) \
-       func(MMC, mmc, 0) \
+       BOOT_TARGET_DEVICES_MMC(func) \
        BOOT_TARGET_DEVICES_SCSI(func) \
        BOOT_TARGET_DEVICES_USB(func) \
        func(PXE, pxe, na) \