aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-omap.c')
-rw-r--r--drivers/usb/host/ehci-omap.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 15277213f928..18df6c6a5803 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -155,9 +155,9 @@
155#define is_omap_ehci_rev1(x) (x->omap_ehci_rev == OMAP_EHCI_REV1) 155#define is_omap_ehci_rev1(x) (x->omap_ehci_rev == OMAP_EHCI_REV1)
156#define is_omap_ehci_rev2(x) (x->omap_ehci_rev == OMAP_EHCI_REV2) 156#define is_omap_ehci_rev2(x) (x->omap_ehci_rev == OMAP_EHCI_REV2)
157 157
158#define is_ehci_phy_mode(x) (x == EHCI_HCD_OMAP_MODE_PHY) 158#define is_ehci_phy_mode(x) (x == OMAP_EHCI_PORT_MODE_PHY)
159#define is_ehci_tll_mode(x) (x == EHCI_HCD_OMAP_MODE_TLL) 159#define is_ehci_tll_mode(x) (x == OMAP_EHCI_PORT_MODE_TLL)
160#define is_ehci_hsic_mode(x) (x == EHCI_HCD_OMAP_MODE_HSIC) 160#define is_ehci_hsic_mode(x) (x == OMAP_EHCI_PORT_MODE_HSIC)
161 161
162/*-------------------------------------------------------------------------*/ 162/*-------------------------------------------------------------------------*/
163 163
@@ -220,7 +220,7 @@ struct ehci_hcd_omap {
220 u32 omap_ehci_rev; 220 u32 omap_ehci_rev;
221 221
222 /* desired phy_mode: TLL, PHY */ 222 /* desired phy_mode: TLL, PHY */
223 enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; 223 enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
224 224
225 void __iomem *uhh_base; 225 void __iomem *uhh_base;
226 void __iomem *tll_base; 226 void __iomem *tll_base;
@@ -389,7 +389,7 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
389 */ 389 */
390 if (is_omap_ehci_rev2(omap)) { 390 if (is_omap_ehci_rev2(omap)) {
391 switch (omap->port_mode[0]) { 391 switch (omap->port_mode[0]) {
392 case EHCI_HCD_OMAP_MODE_PHY: 392 case OMAP_EHCI_PORT_MODE_PHY:
393 omap->xclk60mhsp1_ck = clk_get(omap->dev, 393 omap->xclk60mhsp1_ck = clk_get(omap->dev,
394 "xclk60mhsp1_ck"); 394 "xclk60mhsp1_ck");
395 if (IS_ERR(omap->xclk60mhsp1_ck)) { 395 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 "Unable to set P1 f-clock\n"); 413 "Unable to set P1 f-clock\n");
414 } 414 }
415 break; 415 break;
416 case EHCI_HCD_OMAP_MODE_TLL: 416 case OMAP_EHCI_PORT_MODE_TLL:
417 omap->xclk60mhsp1_ck = clk_get(omap->dev, 417 omap->xclk60mhsp1_ck = clk_get(omap->dev,
418 "init_60m_fclk"); 418 "init_60m_fclk");
419 if (IS_ERR(omap->xclk60mhsp1_ck)) { 419 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 break; 463 break;
464 } 464 }
465 switch (omap->port_mode[1]) { 465 switch (omap->port_mode[1]) {
466 case EHCI_HCD_OMAP_MODE_PHY: 466 case OMAP_EHCI_PORT_MODE_PHY:
467 omap->xclk60mhsp2_ck = clk_get(omap->dev, 467 omap->xclk60mhsp2_ck = clk_get(omap->dev,
468 "xclk60mhsp2_ck"); 468 "xclk60mhsp2_ck");
469 if (IS_ERR(omap->xclk60mhsp2_ck)) { 469 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 "Unable to set P2 f-clock\n"); 487 "Unable to set P2 f-clock\n");
488 } 488 }
489 break; 489 break;
490 case EHCI_HCD_OMAP_MODE_TLL: 490 case OMAP_EHCI_PORT_MODE_TLL:
491 omap->xclk60mhsp2_ck = clk_get(omap->dev, 491 omap->xclk60mhsp2_ck = clk_get(omap->dev,
492 "init_60m_fclk"); 492 "init_60m_fclk");
493 if (IS_ERR(omap->xclk60mhsp2_ck)) { 493 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 reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN; 591 reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
592 592
593 if (is_omap_ehci_rev1(omap)) { 593 if (is_omap_ehci_rev1(omap)) {
594 if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_UNKNOWN) 594 if (omap->port_mode[0] == OMAP_USBHS_PORT_MODE_UNUSED)
595 reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS; 595 reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
596 if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_UNKNOWN) 596 if (omap->port_mode[1] == OMAP_USBHS_PORT_MODE_UNUSED)
597 reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS; 597 reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
598 if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_UNKNOWN) 598 if (omap->port_mode[2] == OMAP_USBHS_PORT_MODE_UNUSED)
599 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS; 599 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
600 600
601 /* Bypass the TLL module for PHY mode operation */ 601 /* 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 ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04, 656 ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04,
657 EHCI_INSNREG04_DISABLE_UNSUSPEND); 657 EHCI_INSNREG04_DISABLE_UNSUSPEND);
658 658
659 if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) || 659 if ((omap->port_mode[0] == OMAP_EHCI_PORT_MODE_TLL) ||
660 (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) || 660 (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_TLL) ||
661 (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)) { 661 (omap->port_mode[2] == OMAP_EHCI_PORT_MODE_TLL)) {
662 662
663 if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) 663 if (omap->port_mode[0] == OMAP_EHCI_PORT_MODE_TLL)
664 tll_ch_mask |= OMAP_TLL_CHANNEL_1_EN_MASK; 664 tll_ch_mask |= OMAP_TLL_CHANNEL_1_EN_MASK;
665 if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) 665 if (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_TLL)
666 tll_ch_mask |= OMAP_TLL_CHANNEL_2_EN_MASK; 666 tll_ch_mask |= OMAP_TLL_CHANNEL_2_EN_MASK;
667 if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL) 667 if (omap->port_mode[2] == OMAP_EHCI_PORT_MODE_TLL)
668 tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK; 668 tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK;
669 669
670 /* Enable UTMI mode for required TLL channels */ 670 /* 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 } 686 }
687 687
688 /* Soft reset the PHY using PHY reset command over ULPI */ 688 /* Soft reset the PHY using PHY reset command over ULPI */
689 if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) 689 if (omap->port_mode[0] == OMAP_EHCI_PORT_MODE_PHY)
690 omap_ehci_soft_phy_reset(omap, 0); 690 omap_ehci_soft_phy_reset(omap, 0);
691 if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) 691 if (omap->port_mode[1] == OMAP_EHCI_PORT_MODE_PHY)
692 omap_ehci_soft_phy_reset(omap, 1); 692 omap_ehci_soft_phy_reset(omap, 1);
693 693
694 return 0; 694 return 0;
@@ -903,7 +903,7 @@ static const struct hc_driver ehci_omap_hc_driver;
903 */ 903 */
904static int ehci_hcd_omap_probe(struct platform_device *pdev) 904static int ehci_hcd_omap_probe(struct platform_device *pdev)
905{ 905{
906 struct ehci_hcd_omap_platform_data *pdata = pdev->dev.platform_data; 906 struct usbhs_omap_board_data *pdata = pdev->dev.platform_data;
907 struct ehci_hcd_omap *omap; 907 struct ehci_hcd_omap *omap;
908 struct resource *res; 908 struct resource *res;
909 struct usb_hcd *hcd; 909 struct usb_hcd *hcd;
@@ -981,7 +981,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
981 981
982 /* get ehci regulator and enable */ 982 /* get ehci regulator and enable */
983 for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { 983 for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
984 if (omap->port_mode[i] != EHCI_HCD_OMAP_MODE_PHY) { 984 if (omap->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) {
985 omap->regulator[i] = NULL; 985 omap->regulator[i] = NULL;
986 continue; 986 continue;
987 } 987 }