Commit 181b250c authored by Keshava Munegowda's avatar Keshava Munegowda Committed by Felipe Balbi

arm: omap: usb: create common enums and structures for ehci and ohci

Create the ehci and ohci specific platform data structures.
The port enum values are made common for both ehci and ohci.
Signed-off-by: default avatarKeshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a8480ea0
...@@ -653,11 +653,11 @@ static void enable_board_wakeup_source(void) ...@@ -653,11 +653,11 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = 57, .reset_gpio_port[0] = 57,
...@@ -816,7 +816,7 @@ static void __init omap_3430sdp_init(void) ...@@ -816,7 +816,7 @@ static void __init omap_3430sdp_init(void)
board_flash_init(sdp_flash_partitions, chip_sel_3430); board_flash_init(sdp_flash_partitions, chip_sel_3430);
sdp3430_display_init(); sdp3430_display_init();
enable_board_wakeup_source(); enable_board_wakeup_source();
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
} }
MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
......
...@@ -54,11 +54,11 @@ static void enable_board_wakeup_source(void) ...@@ -54,11 +54,11 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = 126, .reset_gpio_port[0] = 126,
...@@ -211,7 +211,7 @@ static void __init omap_sdp_init(void) ...@@ -211,7 +211,7 @@ static void __init omap_sdp_init(void)
board_smc91x_init(); board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_sdp); board_flash_init(sdp_flash_partitions, chip_sel_sdp);
enable_board_wakeup_source(); enable_board_wakeup_source();
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
} }
MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
......
...@@ -251,10 +251,10 @@ static void __init omap_4430sdp_init_irq(void) ...@@ -251,10 +251,10 @@ static void __init omap_4430sdp_init_irq(void)
gic_init_irq(); gic_init_irq();
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = false, .phy_reset = false,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
.reset_gpio_port[1] = -EINVAL, .reset_gpio_port[1] = -EINVAL,
...@@ -584,7 +584,7 @@ static void __init omap_4430sdp_init(void) ...@@ -584,7 +584,7 @@ static void __init omap_4430sdp_init(void)
else else
gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
status = omap_ethernet_init(); status = omap_ethernet_init();
......
...@@ -59,10 +59,10 @@ static void __init am3517_crane_init_irq(void) ...@@ -59,10 +59,10 @@ static void __init am3517_crane_init_irq(void)
omap_init_irq(); omap_init_irq();
} }
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = GPIO_USB_NRESET, .reset_gpio_port[0] = GPIO_USB_NRESET,
...@@ -103,7 +103,7 @@ static void __init am3517_crane_init(void) ...@@ -103,7 +103,7 @@ static void __init am3517_crane_init(void)
return; return;
} }
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
} }
MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
......
...@@ -430,15 +430,15 @@ static __init void am3517_evm_musb_init(void) ...@@ -430,15 +430,15 @@ static __init void am3517_evm_musb_init(void)
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
#else #else
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
#endif #endif
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = 57, .reset_gpio_port[0] = 57,
...@@ -502,7 +502,7 @@ static void __init am3517_evm_init(void) ...@@ -502,7 +502,7 @@ static void __init am3517_evm_init(void)
/* Configure GPIO for EHCI port */ /* Configure GPIO for EHCI port */
omap_mux_init_gpio(57, OMAP_PIN_OUTPUT); omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
am3517_evm_hecc_init(&am3517_evm_hecc_pdata); am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
/* DSS */ /* DSS */
am3517_evm_display_init(); am3517_evm_display_init();
......
...@@ -605,10 +605,10 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -605,10 +605,10 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = OMAP_MAX_GPIO_LINES + 6, .reset_gpio_port[0] = OMAP_MAX_GPIO_LINES + 6,
...@@ -810,7 +810,7 @@ static void __init cm_t35_init(void) ...@@ -810,7 +810,7 @@ static void __init cm_t35_init(void)
cm_t35_init_display(); cm_t35_init_display();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
} }
MACHINE_START(CM_T35, "Compulab CM-T35") MACHINE_START(CM_T35, "Compulab CM-T35")
......
...@@ -167,10 +167,10 @@ static inline void cm_t3517_init_rtc(void) {} ...@@ -167,10 +167,10 @@ static inline void cm_t3517_init_rtc(void) {}
#define HSUSB2_RESET_GPIO (147) #define HSUSB2_RESET_GPIO (147)
#define USB_HUB_RESET_GPIO (152) #define USB_HUB_RESET_GPIO (152)
static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata __initdata = { static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = HSUSB1_RESET_GPIO, .reset_gpio_port[0] = HSUSB1_RESET_GPIO,
......
...@@ -620,11 +620,11 @@ static struct omap_musb_board_data musb_board_data = { ...@@ -620,11 +620,11 @@ static struct omap_musb_board_data musb_board_data = {
.power = 100, .power = 100,
}; };
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -803,7 +803,7 @@ static void __init devkit8000_init(void) ...@@ -803,7 +803,7 @@ static void __init devkit8000_init(void)
devkit8000_ads7846_init(); devkit8000_ads7846_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
devkit8000_flash_init(); devkit8000_flash_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
......
...@@ -627,10 +627,10 @@ static struct omap_musb_board_data musb_board_data = { ...@@ -627,10 +627,10 @@ static struct omap_musb_board_data musb_board_data = {
.power = 100, .power = 100,
}; };
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET, .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
...@@ -699,7 +699,7 @@ static void __init igep2_init(void) ...@@ -699,7 +699,7 @@ static void __init igep2_init(void)
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init(); omap_serial_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
igep2_flash_init(); igep2_flash_init();
igep2_leds_init(); igep2_leds_init();
......
...@@ -408,10 +408,10 @@ static void __init igep3_wifi_bt_init(void) ...@@ -408,10 +408,10 @@ static void __init igep3_wifi_bt_init(void)
void __init igep3_wifi_bt_init(void) {} void __init igep3_wifi_bt_init(void) {}
#endif #endif
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -435,7 +435,7 @@ static void __init igep3_init(void) ...@@ -435,7 +435,7 @@ static void __init igep3_init(void)
platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices));
omap_serial_init(); omap_serial_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
igep3_flash_init(); igep3_flash_init();
igep3_leds_init(); igep3_leds_init();
......
...@@ -586,11 +586,11 @@ static void __init omap3beagle_flash_init(void) ...@@ -586,11 +586,11 @@ static void __init omap3beagle_flash_init(void)
} }
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -625,7 +625,7 @@ static void __init omap3_beagle_init(void) ...@@ -625,7 +625,7 @@ static void __init omap3_beagle_init(void)
gpio_direction_output(170, true); gpio_direction_output(170, true);
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
omap3beagle_flash_init(); omap3beagle_flash_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
......
...@@ -638,11 +638,11 @@ static struct platform_device *omap3_evm_devices[] __initdata = { ...@@ -638,11 +638,11 @@ static struct platform_device *omap3_evm_devices[] __initdata = {
&omap3_evm_dss_device, &omap3_evm_dss_device,
}; };
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
/* PHY reset GPIO will be runtime programmed based on EVM version */ /* PHY reset GPIO will be runtime programmed based on EVM version */
...@@ -700,7 +700,7 @@ static void __init omap3_evm_init(void) ...@@ -700,7 +700,7 @@ static void __init omap3_evm_init(void)
/* setup EHCI phy reset config */ /* setup EHCI phy reset config */
omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
ehci_pdata.reset_gpio_port[1] = 21; usbhs_bdata.reset_gpio_port[1] = 21;
/* EVM REV >= E can supply 500mA with EXTVBUS programming */ /* EVM REV >= E can supply 500mA with EXTVBUS programming */
musb_board_data.power = 500; musb_board_data.power = 500;
...@@ -708,10 +708,10 @@ static void __init omap3_evm_init(void) ...@@ -708,10 +708,10 @@ static void __init omap3_evm_init(void)
} else { } else {
/* setup EHCI phy reset on MDC */ /* setup EHCI phy reset on MDC */
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
ehci_pdata.reset_gpio_port[1] = 135; usbhs_bdata.reset_gpio_port[1] = 135;
} }
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
ads7846_dev_init(); ads7846_dev_init();
omap3evm_init_smsc911x(); omap3evm_init_smsc911x();
omap3_evm_display_init(); omap3_evm_display_init();
......
...@@ -681,11 +681,11 @@ static struct platform_device *omap3pandora_devices[] __initdata = { ...@@ -681,11 +681,11 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
&pandora_vwlan_device, &pandora_vwlan_device,
}; };
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = 16, .reset_gpio_port[0] = 16,
...@@ -716,7 +716,7 @@ static void __init omap3pandora_init(void) ...@@ -716,7 +716,7 @@ static void __init omap3pandora_init(void)
spi_register_board_info(omap3pandora_spi_board_info, spi_register_board_info(omap3pandora_spi_board_info,
ARRAY_SIZE(omap3pandora_spi_board_info)); ARRAY_SIZE(omap3pandora_spi_board_info));
omap3pandora_ads7846_init(); omap3pandora_ads7846_init();
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
gpmc_nand_init(&pandora_nand_data); gpmc_nand_init(&pandora_nand_data);
......
...@@ -608,10 +608,10 @@ static struct platform_device *omap3_stalker_devices[] __initdata = { ...@@ -608,10 +608,10 @@ static struct platform_device *omap3_stalker_devices[] __initdata = {
&keys_gpio, &keys_gpio,
}; };
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -649,7 +649,7 @@ static void __init omap3_stalker_init(void) ...@@ -649,7 +649,7 @@ static void __init omap3_stalker_init(void)
omap_serial_init(); omap_serial_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
ads7846_dev_init(); ads7846_dev_init();
omap_mux_init_gpio(21, OMAP_PIN_OUTPUT); omap_mux_init_gpio(21, OMAP_PIN_OUTPUT);
......
...@@ -468,11 +468,11 @@ static void __init omap3touchbook_flash_init(void) ...@@ -468,11 +468,11 @@ static void __init omap3touchbook_flash_init(void)
} }
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -527,7 +527,7 @@ static void __init omap3_touchbook_init(void) ...@@ -527,7 +527,7 @@ static void __init omap3_touchbook_init(void)
ARRAY_SIZE(omap3_ads7846_spi_board_info)); ARRAY_SIZE(omap3_ads7846_spi_board_info));
omap3_ads7846_init(); omap3_ads7846_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
omap3touchbook_flash_init(); omap3touchbook_flash_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
......
...@@ -83,10 +83,10 @@ static void __init omap4_panda_init_irq(void) ...@@ -83,10 +83,10 @@ static void __init omap4_panda_init_irq(void)
gic_init_irq(); gic_init_irq();
} }
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = false, .phy_reset = false,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
.reset_gpio_port[1] = -EINVAL, .reset_gpio_port[1] = -EINVAL,
...@@ -128,7 +128,7 @@ static void __init omap4_ehci_init(void) ...@@ -128,7 +128,7 @@ static void __init omap4_ehci_init(void)
gpio_set_value(GPIO_HUB_NRESET, 0); gpio_set_value(GPIO_HUB_NRESET, 0);
gpio_set_value(GPIO_HUB_NRESET, 1); gpio_set_value(GPIO_HUB_NRESET, 1);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
/* enable power to hub */ /* enable power to hub */
gpio_set_value(GPIO_HUB_POWER, 1); gpio_set_value(GPIO_HUB_POWER, 1);
......
...@@ -423,10 +423,10 @@ static struct platform_device *overo_devices[] __initdata = { ...@@ -423,10 +423,10 @@ static struct platform_device *overo_devices[] __initdata = {
&overo_lcd_device, &overo_lcd_device,
}; };
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
...@@ -454,7 +454,7 @@ static void __init overo_init(void) ...@@ -454,7 +454,7 @@ static void __init overo_init(void)
omap_serial_init(); omap_serial_init();
overo_flash_init(); overo_flash_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
overo_ads7846_init(); overo_ads7846_init();
overo_init_smsc911x(); overo_init_smsc911x();
......
...@@ -106,10 +106,10 @@ static struct mtd_partition zoom_nand_partitions[] = { ...@@ -106,10 +106,10 @@ static struct mtd_partition zoom_nand_partitions[] = {
}, },
}; };
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true, .phy_reset = true,
.reset_gpio_port[0] = -EINVAL, .reset_gpio_port[0] = -EINVAL,
.reset_gpio_port[1] = ZOOM3_EHCI_RESET_GPIO, .reset_gpio_port[1] = ZOOM3_EHCI_RESET_GPIO,
...@@ -123,7 +123,7 @@ static void __init omap_zoom_init(void) ...@@ -123,7 +123,7 @@ static void __init omap_zoom_init(void)
} else if (machine_is_omap_zoom3()) { } else if (machine_is_omap_zoom3()) {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT); omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
usb_ehci_init(&ehci_pdata); usb_ehci_init(&usbhs_bdata);
} }
board_nand_init(zoom_nand_partitions, board_nand_init(zoom_nand_partitions,
......
...@@ -64,10 +64,10 @@ static struct platform_device ehci_device = { ...@@ -64,10 +64,10 @@ static struct platform_device ehci_device = {
/* /*
* setup_ehci_io_mux - initialize IO pad mux for USBHOST * setup_ehci_io_mux - initialize IO pad mux for USBHOST
*/ */
static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) static void setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{ {
switch (port_mode[0]) { switch (port_mode[0]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("hsusb1_stp", OMAP_PIN_OUTPUT); omap_mux_init_signal("hsusb1_stp", OMAP_PIN_OUTPUT);
omap_mux_init_signal("hsusb1_clk", OMAP_PIN_OUTPUT); omap_mux_init_signal("hsusb1_clk", OMAP_PIN_OUTPUT);
omap_mux_init_signal("hsusb1_dir", OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("hsusb1_dir", OMAP_PIN_INPUT_PULLDOWN);
...@@ -81,7 +81,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -81,7 +81,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("hsusb1_data6", OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("hsusb1_data6", OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("hsusb1_data7", OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("hsusb1_data7", OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("hsusb1_tll_stp", omap_mux_init_signal("hsusb1_tll_stp",
OMAP_PIN_INPUT_PULLUP); OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hsusb1_tll_clk", omap_mux_init_signal("hsusb1_tll_clk",
...@@ -107,14 +107,14 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -107,14 +107,14 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("hsusb1_tll_data7", omap_mux_init_signal("hsusb1_tll_data7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_UNKNOWN: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
} }
switch (port_mode[1]) { switch (port_mode[1]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("hsusb2_stp", OMAP_PIN_OUTPUT); omap_mux_init_signal("hsusb2_stp", OMAP_PIN_OUTPUT);
omap_mux_init_signal("hsusb2_clk", OMAP_PIN_OUTPUT); omap_mux_init_signal("hsusb2_clk", OMAP_PIN_OUTPUT);
omap_mux_init_signal("hsusb2_dir", OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("hsusb2_dir", OMAP_PIN_INPUT_PULLDOWN);
...@@ -136,7 +136,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -136,7 +136,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("hsusb2_data7", omap_mux_init_signal("hsusb2_data7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("hsusb2_tll_stp", omap_mux_init_signal("hsusb2_tll_stp",
OMAP_PIN_INPUT_PULLUP); OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hsusb2_tll_clk", omap_mux_init_signal("hsusb2_tll_clk",
...@@ -162,17 +162,17 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -162,17 +162,17 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("hsusb2_tll_data7", omap_mux_init_signal("hsusb2_tll_data7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_UNKNOWN: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
} }
switch (port_mode[2]) { switch (port_mode[2]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); printk(KERN_WARNING "Port3 can't be used in PHY mode\n");
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("hsusb3_tll_stp", omap_mux_init_signal("hsusb3_tll_stp",
OMAP_PIN_INPUT_PULLUP); OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hsusb3_tll_clk", omap_mux_init_signal("hsusb3_tll_clk",
...@@ -198,7 +198,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -198,7 +198,7 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("hsusb3_tll_data7", omap_mux_init_signal("hsusb3_tll_data7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_UNKNOWN: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
...@@ -207,10 +207,10 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -207,10 +207,10 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
return; return;
} }
static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) static void setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{ {
switch (port_mode[0]) { switch (port_mode[0]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("usbb1_ulpiphy_stp", omap_mux_init_signal("usbb1_ulpiphy_stp",
OMAP_PIN_OUTPUT); OMAP_PIN_OUTPUT);
omap_mux_init_signal("usbb1_ulpiphy_clk", omap_mux_init_signal("usbb1_ulpiphy_clk",
...@@ -236,7 +236,7 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -236,7 +236,7 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("usbb1_ulpiphy_dat7", omap_mux_init_signal("usbb1_ulpiphy_dat7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("usbb1_ulpitll_stp", omap_mux_init_signal("usbb1_ulpitll_stp",
OMAP_PIN_INPUT_PULLUP); OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("usbb1_ulpitll_clk", omap_mux_init_signal("usbb1_ulpitll_clk",
...@@ -262,12 +262,12 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -262,12 +262,12 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("usbb1_ulpitll_dat7", omap_mux_init_signal("usbb1_ulpitll_dat7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_UNKNOWN: case OMAP_USBHS_PORT_MODE_UNUSED:
default: default:
break; break;
} }
switch (port_mode[1]) { switch (port_mode[1]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("usbb2_ulpiphy_stp", omap_mux_init_signal("usbb2_ulpiphy_stp",
OMAP_PIN_OUTPUT); OMAP_PIN_OUTPUT);
omap_mux_init_signal("usbb2_ulpiphy_clk", omap_mux_init_signal("usbb2_ulpiphy_clk",
...@@ -293,7 +293,7 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -293,7 +293,7 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("usbb2_ulpiphy_dat7", omap_mux_init_signal("usbb2_ulpiphy_dat7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("usbb2_ulpitll_stp", omap_mux_init_signal("usbb2_ulpitll_stp",
OMAP_PIN_INPUT_PULLUP); OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("usbb2_ulpitll_clk", omap_mux_init_signal("usbb2_ulpitll_clk",
...@@ -319,13 +319,13 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) ...@@ -319,13 +319,13 @@ static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
omap_mux_init_signal("usbb2_ulpitll_dat7", omap_mux_init_signal("usbb2_ulpitll_dat7",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case EHCI_HCD_OMAP_MODE_UNKNOWN: case OMAP_USBHS_PORT_MODE_UNUSED:
default: default:
break; break;
} }
} }
void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) void __init usb_ehci_init(const struct usbhs_omap_board_data *pdata)
{ {
platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); platform_device_add_data(&ehci_device, pdata, sizeof(*pdata));
...@@ -363,7 +363,7 @@ void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) ...@@ -363,7 +363,7 @@ void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata)
#else #else
void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) void __init usb_ehci_init(const struct usbhs_omap_board_data *pdata)
{ {
} }
...@@ -411,7 +411,7 @@ static struct platform_device ohci_device = { ...@@ -411,7 +411,7 @@ static struct platform_device ohci_device = {
.resource = ohci_resources, .resource = ohci_resources,
}; };
static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode) static void setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{ {
switch (port_mode[0]) { switch (port_mode[0]) {
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
...@@ -439,7 +439,7 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode) ...@@ -439,7 +439,7 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode)
omap_mux_init_signal("mm1_txdat", omap_mux_init_signal("mm1_txdat",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case OMAP_OHCI_PORT_MODE_UNUSED: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
...@@ -470,7 +470,7 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode) ...@@ -470,7 +470,7 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode)
omap_mux_init_signal("mm2_txdat", omap_mux_init_signal("mm2_txdat",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case OMAP_OHCI_PORT_MODE_UNUSED: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
...@@ -501,14 +501,14 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode) ...@@ -501,14 +501,14 @@ static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode)
omap_mux_init_signal("mm3_txdat", omap_mux_init_signal("mm3_txdat",
OMAP_PIN_INPUT_PULLDOWN); OMAP_PIN_INPUT_PULLDOWN);
break; break;
case OMAP_OHCI_PORT_MODE_UNUSED: case OMAP_USBHS_PORT_MODE_UNUSED:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
break; break;
} }
} }
void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata) void __init usb_ohci_init(const struct usbhs_omap_board_data *pdata)
{ {
platform_device_add_data(&ohci_device, pdata, sizeof(*pdata)); platform_device_add_data(&ohci_device, pdata, sizeof(*pdata));
...@@ -524,7 +524,7 @@ void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata) ...@@ -524,7 +524,7 @@ void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata)
#else #else
void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata) void __init usb_ohci_init(const struct usbhs_omap_board_data *pdata)
{ {
} }
......
...@@ -7,15 +7,12 @@ ...@@ -7,15 +7,12 @@
#include <plat/board.h> #include <plat/board.h>
#define OMAP3_HS_USB_PORTS 3 #define OMAP3_HS_USB_PORTS 3
enum ehci_hcd_omap_mode {
EHCI_HCD_OMAP_MODE_UNKNOWN,
EHCI_HCD_OMAP_MODE_PHY,
EHCI_HCD_OMAP_MODE_TLL,
EHCI_HCD_OMAP_MODE_HSIC,
};
enum ohci_omap3_port_mode { enum usbhs_omap_port_mode {
OMAP_OHCI_PORT_MODE_UNUSED, OMAP_USBHS_PORT_MODE_UNUSED,
OMAP_EHCI_PORT_MODE_PHY,
OMAP_EHCI_PORT_MODE_TLL,
OMAP_EHCI_PORT_MODE_HSIC,
OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
...@@ -25,24 +22,45 @@ enum ohci_omap3_port_mode { ...@@ -25,24 +22,45 @@ enum ohci_omap3_port_mode {
OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM, OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
}; };
struct ehci_hcd_omap_platform_data { struct usbhs_omap_board_data {
enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
unsigned phy_reset:1;
/* have to be valid if phy_reset is true and portx is in phy mode */ /* have to be valid if phy_reset is true and portx is in phy mode */
int reset_gpio_port[OMAP3_HS_USB_PORTS]; int reset_gpio_port[OMAP3_HS_USB_PORTS];
/* Set this to true for ES2.x silicon */
unsigned es2_compatibility:1;
unsigned phy_reset:1;
/*
* Regulators for USB PHYs.
* Each PHY can have a separate regulator.
*/
struct regulator *regulator[OMAP3_HS_USB_PORTS];
}; };
struct ohci_hcd_omap_platform_data { struct ehci_hcd_omap_platform_data {
enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS]; enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
int reset_gpio_port[OMAP3_HS_USB_PORTS];
struct regulator *regulator[OMAP3_HS_USB_PORTS];
unsigned phy_reset:1;
};
/* Set this to true for ES2.x silicon */ struct ohci_hcd_omap_platform_data {
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
unsigned es2_compatibility:1; unsigned es2_compatibility:1;
}; };
struct usbhs_omap_platform_data {
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
struct ehci_hcd_omap_platform_data *ehci_data;
struct ohci_hcd_omap_platform_data *ohci_data;
};
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
#define OMAP1_OTG_BASE 0xfffb0400 #define OMAP1_OTG_BASE 0xfffb0400
...@@ -80,19 +98,17 @@ enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; ...@@ -80,19 +98,17 @@ enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
extern void usb_musb_init(struct omap_musb_board_data *board_data); extern void usb_musb_init(struct omap_musb_board_data *board_data);
extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); extern void usb_ehci_init(const struct usbhs_omap_board_data *pdata);
extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata); extern void usb_ohci_init(const struct usbhs_omap_board_data *pdata);
extern int omap4430_phy_power(struct device *dev, int ID, int on); extern int omap4430_phy_power(struct device *dev, int ID, int on);
extern int omap4430_phy_set_clk(struct device *dev, int on); extern int omap4430_phy_set_clk(struct device *dev, int on);
extern int omap4430_phy_init(struct device *dev); extern int omap4430_phy_init(struct device *dev);
extern int omap4430_phy_exit(struct device *dev); extern int omap4430_phy_exit(struct device *dev);
extern int omap4430_phy_suspend(struct device *dev, int suspend); extern int omap4430_phy_suspend(struct device *dev, int suspend);
#endif #endif
/* /*
* FIXME correct answer depends on hmc_mode, * FIXME correct answer depends on hmc_mode,
* as does (on omap1) any nonzero value for config->otg port number * as does (on omap1) any nonzero value for config->otg port number
......
...@@ -155,9 +155,9 @@ ...@@ -155,9 +155,9 @@
#define is_omap_ehci_rev1(x) (x->omap_ehci_rev == OMAP_EHCI_REV1) #define is_omap_ehci_rev1(x) (x->omap_ehci_rev == OMAP_EHCI_REV1)
#define is_omap_ehci_rev2(x) (x->omap_ehci_rev == OMAP_EHCI_REV2) #define is_omap_ehci_rev2(x) (x->omap_ehci_rev == OMAP_EHCI_REV2)
#define is_ehci_phy_mode(x) (x == EHCI_HCD_OMAP_MODE_PHY) #define is_ehci_phy_mode(x) (x == OMAP_EHCI_PORT_MODE_PHY)
#define is_ehci_tll_mode(x) (x == EHCI_HCD_OMAP_MODE_TLL) #define is_ehci_tll_mode(x) (x == OMAP_EHCI_PORT_MODE_TLL)
#define is_ehci_hsic_mode(x) (x == EHCI_HCD_OMAP_MODE_HSIC) #define is_ehci_hsic_mode(x) (x == OMAP_EHCI_PORT_MODE_HSIC)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -220,7 +220,7 @@ struct ehci_hcd_omap { ...@@ -220,7 +220,7 @@ struct ehci_hcd_omap {
u32 omap_ehci_rev; u32 omap_ehci_rev;
/* desired phy_mode: TLL, PHY */ /* desired phy_mode: TLL, PHY */
enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
void __iomem *uhh_base; void __iomem *uhh_base;
void __iomem *tll_base; void __iomem *tll_base;
...@@ -389,7 +389,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -389,7 +389,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
*/ */
if (is_omap_ehci_rev2(omap)) { if (is_omap_ehci_rev2(omap)) {
switch (omap->port_mode[0]) { switch (omap->port_mode[0]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap->xclk60mhsp1_ck = clk_get(omap->dev, omap->xclk60mhsp1_ck = clk_get(omap->dev,
"xclk60mhsp1_ck"); "xclk60mhsp1_ck");
if (IS_ERR(omap->xclk60mhsp1_ck)) { if (IS_ERR(omap->xclk60mhsp1_ck)) {
...@@ -413,7 +413,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -413,7 +413,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
"Unable to set P1 f-clock\n"); "Unable to set P1 f-clock\n");
} }
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap->xclk60mhsp1_ck = clk_get(omap->dev, omap->xclk60mhsp1_ck = clk_get(omap->dev,
"init_60m_fclk"); "init_60m_fclk");
if (IS_ERR(omap->xclk60mhsp1_ck)) { if (IS_ERR(omap->xclk60mhsp1_ck)) {
...@@ -463,7 +463,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -463,7 +463,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
break; break;
} }
switch (omap->port_mode[1]) { switch (omap->port_mode[1]) {
case EHCI_HCD_OMAP_MODE_PHY: case OMAP_EHCI_PORT_MODE_PHY:
omap->xclk60mhsp2_ck = clk_get(omap->dev, omap->xclk60mhsp2_ck = clk_get(omap->dev,
"xclk60mhsp2_ck"); "xclk60mhsp2_ck");
if (IS_ERR(omap->xclk60mhsp2_ck)) { if (IS_ERR(omap->xclk60mhsp2_ck)) {
...@@ -487,7 +487,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -487,7 +487,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
"Unable to set P2 f-clock\n"); "Unable to set P2 f-clock\n");
} }
break; break;
case EHCI_HCD_OMAP_MODE_TLL: case OMAP_EHCI_PORT_MODE_TLL:
omap->xclk60mhsp2_ck = clk_get(omap->dev, omap->xclk60mhsp2_ck = clk_get(omap->dev,
"init_60m_fclk"); "init_60m_fclk");
if (IS_ERR(omap->xclk60mhsp2_ck)) { if (IS_ERR(omap->xclk60mhsp2_ck)) {
...@@ -591,11 +591,11 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -591,11 +591,11 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN; reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
if (is_omap_ehci_rev1(omap)) { if (is_omap_ehci_rev1(omap)) {
if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_UNKNOWN) if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_UNKNOWN) if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_UNKNOWN) if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
/* Bypass the TLL module for PHY mode operation */ /* Bypass the TLL module for PHY mode operation */
...@@ -656,15 +656,15 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -656,15 +656,15 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04, ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04,
EHCI_INSNREG04_DISABLE_UNSUSPEND); EHCI_INSNREG04_DISABLE_UNSUSPEND);
if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) || if ((omap->port_mode[0] == OMAP_EHCI_PORT_MODE_TLL) ||
(omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) || (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_TLL) ||
(omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)) { (omap->port_mode[2] == OMAP_EHCI_PORT_MODE_TLL)) {
if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) if (omap->port_mode[0] == OMAP_EHCI_PORT_MODE_TLL)
tll_ch_mask |= OMAP_TLL_CHANNEL_1_EN_MASK; tll_ch_mask |= OMAP_TLL_CHANNEL_1_EN_MASK;
if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) if (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_TLL)
tll_ch_mask |= OMAP_TLL_CHANNEL_2_EN_MASK; tll_ch_mask |= OMAP_TLL_CHANNEL_2_EN_MASK;
if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL) if (omap->port_mode[2] == OMAP_EHCI_PORT_MODE_TLL)
tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK; tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK;
/* Enable UTMI mode for required TLL channels */ /* Enable UTMI mode for required TLL channels */
...@@ -686,9 +686,9 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd) ...@@ -686,9 +686,9 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
} }
/* Soft reset the PHY using PHY reset command over ULPI */ /* Soft reset the PHY using PHY reset command over ULPI */
if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) if (omap->port_mode[0] == OMAP_EHCI_PORT_MODE_PHY)
omap_ehci_soft_phy_reset(omap, 0); omap_ehci_soft_phy_reset(omap, 0);
if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) if (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_PHY)
omap_ehci_soft_phy_reset(omap, 1); omap_ehci_soft_phy_reset(omap, 1);
return 0; return 0;
...@@ -903,7 +903,7 @@ static const struct hc_driver ehci_omap_hc_driver; ...@@ -903,7 +903,7 @@ static const struct hc_driver ehci_omap_hc_driver;
*/ */
static int ehci_hcd_omap_probe(struct platform_device *pdev) static int ehci_hcd_omap_probe(struct platform_device *pdev)
{ {
struct ehci_hcd_omap_platform_data *pdata = pdev->dev.platform_data; struct usbhs_omap_board_data *pdata = pdev->dev.platform_data;
struct ehci_hcd_omap *omap; struct ehci_hcd_omap *omap;
struct resource *res; struct resource *res;
struct usb_hcd *hcd; struct usb_hcd *hcd;
...@@ -981,7 +981,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) ...@@ -981,7 +981,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
/* get ehci regulator and enable */ /* get ehci regulator and enable */
for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
if (omap->port_mode[i] != EHCI_HCD_OMAP_MODE_PHY) { if (omap->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) {
omap->regulator[i] = NULL; omap->regulator[i] = NULL;
continue; continue;
} }
......
...@@ -141,7 +141,7 @@ struct ohci_hcd_omap3 { ...@@ -141,7 +141,7 @@ struct ohci_hcd_omap3 {
struct clk *usbtll_ick; struct clk *usbtll_ick;
/* port_mode: TLL/PHY, 2/3/4/6-PIN, DP-DM/DAT-SE0 */ /* port_mode: TLL/PHY, 2/3/4/6-PIN, DP-DM/DAT-SE0 */
enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS]; enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
void __iomem *uhh_base; void __iomem *uhh_base;
void __iomem *tll_base; void __iomem *tll_base;
void __iomem *ohci_base; void __iomem *ohci_base;
...@@ -206,10 +206,10 @@ static int ohci_omap3_start(struct usb_hcd *hcd) ...@@ -206,10 +206,10 @@ static int ohci_omap3_start(struct usb_hcd *hcd)
* convert the port-mode enum to a value we can use in the FSLSMODE * convert the port-mode enum to a value we can use in the FSLSMODE
* field of USBTLL_CHANNEL_CONF * field of USBTLL_CHANNEL_CONF
*/ */
static unsigned ohci_omap3_fslsmode(enum ohci_omap3_port_mode mode) static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode)
{ {
switch (mode) { switch (mode) {
case OMAP_OHCI_PORT_MODE_UNUSED: case OMAP_USBHS_PORT_MODE_UNUSED:
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
return 0x0; return 0x0;
...@@ -266,7 +266,7 @@ static void ohci_omap3_tll_config(struct ohci_hcd_omap3 *omap) ...@@ -266,7 +266,7 @@ static void ohci_omap3_tll_config(struct ohci_hcd_omap3 *omap)
for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) { for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) {
/* Enable only those channels that are actually used */ /* Enable only those channels that are actually used */
if (omap->port_mode[i] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[i] == OMAP_USBHS_PORT_MODE_UNUSED)
continue; continue;
reg = ohci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i)); reg = ohci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i));
...@@ -382,11 +382,11 @@ static int omap3_start_ohci(struct ohci_hcd_omap3 *omap, struct usb_hcd *hcd) ...@@ -382,11 +382,11 @@ static int omap3_start_ohci(struct ohci_hcd_omap3 *omap, struct usb_hcd *hcd)
* *
* For now, turn off all the Pi_CONNECT_STATUS bits * For now, turn off all the Pi_CONNECT_STATUS bits
* *
if (omap->port_mode[0] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
if (omap->port_mode[1] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
if (omap->port_mode[2] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
*/ */
reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
...@@ -403,17 +403,17 @@ static int omap3_start_ohci(struct ohci_hcd_omap3 *omap, struct usb_hcd *hcd) ...@@ -403,17 +403,17 @@ static int omap3_start_ohci(struct ohci_hcd_omap3 *omap, struct usb_hcd *hcd)
reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS; reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
} else { } else {
dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n"); dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
if (omap->port_mode[0] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS; reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
else else
reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS; reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
if (omap->port_mode[1] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS; reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
else else
reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS; reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
if (omap->port_mode[2] == OMAP_OHCI_PORT_MODE_UNUSED) if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS; reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
else else
reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS; reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
...@@ -580,7 +580,7 @@ static const struct hc_driver ohci_omap3_hc_driver = { ...@@ -580,7 +580,7 @@ static const struct hc_driver ohci_omap3_hc_driver = {
*/ */
static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev)
{ {
struct ohci_hcd_omap_platform_data *pdata = pdev->dev.platform_data; struct usbhs_omap_board_data *pdata = pdev->dev.platform_data;
struct ohci_hcd_omap3 *omap; struct ohci_hcd_omap3 *omap;
struct resource *res; struct resource *res;
struct usb_hcd *hcd; struct usb_hcd *hcd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment