ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined
authorChen-Yu Tsai <wens@csie.org>
Fri, 3 Oct 2014 12:16:22 +0000 (20:16 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Oct 2014 07:35:37 +0000 (09:35 +0200)
BOOT_TARGET_DEVICES includes USB unconditionally. This breaks when
CONFIG_CMD_USB is not defined. Use a secondary macro to conditionally
include it when CONFIG_EHCI is enabled, as we do for CONFIG_AHCI.

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

index 0c117bc..318f526 100644 (file)
 #define BOOT_TARGET_DEVICES_SCSI(func)
 #endif
 
+#ifdef CONFIG_USB_EHCI
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICES_USB(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
        func(MMC, mmc, 0) \
        BOOT_TARGET_DEVICES_SCSI(func) \
-       func(USB, usb, 0) \
+       BOOT_TARGET_DEVICES_USB(func) \
        func(PXE, pxe, na) \
        func(DHCP, dhcp, na)