aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-26 00:25:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-26 00:25:02 -0500
commit8f5f90a872c38b4e78f3cc95e8a25434b98e4db2 (patch)
tree36c50b0c97286ab89c85016f7ab281f8e843c05c /drivers/usb/host/ehci-pci.c
parentc0cd2da16b431a2007ea83865f3dd1530c1643a5 (diff)
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
Merge 3.8-rc5 into staging-next
This resolves a merge issue with a iio driver, and the zram code. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index dabb20494826..170b9399e09f 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -200,6 +200,26 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
200 break; 200 break;
201 } 201 }
202 202
203 /* optional debug port, normally in the first BAR */
204 temp = pci_find_capability(pdev, PCI_CAP_ID_DBG);
205 if (temp) {
206 pci_read_config_dword(pdev, temp, &temp);
207 temp >>= 16;
208 if (((temp >> 13) & 7) == 1) {
209 u32 hcs_params = ehci_readl(ehci,
210 &ehci->caps->hcs_params);
211
212 temp &= 0x1fff;
213 ehci->debug = hcd->regs + temp;
214 temp = ehci_readl(ehci, &ehci->debug->control);
215 ehci_info(ehci, "debug port %d%s\n",
216 HCS_DEBUG_PORT(hcs_params),
217 (temp & DBGP_ENABLED) ? " IN USE" : "");
218 if (!(temp & DBGP_ENABLED))
219 ehci->debug = NULL;
220 }
221 }
222
203 retval = ehci_setup(hcd); 223 retval = ehci_setup(hcd);
204 if (retval) 224 if (retval)
205 return retval; 225 return retval;
@@ -228,25 +248,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
228 break; 248 break;
229 } 249 }
230 250
231 /* optional debug port, normally in the first BAR */
232 temp = pci_find_capability(pdev, 0x0a);
233 if (temp) {
234 pci_read_config_dword(pdev, temp, &temp);
235 temp >>= 16;
236 if ((temp & (3 << 13)) == (1 << 13)) {
237 temp &= 0x1fff;
238 ehci->debug = hcd->regs + temp;
239 temp = ehci_readl(ehci, &ehci->debug->control);
240 ehci_info(ehci, "debug port %d%s\n",
241 HCS_DEBUG_PORT(ehci->hcs_params),
242 (temp & DBGP_ENABLED)
243 ? " IN USE"
244 : "");
245 if (!(temp & DBGP_ENABLED))
246 ehci->debug = NULL;
247 }
248 }
249
250 /* at least the Genesys GL880S needs fixup here */ 251 /* at least the Genesys GL880S needs fixup here */
251 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); 252 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
252 temp &= 0x0f; 253 temp &= 0x0f;