aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31_3ds.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-01-03 05:30:28 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-02-11 02:40:45 -0500
commit4bd597b633ae630e09d58957bd99870eac35fcb4 (patch)
tree39b829bee667531ac41ea48d7f392ecb9258f956 /arch/arm/mach-mx3/mach-mx31_3ds.c
parentcb07625d1f84fb48e6849cb530762ffcc6f8e458 (diff)
ARM i.MX ehci: do ehci init in board specific functions
The mxc-ehci driver calls SoC specific phy initialization right after calling board specific initialization. To offer greater flexibility for boards to setup the phy and to get rid of some unnecessary flags in platform data this patch lets the boards call the SoC specific phy initialization and remove it from the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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