aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index a88ad517ec5c..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" */
28static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) 28static 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 */
@@ -195,6 +175,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
195 break; 175 break;
196 } 176 }
197 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
198 ehci_reset(ehci); 197 ehci_reset(ehci);
199 198
200 /* at least the Genesys GL880S needs fixup here */ 199 /* at least the Genesys GL880S needs fixup here */