summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2014-11-25 18:02:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-11-26 19:21:09 +0100
commit154c0b70f03b7a8809eb39dde50b5eb18c91d65f (patch)
tree3dc8a4214b76ca13d10b13a2cde6b34ab32f7ea5
parent93b7459e1ce58033980d450f66976fef2f30c884 (diff)
downloadbarebox-154c0b70f03b7a8809eb39dde50b5eb18c91d65f.tar.gz
arm: imx: pca100: only try to enable USB if USB_ULPI is configured
Avoids a build failure if the config does not include ULPI support. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/phytec-phycard-imx27/pca100.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/boards/phytec-phycard-imx27/pca100.c b/arch/arm/boards/phytec-phycard-imx27/pca100.c
index 895a3a3..9475bfa 100644
--- a/arch/arm/boards/phytec-phycard-imx27/pca100.c
+++ b/arch/arm/boards/phytec-phycard-imx27/pca100.c
@@ -41,6 +41,7 @@
#include <mach/iomux-mx27.h>
#include <mach/devices-imx27.h>
+#if defined(CONFIG_USB) && defined(CONFIG_USB_ULPI)
static void pca100_usb_register(void)
{
mdelay(10);
@@ -55,6 +56,9 @@ static void pca100_usb_register(void)
ulpi_setup((void *)(MX27_USB_OTG_BASE_ADDR + 0x570), 1);
add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, MX27_USB_OTG_BASE_ADDR + 0x400, NULL);
}
+#else
+static void pca100_usb_register(void) { };
+#endif
static void pca100_usb_init(void)
{
@@ -131,8 +135,7 @@ static int pca100_devices_init(void)
for (i = 0; i < ARRAY_SIZE(mode); i++)
imx_gpio_mode(mode[i]);
- if (IS_ENABLED(CONFIG_USB))
- pca100_usb_register();
+ pca100_usb_register();
imx_bbu_external_nand_register_handler("nand", "/dev/nand0.boot",
BBU_HANDLER_FLAG_DEFAULT);