aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31lite.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-mx31lite.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-mx31lite.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31lite.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c
index 81021bf8f6b3..24a21a384bf1 100644
--- a/arch/arm/mach-mx3/mach-mx31lite.c
+++ b/arch/arm/mach-mx3/mach-mx31lite.c
@@ -130,7 +130,6 @@ static struct spi_board_info mc13783_spi_dev __initdata = {
130 * USB 130 * USB
131 */ 131 */
132 132
133#if defined(CONFIG_USB_ULPI)
134#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ 133#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
135 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) 134 PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
136 135
@@ -177,7 +176,6 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
177 .init = usbh2_init, 176 .init = usbh2_init,
178 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 177 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
179}; 178};
180#endif
181 179
182/* 180/*
183 * NOR flash 181 * NOR flash
@@ -254,13 +252,11 @@ static void __init mx31lite_init(void)
254 imx31_add_spi_imx1(&spi1_pdata); 252 imx31_add_spi_imx1(&spi1_pdata);
255 spi_register_board_info(&mc13783_spi_dev, 1); 253 spi_register_board_info(&mc13783_spi_dev, 1);
256 254
257#if defined(CONFIG_USB_ULPI)
258 /* USB */ 255 /* USB */
259 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 256 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
260 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 257 ULPI_OTG_DRVVBUS_EXT);
261 258 if (usbh2_pdata.otg)
262 imx31_add_mxc_ehci_hs(2, &usbh2_pdata); 259 imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
263#endif
264 260
265 /* SMSC9117 IRQ pin */ 261 /* SMSC9117 IRQ pin */
266 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); 262 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");