diff options
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index c2f1b7df918c..378861b9d79a 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -27,28 +27,8 @@ | |||
27 | /* called after powerup, by probe or system-pm "wakeup" */ | 27 | /* called after powerup, by probe or system-pm "wakeup" */ |
28 | static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) | 28 | static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) |
29 | { | 29 | { |
30 | u32 temp; | ||
31 | int retval; | 30 | int retval; |
32 | 31 | ||
33 | /* optional debug port, normally in the first BAR */ | ||
34 | temp = pci_find_capability(pdev, 0x0a); | ||
35 | if (temp) { | ||
36 | pci_read_config_dword(pdev, temp, &temp); | ||
37 | temp >>= 16; | ||
38 | if ((temp & (3 << 13)) == (1 << 13)) { | ||
39 | temp &= 0x1fff; | ||
40 | ehci->debug = ehci_to_hcd(ehci)->regs + temp; | ||
41 | temp = ehci_readl(ehci, &ehci->debug->control); | ||
42 | ehci_info(ehci, "debug port %d%s\n", | ||
43 | HCS_DEBUG_PORT(ehci->hcs_params), | ||
44 | (temp & DBGP_ENABLED) | ||
45 | ? " IN USE" | ||
46 | : ""); | ||
47 | if (!(temp & DBGP_ENABLED)) | ||
48 | ehci->debug = NULL; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | /* we expect static quirk code to handle the "extended capabilities" | 32 | /* we expect static quirk code to handle the "extended capabilities" |
53 | * (currently just BIOS handoff) allowed starting with EHCI 0.96 | 33 | * (currently just BIOS handoff) allowed starting with EHCI 0.96 |
54 | */ | 34 | */ |
@@ -129,6 +109,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
129 | return retval; | 109 | return retval; |
130 | 110 | ||
131 | switch (pdev->vendor) { | 111 | switch (pdev->vendor) { |
112 | case PCI_VENDOR_ID_INTEL: | ||
113 | ehci->need_io_watchdog = 0; | ||
114 | break; | ||
132 | case PCI_VENDOR_ID_TDI: | 115 | case PCI_VENDOR_ID_TDI: |
133 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | 116 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { |
134 | hcd->has_tt = 1; | 117 | hcd->has_tt = 1; |
@@ -192,6 +175,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
192 | break; | 175 | break; |
193 | } | 176 | } |
194 | 177 | ||
178 | /* optional debug port, normally in the first BAR */ | ||
179 | temp = pci_find_capability(pdev, 0x0a); | ||
180 | if (temp) { | ||
181 | pci_read_config_dword(pdev, temp, &temp); | ||
182 | temp >>= 16; | ||
183 | if ((temp & (3 << 13)) == (1 << 13)) { | ||
184 | temp &= 0x1fff; | ||
185 | ehci->debug = ehci_to_hcd(ehci)->regs + temp; | ||
186 | temp = ehci_readl(ehci, &ehci->debug->control); | ||
187 | ehci_info(ehci, "debug port %d%s\n", | ||
188 | HCS_DEBUG_PORT(ehci->hcs_params), | ||
189 | (temp & DBGP_ENABLED) | ||
190 | ? " IN USE" | ||
191 | : ""); | ||
192 | if (!(temp & DBGP_ENABLED)) | ||
193 | ehci->debug = NULL; | ||
194 | } | ||
195 | } | ||
196 | |||
195 | ehci_reset(ehci); | 197 | ehci_reset(ehci); |
196 | 198 | ||
197 | /* at least the Genesys GL880S needs fixup here */ | 199 | /* at least the Genesys GL880S needs fixup here */ |
@@ -242,7 +244,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
242 | * System suspend currently expects to be able to suspend the entire | 244 | * System suspend currently expects to be able to suspend the entire |
243 | * device tree, device-at-a-time. If we failed selective suspend | 245 | * device tree, device-at-a-time. If we failed selective suspend |
244 | * reports, system suspend would fail; so the root hub code must claim | 246 | * reports, system suspend would fail; so the root hub code must claim |
245 | * success. That's lying to usbcore, and it matters for for runtime | 247 | * success. That's lying to usbcore, and it matters for runtime |
246 | * PM scenarios with selective suspend and remote wakeup... | 248 | * PM scenarios with selective suspend and remote wakeup... |
247 | */ | 249 | */ |
248 | if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev)) | 250 | if (ehci->no_selective_suspend && device_can_wakeup(&pdev->dev)) |