diff options
Diffstat (limited to 'arch/arm/mach-omap2/usb-host.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index ac95daaa4702..3c434498e12e 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -33,10 +33,12 @@ | |||
33 | #ifdef CONFIG_MFD_OMAP_USB_HOST | 33 | #ifdef CONFIG_MFD_OMAP_USB_HOST |
34 | 34 | ||
35 | #define OMAP_USBHS_DEVICE "usbhs_omap" | 35 | #define OMAP_USBHS_DEVICE "usbhs_omap" |
36 | #define OMAP_USBTLL_DEVICE "usbhs_tll" | ||
36 | #define USBHS_UHH_HWMODNAME "usb_host_hs" | 37 | #define USBHS_UHH_HWMODNAME "usb_host_hs" |
37 | #define USBHS_TLL_HWMODNAME "usb_tll_hs" | 38 | #define USBHS_TLL_HWMODNAME "usb_tll_hs" |
38 | 39 | ||
39 | static struct usbhs_omap_platform_data usbhs_data; | 40 | static struct usbhs_omap_platform_data usbhs_data; |
41 | static struct usbtll_omap_platform_data usbtll_data; | ||
40 | static struct ehci_hcd_omap_platform_data ehci_data; | 42 | static struct ehci_hcd_omap_platform_data ehci_data; |
41 | static struct ohci_hcd_omap_platform_data ohci_data; | 43 | static struct ohci_hcd_omap_platform_data ohci_data; |
42 | 44 | ||
@@ -485,13 +487,14 @@ void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
485 | 487 | ||
486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 488 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) |
487 | { | 489 | { |
488 | struct omap_hwmod *oh[2]; | 490 | struct omap_hwmod *uhh_hwm, *tll_hwm; |
489 | struct platform_device *pdev; | 491 | struct platform_device *pdev; |
490 | int bus_id = -1; | 492 | int bus_id = -1; |
491 | int i; | 493 | int i; |
492 | 494 | ||
493 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { | 495 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { |
494 | usbhs_data.port_mode[i] = pdata->port_mode[i]; | 496 | usbhs_data.port_mode[i] = pdata->port_mode[i]; |
497 | usbtll_data.port_mode[i] = pdata->port_mode[i]; | ||
495 | ohci_data.port_mode[i] = pdata->port_mode[i]; | 498 | ohci_data.port_mode[i] = pdata->port_mode[i]; |
496 | ehci_data.port_mode[i] = pdata->port_mode[i]; | 499 | ehci_data.port_mode[i] = pdata->port_mode[i]; |
497 | ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i]; | 500 | ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i]; |
@@ -510,25 +513,35 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
510 | setup_4430ohci_io_mux(pdata->port_mode); | 513 | setup_4430ohci_io_mux(pdata->port_mode); |
511 | } | 514 | } |
512 | 515 | ||
513 | oh[0] = omap_hwmod_lookup(USBHS_UHH_HWMODNAME); | 516 | uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME); |
514 | if (!oh[0]) { | 517 | if (!uhh_hwm) { |
515 | pr_err("Could not look up %s\n", USBHS_UHH_HWMODNAME); | 518 | pr_err("Could not look up %s\n", USBHS_UHH_HWMODNAME); |
516 | return; | 519 | return; |
517 | } | 520 | } |
518 | 521 | ||
519 | oh[1] = omap_hwmod_lookup(USBHS_TLL_HWMODNAME); | 522 | tll_hwm = omap_hwmod_lookup(USBHS_TLL_HWMODNAME); |
520 | if (!oh[1]) { | 523 | if (!tll_hwm) { |
521 | pr_err("Could not look up %s\n", USBHS_TLL_HWMODNAME); | 524 | pr_err("Could not look up %s\n", USBHS_TLL_HWMODNAME); |
522 | return; | 525 | return; |
523 | } | 526 | } |
524 | 527 | ||
525 | pdev = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, | 528 | pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm, |
526 | (void *)&usbhs_data, sizeof(usbhs_data), | 529 | &usbtll_data, sizeof(usbtll_data), |
527 | omap_uhhtll_latency, | 530 | omap_uhhtll_latency, |
528 | ARRAY_SIZE(omap_uhhtll_latency), false); | 531 | ARRAY_SIZE(omap_uhhtll_latency), false); |
529 | if (IS_ERR(pdev)) { | 532 | if (IS_ERR(pdev)) { |
530 | pr_err("Could not build hwmod devices %s,%s\n", | 533 | pr_err("Could not build hwmod device %s\n", |
531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); | 534 | USBHS_TLL_HWMODNAME); |
535 | return; | ||
536 | } | ||
537 | |||
538 | pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm, | ||
539 | &usbhs_data, sizeof(usbhs_data), | ||
540 | omap_uhhtll_latency, | ||
541 | ARRAY_SIZE(omap_uhhtll_latency), false); | ||
542 | if (IS_ERR(pdev)) { | ||
543 | pr_err("Could not build hwmod devices %s\n", | ||
544 | USBHS_UHH_HWMODNAME); | ||
532 | return; | 545 | return; |
533 | } | 546 | } |
534 | } | 547 | } |