• Home
  • Raw
  • Download

Lines Matching full:xhci

3  * xHCI host controller driver PCI Bus Glue.
17 #include "xhci.h"
18 #include "xhci-trace.h"
19 #include "xhci-pci.h"
89 static int xhci_pci_reinit(struct xhci_hcd *xhci, struct pci_dev *pdev) in xhci_pci_reinit() argument
99 xhci_dbg(xhci, "MWI active\n"); in xhci_pci_reinit()
101 xhci_dbg(xhci, "Finished xhci_pci_reinit\n"); in xhci_pci_reinit()
105 static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_pci_quirks() argument
115 xhci->quirks |= driver_data->quirks; in xhci_pci_quirks()
124 xhci->quirks |= XHCI_RESET_EP_QUIRK; in xhci_pci_quirks()
125 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks()
131 xhci->quirks |= XHCI_SLOW_SUSPEND; in xhci_pci_quirks()
132 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks()
138 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
143 xhci->quirks |= XHCI_BROKEN_MSI; in xhci_pci_quirks()
144 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks()
148 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
153 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
157 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
160 xhci->quirks |= XHCI_NEC_HOST; in xhci_pci_quirks()
162 if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96) in xhci_pci_quirks()
163 xhci->quirks |= XHCI_AMD_0x96_HOST; in xhci_pci_quirks()
167 xhci->quirks |= XHCI_AMD_PLL_FIX; in xhci_pci_quirks()
174 xhci->quirks |= XHCI_SUSPEND_DELAY; in xhci_pci_quirks()
178 xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND; in xhci_pci_quirks()
181 xhci->quirks |= XHCI_DISABLE_SPARSE; in xhci_pci_quirks()
182 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
186 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
193 xhci->quirks |= XHCI_U2_DISABLE_WAKE; in xhci_pci_quirks()
196 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_pci_quirks()
197 xhci->quirks |= XHCI_INTEL_HOST; in xhci_pci_quirks()
198 xhci->quirks |= XHCI_AVOID_BEI; in xhci_pci_quirks()
202 xhci->quirks |= XHCI_EP_LIMIT_QUIRK; in xhci_pci_quirks()
203 xhci->limit_active_eps = 64; in xhci_pci_quirks()
204 xhci->quirks |= XHCI_SW_BW_CHECKING; in xhci_pci_quirks()
208 * switch the ports from xHCI to EHCI on shutdown. We can't use in xhci_pci_quirks()
213 xhci->quirks |= XHCI_SPURIOUS_REBOOT; in xhci_pci_quirks()
218 xhci->quirks |= XHCI_SPURIOUS_REBOOT; in xhci_pci_quirks()
219 xhci->quirks |= XHCI_SPURIOUS_WAKEUP; in xhci_pci_quirks()
230 xhci->quirks |= XHCI_PME_STUCK_QUIRK; in xhci_pci_quirks()
234 xhci->quirks |= XHCI_SSIC_PORT_UNUSED; in xhci_pci_quirks()
239 xhci->quirks |= XHCI_INTEL_USB_ROLE_SW; in xhci_pci_quirks()
246 xhci->quirks |= XHCI_MISSING_CAS; in xhci_pci_quirks()
251 xhci->quirks |= XHCI_RESET_TO_DEFAULT; in xhci_pci_quirks()
265 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in xhci_pci_quirks()
269 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
270 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
271 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
275 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
276 xhci->quirks |= XHCI_ZERO_64B_REGS; in xhci_pci_quirks()
277 xhci->quirks |= XHCI_LWP_QUIRK; in xhci_pci_quirks()
281 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
282 xhci->quirks |= XHCI_ZERO_64B_REGS; in xhci_pci_quirks()
283 xhci->quirks |= XHCI_LWP_QUIRK; in xhci_pci_quirks()
286 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
291 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
294 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_pci_quirks()
295 xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; in xhci_pci_quirks()
304 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; in xhci_pci_quirks()
305 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
309 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
310 xhci->quirks |= XHCI_NO_64BIT_SUPPORT; in xhci_pci_quirks()
316 xhci->quirks |= XHCI_NO_64BIT_SUPPORT; in xhci_pci_quirks()
320 xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL; in xhci_pci_quirks()
323 xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7; in xhci_pci_quirks()
328 xhci->quirks |= XHCI_RESET_PLL_ON_DISCONNECT; in xhci_pci_quirks()
333 xhci->quirks |= XHCI_NO_SOFT_RETRY; in xhci_pci_quirks()
336 xhci->quirks |= XHCI_ZHAOXIN_HOST; in xhci_pci_quirks()
339 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
340 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; in xhci_pci_quirks()
344 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; in xhci_pci_quirks()
348 if (xhci->hci_version >= 0x120) in xhci_pci_quirks()
349 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in xhci_pci_quirks()
351 if (xhci->quirks & XHCI_RESET_ON_RESUME) in xhci_pci_quirks()
352 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks()
371 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_find_lpm_incapable_ports() local
372 struct xhci_hub *rhub = &xhci->usb3_rhub; in xhci_find_lpm_incapable_ports()
405 struct xhci_hcd *xhci; in xhci_pci_setup() local
409 xhci = hcd_to_xhci(hcd); in xhci_pci_setup()
410 if (!xhci->sbrn) in xhci_pci_setup()
411 pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); in xhci_pci_setup()
414 xhci->imod_interval = 40000; in xhci_pci_setup()
423 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_setup()
426 xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int) xhci->sbrn); in xhci_pci_setup()
429 return xhci_pci_reinit(xhci, pdev); in xhci_pci_setup()
444 * function) in order to create a second roothub under xHCI.
449 struct xhci_hcd *xhci; in xhci_pci_probe() local
482 xhci = hcd_to_xhci(hcd); in xhci_pci_probe()
483 xhci->reset = reset; in xhci_pci_probe()
484 xhci->shared_hcd = usb_create_shared_hcd(&xhci_pci_hc_driver, &dev->dev, in xhci_pci_probe()
486 if (!xhci->shared_hcd) { in xhci_pci_probe()
491 retval = xhci_ext_cap_init(xhci); in xhci_pci_probe()
495 retval = usb_add_hcd(xhci->shared_hcd, dev->irq, in xhci_pci_probe()
501 if (!(xhci->quirks & XHCI_BROKEN_STREAMS) && in xhci_pci_probe()
502 HCC_MAX_PSA(xhci->hcc_params) >= 4) in xhci_pci_probe()
503 xhci->shared_hcd->can_do_streams = 1; in xhci_pci_probe()
510 else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW) in xhci_pci_probe()
518 usb_put_hcd(xhci->shared_hcd); in xhci_pci_probe()
528 struct xhci_hcd *xhci; in xhci_pci_remove() local
530 xhci = hcd_to_xhci(pci_get_drvdata(dev)); in xhci_pci_remove()
531 if (xhci->quirks & XHCI_RENESAS_FW_QUIRK) in xhci_pci_remove()
534 xhci->xhc_state |= XHCI_STATE_REMOVING; in xhci_pci_remove()
536 if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW) in xhci_pci_remove()
539 if (xhci->shared_hcd) { in xhci_pci_remove()
540 usb_remove_hcd(xhci->shared_hcd); in xhci_pci_remove()
541 usb_put_hcd(xhci->shared_hcd); in xhci_pci_remove()
542 xhci->shared_hcd = NULL; in xhci_pci_remove()
546 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) in xhci_pci_remove()
550 if (xhci->quirks & XHCI_LWP_QUIRK) in xhci_pci_remove()
558 * In some Intel xHCI controllers, in order to get D3 working,
560 * SSIC PORT need to be marked as "unused" before putting xHCI
562 * Without this change, xHCI might not enter D3 state.
566 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_ssic_port_unused_quirk() local
572 reg = (void __iomem *) xhci->cap_regs + in xhci_ssic_port_unused_quirk()
596 * Make sure PME works on some Intel xHCI controllers by writing 1 to clear
601 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pme_quirk() local
605 reg = (void __iomem *) xhci->cap_regs + 0x80a4; in xhci_pme_quirk()
622 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_suspend() local
630 if (xhci->quirks & XHCI_COMP_MODE_QUIRK) in xhci_pci_suspend()
633 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_suspend()
636 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED) in xhci_pci_suspend()
639 if (xhci->quirks & XHCI_DISABLE_SPARSE) in xhci_pci_suspend()
642 ret = xhci_suspend(xhci, do_wakeup); in xhci_pci_suspend()
643 if (ret && (xhci->quirks & XHCI_SSIC_PORT_UNUSED)) in xhci_pci_suspend()
651 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_resume() local
655 reset_control_reset(xhci->reset); in xhci_pci_resume()
658 * not support xHCI natively. That means that during system resume, it in xhci_pci_resume()
662 * The BIOS is supposed to remember whether the OS had xHCI ports in xhci_pci_resume()
663 * enabled before resume, and switch the ports back to xHCI when the in xhci_pci_resume()
667 * Unconditionally switch the ports back to xHCI after a system resume. in xhci_pci_resume()
668 * It should not matter whether the EHCI or xHCI controller is in xhci_pci_resume()
669 * resumed first. It's enough to do the switchover in xHCI because in xhci_pci_resume()
672 * xHCI host controllers) have been resumed. in xhci_pci_resume()
678 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED) in xhci_pci_resume()
681 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_resume()
684 retval = xhci_resume(xhci, hibernated); in xhci_pci_resume()
690 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_shutdown() local
696 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) in xhci_pci_shutdown()
700 if (xhci->quirks & XHCI_LWP_QUIRK) in xhci_pci_shutdown()
720 /* handle any USB 3.0 xHCI controller */
729 * load firmware, so don't encumber the xhci-pci driver with it.
770 MODULE_DESCRIPTION("xHCI PCI Host Controller Driver");