diff options
| -rw-r--r-- | drivers/usb/host/ehci-fsl.c | 10 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-q.c | 9 | ||||
| -rw-r--r-- | drivers/usb/host/ehci.h | 15 |
3 files changed, 33 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index c6012d6cd5..59f90f76ee 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
| @@ -198,6 +198,16 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd) | |||
| 198 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); | 198 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); |
| 199 | 199 | ||
| 200 | if (pdata->operating_mode == FSL_USB2_MPH_HOST) { | 200 | if (pdata->operating_mode == FSL_USB2_MPH_HOST) { |
| 201 | unsigned int chip, rev, svr; | ||
| 202 | |||
| 203 | svr = mfspr(SPRN_SVR); | ||
| 204 | chip = svr >> 16; | ||
| 205 | rev = (svr >> 4) & 0xf; | ||
| 206 | |||
| 207 | /* Deal with USB Erratum #14 on MPC834x Rev 1.0 & 1.1 chips */ | ||
| 208 | if ((rev == 1) && (chip >= 0x8050) && (chip <= 0x8055)) | ||
| 209 | ehci->has_fsl_port_bug = 1; | ||
| 210 | |||
| 201 | if (pdata->port_enables & FSL_USB2_PORT0_ENABLED) | 211 | if (pdata->port_enables & FSL_USB2_PORT0_ENABLED) |
| 202 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); | 212 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); |
| 203 | if (pdata->port_enables & FSL_USB2_PORT1_ENABLED) | 213 | if (pdata->port_enables & FSL_USB2_PORT1_ENABLED) |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 9b13bf2fa9..6e28e593c0 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
| @@ -721,7 +721,14 @@ qh_make ( | |||
| 721 | info1 |= maxp << 16; | 721 | info1 |= maxp << 16; |
| 722 | 722 | ||
| 723 | info2 |= (EHCI_TUNE_MULT_TT << 30); | 723 | info2 |= (EHCI_TUNE_MULT_TT << 30); |
| 724 | info2 |= urb->dev->ttport << 23; | 724 | |
| 725 | /* Some Freescale processors have an erratum in which the | ||
| 726 | * port number in the queue head was 0..N-1 instead of 1..N. | ||
| 727 | */ | ||
| 728 | if (ehci_has_fsl_portno_bug(ehci)) | ||
| 729 | info2 |= (urb->dev->ttport-1) << 23; | ||
| 730 | else | ||
| 731 | info2 |= urb->dev->ttport << 23; | ||
| 725 | 732 | ||
| 726 | /* set the address of the TT; for TDI's integrated | 733 | /* set the address of the TT; for TDI's integrated |
| 727 | * root hub tt, leave it zeroed. | 734 | * root hub tt, leave it zeroed. |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 86af41c41d..679c1cdcc9 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
| @@ -88,8 +88,11 @@ struct ehci_hcd { /* one per controller */ | |||
| 88 | unsigned long next_statechange; | 88 | unsigned long next_statechange; |
| 89 | u32 command; | 89 | u32 command; |
| 90 | 90 | ||
| 91 | /* SILICON QUIRKS */ | ||
| 91 | unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ | 92 | unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ |
| 92 | unsigned no_selective_suspend:1; | 93 | unsigned no_selective_suspend:1; |
| 94 | unsigned has_fsl_port_bug:1; /* FreeScale */ | ||
| 95 | |||
| 93 | u8 sbrn; /* packed release number */ | 96 | u8 sbrn; /* packed release number */ |
| 94 | 97 | ||
| 95 | /* irq statistics */ | 98 | /* irq statistics */ |
| @@ -639,6 +642,18 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) | |||
| 639 | 642 | ||
| 640 | /*-------------------------------------------------------------------------*/ | 643 | /*-------------------------------------------------------------------------*/ |
| 641 | 644 | ||
| 645 | #ifdef CONFIG_PPC_83xx | ||
| 646 | /* Some Freescale processors have an erratum in which the TT | ||
| 647 | * port number in the queue head was 0..N-1 instead of 1..N. | ||
| 648 | */ | ||
| 649 | #define ehci_has_fsl_portno_bug(e) ((e)->has_fsl_port_bug) | ||
| 650 | #else | ||
| 651 | #define ehci_has_fsl_portno_bug(e) (0) | ||
| 652 | #endif | ||
| 653 | |||
| 654 | |||
| 655 | /*-------------------------------------------------------------------------*/ | ||
| 656 | |||
| 642 | #ifndef DEBUG | 657 | #ifndef DEBUG |
| 643 | #define STUB_DEBUG_FILES | 658 | #define STUB_DEBUG_FILES |
| 644 | #endif /* DEBUG */ | 659 | #endif /* DEBUG */ |
