aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-omap3.c
diff options
context:
space:
mode:
authorKeshava Munegowda <keshava_mgowda@ti.com>2011-03-01 09:38:16 -0500
committerFelipe Balbi <balbi@ti.com>2011-03-01 10:01:11 -0500
commit181b250cf53233a7a7c6d7e1e9df402506712e93 (patch)
tree476b60593f7b646bdc1e0d56cd38368bed31fe4d /drivers/usb/host/ohci-omap3.c
parenta8480ea0bedbf049423a4caa9b09d371614c07dc (diff)
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: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host/ohci-omap3.c')
-rw-r--r--drivers/usb/host/ohci-omap3.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c
index 32f56bbec21..3f9db87fe52 100644
--- a/drivers/usb/host/ohci-omap3.c
+++ b/drivers/usb/host/ohci-omap3.c
@@ -141,7 +141,7 @@ struct ohci_hcd_omap3 {
141 struct clk *usbtll_ick; 141 struct clk *usbtll_ick;
142 142
143 /* port_mode: TLL/PHY, 2/3/4/6-PIN, DP-DM/DAT-SE0 */ 143 /* port_mode: TLL/PHY, 2/3/4/6-PIN, DP-DM/DAT-SE0 */
144 enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS]; 144 enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
145 void __iomem *uhh_base; 145 void __iomem *uhh_base;
146 void __iomem *tll_base; 146 void __iomem *tll_base;
147 void __iomem *ohci_base; 147 void __iomem *ohci_base;
@@ -206,10 +206,10 @@ static int ohci_omap3_start(struct usb_hcd *hcd)
206 * convert the port-mode enum to a value we can use in the FSLSMODE 206 * convert the port-mode enum to a value we can use in the FSLSMODE
207 * field of USBTLL_CHANNEL_CONF 207 * field of USBTLL_CHANNEL_CONF
208 */ 208 */
209static unsigned ohci_omap3_fslsmode(enum ohci_omap3_port_mode mode) 209static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode)
210{ 210{
211 switch (mode) { 211 switch (mode) {
212 case OMAP_OHCI_PORT_MODE_UNUSED: 212 case OMAP_USBHS_PORT_MODE_UNUSED:
213 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: 213 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
214 return 0x0; 214 return 0x0;
215 215
@@ -266,7 +266,7 @@ static void ohci_omap3_tll_config(struct ohci_hcd_omap3 *omap)
266 for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) { 266 for (i = 0; i < OMAP_TLL_CHANNEL_COUNT; i++) {
267 267
268 /* Enable only those channels that are actually used */ 268 /* Enable only those channels that are actually used */
269 if (omap->port_mode[i] == OMAP_OHCI_PORT_MODE_UNUSED) 269 if (omap->port_mode[i] == OMAP_USBHS_PORT_MODE_UNUSED)
270 continue; 270 continue;
271 271
272 reg = ohci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i)); 272 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 * 382 *
383 * For now, turn off all the Pi_CONNECT_STATUS bits 383 * For now, turn off all the Pi_CONNECT_STATUS bits
384 * 384 *
385 if (omap->port_mode[0] == OMAP_OHCI_PORT_MODE_UNUSED) 385 if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
386 reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; 386 reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
387 if (omap->port_mode[1] == OMAP_OHCI_PORT_MODE_UNUSED) 387 if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
388 reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS; 388 reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
389 if (omap->port_mode[2] == OMAP_OHCI_PORT_MODE_UNUSED) 389 if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
390 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS; 390 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
391 */ 391 */
392 reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; 392 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 reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS; 403 reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
404 } else { 404 } else {
405 dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n"); 405 dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
406 if (omap->port_mode[0] == OMAP_OHCI_PORT_MODE_UNUSED) 406 if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
407 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS; 407 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
408 else 408 else
409 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS; 409 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
410 410
411 if (omap->port_mode[1] == OMAP_OHCI_PORT_MODE_UNUSED) 411 if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
412 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS; 412 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
413 else 413 else
414 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS; 414 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
415 415
416 if (omap->port_mode[2] == OMAP_OHCI_PORT_MODE_UNUSED) 416 if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
417 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS; 417 reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
418 else 418 else
419 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS; 419 reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
@@ -580,7 +580,7 @@ static const struct hc_driver ohci_omap3_hc_driver = {
580 */ 580 */
581static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev) 581static int __devinit ohci_hcd_omap3_probe(struct platform_device *pdev)
582{ 582{
583 struct ohci_hcd_omap_platform_data *pdata = pdev->dev.platform_data; 583 struct usbhs_omap_board_data *pdata = pdev->dev.platform_data;
584 struct ohci_hcd_omap3 *omap; 584 struct ohci_hcd_omap3 *omap;
585 struct resource *res; 585 struct resource *res;
586 struct usb_hcd *hcd; 586 struct usb_hcd *hcd;