diff options
| author | Roger Quadros <rogerq@ti.com> | 2013-02-14 03:13:48 -0500 |
|---|---|---|
| committer | Roger Quadros <rogerq@ti.com> | 2013-02-14 03:13:48 -0500 |
| commit | 42973159599086c48c58ad79b9ad0758da6bc256 (patch) | |
| tree | 6a33b6bc3ac6a29fc1a0b0f37efd5235d16a3f19 | |
| parent | 7f07863ec60f7d3dbeec5aff881ea074db3925ed (diff) | |
ARM: OMAP: Consolidate OMAP USB-HS platform data (part 3/3)
Let's have a single platform data structure for the OMAP's High-Speed
USB host subsystem instead of having 3 separate ones i.e. one for
board data, one for USB Host (UHH) module and one for USB-TLL module.
This makes the code much simpler and avoids creating multiple copies of
platform data.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
| -rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-3630sdp.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-am3517crane.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-cm-t3517.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-zoom.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 29 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/usb.h | 20 |
18 files changed, 23 insertions, 60 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index bb73afc9ac17..46147c88781f 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
| @@ -424,7 +424,7 @@ static void enable_board_wakeup_source(void) | |||
| 424 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 424 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 427 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 428 | 428 | ||
| 429 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 429 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 430 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 430 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 050aaa771254..78b17247f1a6 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
| @@ -53,7 +53,7 @@ static void enable_board_wakeup_source(void) | |||
| 53 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 53 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 56 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 57 | 57 | ||
| 58 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 58 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 59 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 59 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 51b96a1206d1..26f19168be7a 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
| @@ -40,7 +40,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 40 | }; | 40 | }; |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | static struct usbhs_omap_board_data usbhs_bdata __initdata = { | 43 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 44 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 44 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 45 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, | 45 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 46 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 46 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index f81a303b87ff..c76725d21b02 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
| @@ -274,7 +274,7 @@ static __init void am3517_evm_mcbsp1_init(void) | |||
| 274 | omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0); | 274 | omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0); |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 277 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 278 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 278 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 279 | #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ | 279 | #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ |
| 280 | defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) | 280 | defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index b3102c2f4a3c..cdf1d6e70bdb 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
| @@ -418,7 +418,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 418 | {} /* Terminator */ | 418 | {} /* Terminator */ |
| 419 | }; | 419 | }; |
| 420 | 420 | ||
| 421 | static struct usbhs_omap_board_data usbhs_bdata __initdata = { | 421 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 422 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 422 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 423 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 423 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 424 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 424 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index ebbc2adb499e..cfa9098c007b 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
| @@ -166,7 +166,7 @@ static inline void cm_t3517_init_rtc(void) {} | |||
| 166 | #define HSUSB2_RESET_GPIO (147) | 166 | #define HSUSB2_RESET_GPIO (147) |
| 167 | #define USB_HUB_RESET_GPIO (152) | 167 | #define USB_HUB_RESET_GPIO (152) |
| 168 | 168 | ||
| 169 | static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = { | 169 | static struct usbhs_omap_platform_data cm_t3517_ehci_pdata __initdata = { |
| 170 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 170 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 171 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 171 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 172 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 172 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 12865af25d3a..051ec0d867d5 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
| @@ -435,7 +435,7 @@ static struct platform_device *devkit8000_devices[] __initdata = { | |||
| 435 | &omap_dm9000_dev, | 435 | &omap_dm9000_dev, |
| 436 | }; | 436 | }; |
| 437 | 437 | ||
| 438 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 438 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 439 | 439 | ||
| 440 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 440 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 441 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, | 441 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 0f24cb84ba5a..cfba790a29aa 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
| @@ -526,7 +526,7 @@ static void __init igep_i2c_init(void) | |||
| 526 | omap3_pmic_init("twl4030", &igep_twldata); | 526 | omap3_pmic_init("twl4030", &igep_twldata); |
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = { | 529 | static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = { |
| 530 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 530 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 531 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, | 531 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 532 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 532 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
| @@ -537,7 +537,7 @@ static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = { | |||
| 537 | .reset_gpio_port[2] = -EINVAL, | 537 | .reset_gpio_port[2] = -EINVAL, |
| 538 | }; | 538 | }; |
| 539 | 539 | ||
| 540 | static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = { | 540 | static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = { |
| 541 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 541 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 542 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 542 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 543 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 543 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 22c483d5dfa8..1cb114e6fa71 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
| @@ -430,7 +430,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = { | |||
| 430 | &madc_hwmon, | 430 | &madc_hwmon, |
| 431 | }; | 431 | }; |
| 432 | 432 | ||
| 433 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 433 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 434 | 434 | ||
| 435 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 435 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 436 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 436 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 3985f35aee06..7bdc8a4c0d41 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
| @@ -538,7 +538,7 @@ static int __init omap3_evm_i2c_init(void) | |||
| 538 | return 0; | 538 | return 0; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | static struct usbhs_omap_board_data usbhs_bdata __initdata = { | 541 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 542 | 542 | ||
| 543 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 543 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 544 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 544 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index a53a6683c1b8..145a6f87b71a 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
| @@ -567,7 +567,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
| 567 | &pandora_backlight, | 567 | &pandora_backlight, |
| 568 | }; | 568 | }; |
| 569 | 569 | ||
| 570 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 570 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 571 | 571 | ||
| 572 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 572 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 573 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 573 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 53a6cbcf9747..278ae9546e39 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
| @@ -361,7 +361,7 @@ static struct platform_device *omap3_stalker_devices[] __initdata = { | |||
| 361 | &keys_gpio, | 361 | &keys_gpio, |
| 362 | }; | 362 | }; |
| 363 | 363 | ||
| 364 | static struct usbhs_omap_board_data usbhs_bdata __initconst = { | 364 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 365 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 365 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 366 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 366 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 367 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 367 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 263cb9cfbf37..65a285ffeb7b 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
| @@ -309,7 +309,7 @@ static struct platform_device *omap3_touchbook_devices[] __initdata = { | |||
| 309 | &keys_gpio, | 309 | &keys_gpio, |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| 312 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 312 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 313 | 313 | ||
| 314 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 314 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 315 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 315 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 769c1feee1c4..135148995dcc 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
| @@ -139,7 +139,7 @@ static struct platform_device *panda_devices[] __initdata = { | |||
| 139 | &btwilink_device, | 139 | &btwilink_device, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 142 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 143 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | 143 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
| 144 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, | 144 | .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 145 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 145 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index c8fde3e56441..b1b0f0926318 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
| @@ -457,7 +457,7 @@ static int __init overo_spi_init(void) | |||
| 457 | return 0; | 457 | return 0; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 460 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 461 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 461 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 462 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 462 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 463 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 463 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index d7fa31e67238..2d7a45747f40 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
| @@ -92,7 +92,7 @@ static struct mtd_partition zoom_nand_partitions[] = { | |||
| 92 | }, | 92 | }, |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 95 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
| 96 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, | 96 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 97 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | 97 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 98 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, | 98 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 2e44e8a22884..940aad401279 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 | static struct omap_device_pm_latency omap_uhhtll_latency[] = { | 40 | static struct omap_device_pm_latency omap_uhhtll_latency[] = { |
| 46 | { | 41 | { |
| 47 | .deactivate_func = omap_device_idle_hwmods, | 42 | .deactivate_func = omap_device_idle_hwmods, |
| @@ -485,32 +480,18 @@ void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
| 485 | } | 480 | } |
| 486 | } | 481 | } |
| 487 | 482 | ||
| 488 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 483 | void __init usbhs_init(struct usbhs_omap_platform_data *pdata) |
| 489 | { | 484 | { |
| 490 | struct omap_hwmod *uhh_hwm, *tll_hwm; | 485 | struct omap_hwmod *uhh_hwm, *tll_hwm; |
| 491 | struct platform_device *pdev; | 486 | struct platform_device *pdev; |
| 492 | int bus_id = -1; | 487 | int bus_id = -1; |
| 493 | int i; | ||
| 494 | |||
| 495 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { | ||
| 496 | usbhs_data.port_mode[i] = pdata->port_mode[i]; | ||
| 497 | usbtll_data.port_mode[i] = pdata->port_mode[i]; | ||
| 498 | ohci_data.port_mode[i] = pdata->port_mode[i]; | ||
| 499 | ehci_data.port_mode[i] = pdata->port_mode[i]; | ||
| 500 | ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i]; | ||
| 501 | ehci_data.regulator[i] = pdata->regulator[i]; | ||
| 502 | } | ||
| 503 | ehci_data.phy_reset = pdata->phy_reset; | ||
| 504 | ohci_data.es2_compatibility = pdata->es2_compatibility; | ||
| 505 | usbhs_data.ehci_data = &ehci_data; | ||
| 506 | usbhs_data.ohci_data = &ohci_data; | ||
| 507 | 488 | ||
| 508 | if (cpu_is_omap34xx()) { | 489 | if (cpu_is_omap34xx()) { |
| 509 | setup_ehci_io_mux(pdata->port_mode); | 490 | setup_ehci_io_mux(pdata->port_mode); |
| 510 | setup_ohci_io_mux(pdata->port_mode); | 491 | setup_ohci_io_mux(pdata->port_mode); |
| 511 | 492 | ||
| 512 | if (omap_rev() <= OMAP3430_REV_ES2_1) | 493 | if (omap_rev() <= OMAP3430_REV_ES2_1) |
| 513 | usbhs_data.single_ulpi_bypass = true; | 494 | pdata->single_ulpi_bypass = true; |
| 514 | 495 | ||
| 515 | } else if (cpu_is_omap44xx()) { | 496 | } else if (cpu_is_omap44xx()) { |
| 516 | setup_4430ehci_io_mux(pdata->port_mode); | 497 | setup_4430ehci_io_mux(pdata->port_mode); |
| @@ -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_USBTLL_DEVICE, bus_id, tll_hwm, | 513 | pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm, |
| 533 | &usbtll_data, sizeof(usbtll_data), | 514 | pdata, sizeof(*pdata), |
| 534 | omap_uhhtll_latency, | 515 | omap_uhhtll_latency, |
| 535 | ARRAY_SIZE(omap_uhhtll_latency), false); | 516 | ARRAY_SIZE(omap_uhhtll_latency), false); |
| 536 | if (IS_ERR(pdev)) { | 517 | if (IS_ERR(pdev)) { |
| @@ -540,7 +521,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
| 540 | } | 521 | } |
| 541 | 522 | ||
| 542 | pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm, | 523 | pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm, |
| 543 | &usbhs_data, sizeof(usbhs_data), | 524 | pdata, sizeof(*pdata), |
| 544 | omap_uhhtll_latency, | 525 | omap_uhhtll_latency, |
| 545 | ARRAY_SIZE(omap_uhhtll_latency), false); | 526 | ARRAY_SIZE(omap_uhhtll_latency), false); |
| 546 | if (IS_ERR(pdev)) { | 527 | if (IS_ERR(pdev)) { |
| @@ -552,7 +533,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
| 552 | 533 | ||
| 553 | #else | 534 | #else |
| 554 | 535 | ||
| 555 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 536 | void __init usbhs_init(struct usbhs_omap_platform_data *pdata) |
| 556 | { | 537 | { |
| 557 | } | 538 | } |
| 558 | 539 | ||
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h index 9b986ead7c45..3319f5cf47a3 100644 --- a/arch/arm/mach-omap2/usb.h +++ b/arch/arm/mach-omap2/usb.h | |||
| @@ -53,26 +53,8 @@ | |||
| 53 | #define USBPHY_OTGSESSEND_EN (1 << 20) | 53 | #define USBPHY_OTGSESSEND_EN (1 << 20) |
| 54 | #define USBPHY_DATA_POLARITY (1 << 23) | 54 | #define USBPHY_DATA_POLARITY (1 << 23) |
| 55 | 55 | ||
| 56 | struct usbhs_omap_board_data { | ||
| 57 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 58 | |||
| 59 | /* have to be valid if phy_reset is true and portx is in phy mode */ | ||
| 60 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
| 61 | |||
| 62 | /* Set this to true for ES2.x silicon */ | ||
| 63 | unsigned es2_compatibility:1; | ||
| 64 | |||
| 65 | unsigned phy_reset:1; | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Regulators for USB PHYs. | ||
| 69 | * Each PHY can have a separate regulator. | ||
| 70 | */ | ||
| 71 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
| 72 | }; | ||
| 73 | |||
| 74 | extern void usb_musb_init(struct omap_musb_board_data *board_data); | 56 | extern void usb_musb_init(struct omap_musb_board_data *board_data); |
| 75 | extern void usbhs_init(const struct usbhs_omap_board_data *pdata); | 57 | extern void usbhs_init(struct usbhs_omap_platform_data *pdata); |
| 76 | 58 | ||
| 77 | extern void am35x_musb_reset(void); | 59 | extern void am35x_musb_reset(void); |
| 78 | extern void am35x_musb_phy_power(u8 on); | 60 | extern void am35x_musb_phy_power(u8 on); |
