diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-02 03:27:42 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-07 13:29:41 -0500 |
commit | 48f6b0999673cce33e4a54d89c78460cc28e5156 (patch) | |
tree | 1ada2b337a7af540246968a9150b0c0a8ebabc3c /arch/arm/mach-mx3/mach-mx31lilly.c | |
parent | 94573e6623cf9159f036adc670a3d4b29e6d86fe (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-mx31lilly.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31lilly.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index e2f9de10ad9f..ed95745163b8 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -111,8 +111,6 @@ static struct platform_device physmap_flash_device = { | |||
111 | 111 | ||
112 | /* USB */ | 112 | /* USB */ |
113 | 113 | ||
114 | #if defined(CONFIG_USB_ULPI) | ||
115 | |||
116 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 114 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
117 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 115 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
118 | 116 | ||
@@ -197,16 +195,13 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | |||
197 | 195 | ||
198 | static void lilly1131_usb_init(void) | 196 | static void lilly1131_usb_init(void) |
199 | { | 197 | { |
200 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
201 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | ||
202 | |||
203 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 198 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
204 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
205 | } | ||
206 | 199 | ||
207 | #else | 200 | usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
208 | static inline void lilly1131_usb_init(void) {} | 201 | ULPI_OTG_DRVVBUS_EXT); |
209 | #endif /* CONFIG_USB_ULPI */ | 202 | if (usbh2_pdata.otg) |
203 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
204 | } | ||
210 | 205 | ||
211 | /* SPI */ | 206 | /* SPI */ |
212 | 207 | ||