aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-armadillo5x0.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-03-02 03:27:42 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-07 13:29:41 -0500
commit48f6b0999673cce33e4a54d89c78460cc28e5156 (patch)
tree1ada2b337a7af540246968a9150b0c0a8ebabc3c /arch/arm/mach-mx3/mach-armadillo5x0.c
parent94573e6623cf9159f036adc670a3d4b29e6d86fe (diff)
ARM i.MX: introduce imx_otg_ulpi_create to create ULPI transceivers
The boards are currently using otg_ulpi_create and mxc_ulpi_access_ops, both are only present if CONFIG_USB_ULPI is set. To remove the need of ifdefs in the board code introduce a imx_otg_ulpi_create functions which expands to a static inline function if compiled without ulpi. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mach-armadillo5x0.c')
-rw-r--r--arch/arm/mach-mx3/mach-armadillo5x0.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index 34e619e811e6..226829bf7c25 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -133,7 +133,6 @@ static int armadillo5x0_pins[] = {
133}; 133};
134 134
135/* USB */ 135/* USB */
136#if defined(CONFIG_USB_ULPI)
137 136
138#define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) 137#define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4)
139#define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) 138#define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6)
@@ -256,7 +255,6 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
256 .init = usbh2_init, 255 .init = usbh2_init,
257 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 256 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
258}; 257};
259#endif /* CONFIG_USB_ULPI */
260 258
261/* RTC over I2C*/ 259/* RTC over I2C*/
262#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) 260#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4)
@@ -549,15 +547,15 @@ static void __init armadillo5x0_init(void)
549 i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); 547 i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1);
550 548
551 /* USB */ 549 /* USB */
552#if defined(CONFIG_USB_ULPI) 550
553 usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 551 usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
554 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 552 ULPI_OTG_DRVVBUS_EXT);
555 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 553 if (usbotg_pdata.otg)
556 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 554 imx31_add_mxc_ehci_otg(&usbotg_pdata);
557 555 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
558 imx31_add_mxc_ehci_otg(&usbotg_pdata); 556 ULPI_OTG_DRVVBUS_EXT);
559 imx31_add_mxc_ehci_hs(2, &usbh2_pdata); 557 if (usbh2_pdata.otg)
560#endif 558 imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
561} 559}
562 560
563static void __init armadillo5x0_timer_init(void) 561static void __init armadillo5x0_timer_init(void)