From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] ARM: imx: guf-neso: only try to enable USB if USB_ULPI is configured
Date: Mon, 27 Jul 2015 17:48:32 +0200 [thread overview]
Message-ID: <1438012113-27213-3-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1438012113-27213-1-git-send-email-l.stach@pengutronix.de>
Avoids a build failure if the config does not include ULPI support.
This is similar to what has been done to the PCA100 board.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/guf-neso/board.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index 67fd50849d5f..f40f0d15914d 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -110,7 +110,7 @@ static struct imx_fb_platform_data neso_fb_data = {
.framebuffer_ovl = (void *)0xa7f00000,
};
-#ifdef CONFIG_USB
+#if defined(CONFIG_USB) && defined(CONFIG_USB_ULPI)
static void neso_usbh_init(void)
{
uint32_t temp;
@@ -130,7 +130,11 @@ static void neso_usbh_init(void)
gpio_set_value(USBH2_PHY_CS_GPIO, 0);
mdelay(10);
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 neso_usbh_init(void) { }
#endif
static int neso_devices_init(void)
@@ -266,10 +270,7 @@ static int neso_devices_init(void)
imx27_add_nand(&nand_info);
imx27_add_fb(&neso_fb_data);
-#ifdef CONFIG_USB
neso_usbh_init();
- add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, MX27_USB_OTG_BASE_ADDR + 0x400, NULL);
-#endif
imx27_add_fec(&fec_info);
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-07-27 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 15:48 [PATCH 1/4] video: backlight-pwm: depend on GPIOLIB Lucas Stach
2015-07-27 15:48 ` [PATCH 2/4] net: enc28j60: fix set mac function signature Lucas Stach
2015-07-27 15:48 ` Lucas Stach [this message]
2015-07-27 15:48 ` [PATCH 4/4] pinctrl: imx-iomux-v2: correct names in EXPORT_SYMBOL macros Lucas Stach
2015-07-29 6:01 ` [PATCH 1/4] video: backlight-pwm: depend on GPIOLIB 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=1438012113-27213-3-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