From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/5] arm: imx: pca100: only try to enable USB if USB_ULPI is configured
Date: Tue, 25 Nov 2014 18:02:46 +0100 [thread overview]
Message-ID: <1416934970-24929-1-git-send-email-l.stach@pengutronix.de> (raw)
Avoids a build failure if the config does not include ULPI support.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/phytec-phycard-imx27/pca100.c | 7 +++++--
1 file 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 895a3a395777..9475bfafcaa7 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);
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2014-11-25 17:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 17:02 Lucas Stach [this message]
2014-11-25 17:02 ` [PATCH v2 2/5] envfs: include errno.h Lucas Stach
2014-11-25 17:02 ` [PATCH v2 3/5] net: ethoc: depend on OPENRISC Lucas Stach
2014-11-25 17:02 ` [PATCH v2 4/5] blspec: depend on, not select flexible bootargs Lucas Stach
2014-11-25 17:02 ` [PATCH v2 5/5] usb: host: only activate Efika MX ULPI workaround if ULPI is selected Lucas Stach
2014-11-26 18:21 ` [PATCH v2 1/5] arm: imx: pca100: only try to enable USB if USB_ULPI is configured Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416934970-24929-1-git-send-email-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox