diff options
Diffstat (limited to 'arch/arm/mach-omap2/usb-host.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 99f04deb4c7f..5706bdccf45e 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -37,11 +37,6 @@ | |||
37 | #define USBHS_UHH_HWMODNAME "usb_host_hs" | 37 | #define USBHS_UHH_HWMODNAME "usb_host_hs" |
38 | #define USBHS_TLL_HWMODNAME "usb_tll_hs" | 38 | #define USBHS_TLL_HWMODNAME "usb_tll_hs" |
39 | 39 | ||
40 | static struct usbhs_omap_platform_data usbhs_data; | ||
41 | static struct usbtll_omap_platform_data usbtll_data; | ||
42 | static struct ehci_hcd_omap_platform_data ehci_data; | ||
43 | static struct ohci_hcd_omap_platform_data ohci_data; | ||
44 | |||
45 | /* MUX settings for EHCI pins */ | 40 | /* MUX settings for EHCI pins */ |
46 | /* | 41 | /* |
47 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST | 42 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST |
@@ -477,32 +472,18 @@ void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
477 | } | 472 | } |
478 | } | 473 | } |
479 | 474 | ||
480 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 475 | void __init usbhs_init(struct usbhs_omap_platform_data *pdata) |
481 | { | 476 | { |
482 | struct omap_hwmod *uhh_hwm, *tll_hwm; | 477 | struct omap_hwmod *uhh_hwm, *tll_hwm; |
483 | struct platform_device *pdev; | 478 | struct platform_device *pdev; |
484 | int bus_id = -1; | 479 | int bus_id = -1; |
485 | int i; | ||
486 | |||
487 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { | ||
488 | usbhs_data.port_mode[i] = pdata->port_mode[i]; | ||
489 | usbtll_data.port_mode[i] = pdata->port_mode[i]; | ||
490 | ohci_data.port_mode[i] = pdata->port_mode[i]; | ||
491 | ehci_data.port_mode[i] = pdata->port_mode[i]; | ||
492 | ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i]; | ||
493 | ehci_data.regulator[i] = pdata->regulator[i]; | ||
494 | } | ||
495 | ehci_data.phy_reset = pdata->phy_reset; | ||
496 | ohci_data.es2_compatibility = pdata->es2_compatibility; | ||
497 | usbhs_data.ehci_data = &ehci_data; | ||
498 | usbhs_data.ohci_data = &ohci_data; | ||
499 | 480 | ||
500 | if (cpu_is_omap34xx()) { | 481 | if (cpu_is_omap34xx()) { |
501 | setup_ehci_io_mux(pdata->port_mode); | 482 | setup_ehci_io_mux(pdata->port_mode); |
502 | setup_ohci_io_mux(pdata->port_mode); | 483 | setup_ohci_io_mux(pdata->port_mode); |
503 | 484 | ||
504 | if (omap_rev() <= OMAP3430_REV_ES2_1) | 485 | if (omap_rev() <= OMAP3430_REV_ES2_1) |
505 | usbhs_data.single_ulpi_bypass = true; | 486 | pdata->single_ulpi_bypass = true; |
506 | 487 | ||
507 | } else if (cpu_is_omap44xx()) { | 488 | } else if (cpu_is_omap44xx()) { |
508 | setup_4430ehci_io_mux(pdata->port_mode); | 489 | setup_4430ehci_io_mux(pdata->port_mode); |
@@ -522,7 +503,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
522 | } | 503 | } |
523 | 504 | ||
524 | pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm, | 505 | pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm, |
525 | &usbtll_data, sizeof(usbtll_data)); | 506 | pdata, sizeof(*pdata)); |
526 | if (IS_ERR(pdev)) { | 507 | if (IS_ERR(pdev)) { |
527 | pr_err("Could not build hwmod device %s\n", | 508 | pr_err("Could not build hwmod device %s\n", |
528 | USBHS_TLL_HWMODNAME); | 509 | USBHS_TLL_HWMODNAME); |
@@ -530,7 +511,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
530 | } | 511 | } |
531 | 512 | ||
532 | pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm, | 513 | pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm, |
533 | &usbhs_data, sizeof(usbhs_data)); | 514 | pdata, sizeof(*pdata)); |
534 | if (IS_ERR(pdev)) { | 515 | if (IS_ERR(pdev)) { |
535 | pr_err("Could not build hwmod devices %s\n", | 516 | pr_err("Could not build hwmod devices %s\n", |
536 | USBHS_UHH_HWMODNAME); | 517 | USBHS_UHH_HWMODNAME); |
@@ -540,7 +521,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
540 | 521 | ||
541 | #else | 522 | #else |
542 | 523 | ||
543 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 524 | void __init usbhs_init(struct usbhs_omap_platform_data *pdata) |
544 | { | 525 | { |
545 | } | 526 | } |
546 | 527 | ||