aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31_3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31_3ds.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 3d0ded92a8a2..2d744b27f63c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -245,7 +245,13 @@ usbotg_free_reset:
245 return err; 245 return err;
246} 246}
247 247
248static int __maybe_unused mx31_3ds_host2_init(struct platform_device *pdev) 248#if defined(CONFIG_USB_ULPI)
249static int mx31_3ds_otg_init(struct platform_device *pdev)
250{
251 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
252}
253
254static int mx31_3ds_host2_init(struct platform_device *pdev)
249{ 255{
250 int err; 256 int err;
251 257
@@ -276,23 +282,24 @@ static int __maybe_unused mx31_3ds_host2_init(struct platform_device *pdev)
276 282
277 mdelay(1); 283 mdelay(1);
278 gpio_set_value(USBH2_RST_B, 1); 284 gpio_set_value(USBH2_RST_B, 1);
279 return 0; 285
286 mdelay(10);
287
288 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
280 289
281usbotg_free_reset: 290usbotg_free_reset:
282 gpio_free(USBH2_RST_B); 291 gpio_free(USBH2_RST_B);
283 return err; 292 return err;
284} 293}
285 294
286#if defined(CONFIG_USB_ULPI)
287static struct mxc_usbh_platform_data otg_pdata __initdata = { 295static struct mxc_usbh_platform_data otg_pdata __initdata = {
296 .init = mx31_3ds_otg_init,
288 .portsc = MXC_EHCI_MODE_ULPI, 297 .portsc = MXC_EHCI_MODE_ULPI,
289 .flags = MXC_EHCI_POWER_PINS_ENABLED,
290}; 298};
291 299
292static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 300static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
293 .init = mx31_3ds_host2_init, 301 .init = mx31_3ds_host2_init,
294 .portsc = MXC_EHCI_MODE_ULPI, 302 .portsc = MXC_EHCI_MODE_ULPI,
295 .flags = MXC_EHCI_POWER_PINS_ENABLED,
296}; 303};
297#endif 304#endif
298 305