diff options
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
| -rw-r--r-- | drivers/usb/host/ehci-hcd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 34a928d3b7d2..15fe3ecd203b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
| @@ -194,6 +194,17 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, | |||
| 194 | return -ETIMEDOUT; | 194 | return -ETIMEDOUT; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | /* check TDI/ARC silicon is in host mode */ | ||
| 198 | static int tdi_in_host_mode (struct ehci_hcd *ehci) | ||
| 199 | { | ||
| 200 | u32 __iomem *reg_ptr; | ||
| 201 | u32 tmp; | ||
| 202 | |||
| 203 | reg_ptr = (u32 __iomem *)(((u8 __iomem *)ehci->regs) + USBMODE); | ||
| 204 | tmp = ehci_readl(ehci, reg_ptr); | ||
| 205 | return (tmp & 3) == USBMODE_CM_HC; | ||
| 206 | } | ||
| 207 | |||
| 197 | /* force HC to halt state from unknown (EHCI spec section 2.3) */ | 208 | /* force HC to halt state from unknown (EHCI spec section 2.3) */ |
| 198 | static int ehci_halt (struct ehci_hcd *ehci) | 209 | static int ehci_halt (struct ehci_hcd *ehci) |
| 199 | { | 210 | { |
| @@ -202,6 +213,10 @@ static int ehci_halt (struct ehci_hcd *ehci) | |||
| 202 | /* disable any irqs left enabled by previous code */ | 213 | /* disable any irqs left enabled by previous code */ |
| 203 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); | 214 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
| 204 | 215 | ||
| 216 | if (ehci_is_TDI(ehci) && tdi_in_host_mode(ehci) == 0) { | ||
| 217 | return 0; | ||
| 218 | } | ||
| 219 | |||
| 205 | if ((temp & STS_HALT) != 0) | 220 | if ((temp & STS_HALT) != 0) |
| 206 | return 0; | 221 | return 0; |
| 207 | 222 | ||
