• 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()
280 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
281 xhci->quirks |= XHCI_ZERO_64B_REGS; in xhci_pci_quirks()
284 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
289 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
292 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_pci_quirks()
293 xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; in xhci_pci_quirks()
302 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; in xhci_pci_quirks()
303 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks()
307 xhci->quirks |= XHCI_TRUST_TX_LENGTH; in xhci_pci_quirks()
308 xhci->quirks |= XHCI_NO_64BIT_SUPPORT; in xhci_pci_quirks()
314 xhci->quirks |= XHCI_NO_64BIT_SUPPORT; in xhci_pci_quirks()
318 xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL; in xhci_pci_quirks()
321 xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7; in xhci_pci_quirks()
326 xhci->quirks |= XHCI_RESET_PLL_ON_DISCONNECT; in xhci_pci_quirks()
331 xhci->quirks |= XHCI_NO_SOFT_RETRY; in xhci_pci_quirks()
334 xhci->quirks |= XHCI_ZHAOXIN_HOST; in xhci_pci_quirks()
337 xhci->quirks |= XHCI_RESET_ON_RESUME; in xhci_pci_quirks()
338 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; in xhci_pci_quirks()
342 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; in xhci_pci_quirks()
346 if (xhci->hci_version >= 0x120) in xhci_pci_quirks()
347 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in xhci_pci_quirks()
349 if (xhci->quirks & XHCI_RESET_ON_RESUME) in xhci_pci_quirks()
350 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks()
369 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_find_lpm_incapable_ports() local
370 struct xhci_hub *rhub = &xhci->usb3_rhub; in xhci_find_lpm_incapable_ports()
403 struct xhci_hcd *xhci; in xhci_pci_setup() local
407 xhci = hcd_to_xhci(hcd); in xhci_pci_setup()
408 if (!xhci->sbrn) in xhci_pci_setup()
409 pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); in xhci_pci_setup()
412 xhci->imod_interval = 40000; in xhci_pci_setup()
421 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_setup()
424 xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int) xhci->sbrn); in xhci_pci_setup()
427 return xhci_pci_reinit(xhci, pdev); in xhci_pci_setup()
442 * function) in order to create a second roothub under xHCI.
447 struct xhci_hcd *xhci; in xhci_pci_probe() local
480 xhci = hcd_to_xhci(hcd); in xhci_pci_probe()
481 xhci->reset = reset; in xhci_pci_probe()
482 xhci->shared_hcd = usb_create_shared_hcd(&xhci_pci_hc_driver, &dev->dev, in xhci_pci_probe()
484 if (!xhci->shared_hcd) { in xhci_pci_probe()
489 retval = xhci_ext_cap_init(xhci); in xhci_pci_probe()
493 retval = usb_add_hcd(xhci->shared_hcd, dev->irq, in xhci_pci_probe()
499 if (!(xhci->quirks & XHCI_BROKEN_STREAMS) && in xhci_pci_probe()
500 HCC_MAX_PSA(xhci->hcc_params) >= 4) in xhci_pci_probe()
501 xhci->shared_hcd->can_do_streams = 1; in xhci_pci_probe()
508 else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW) in xhci_pci_probe()
516 usb_put_hcd(xhci->shared_hcd); in xhci_pci_probe()
526 struct xhci_hcd *xhci; in xhci_pci_remove() local
528 xhci = hcd_to_xhci(pci_get_drvdata(dev)); in xhci_pci_remove()
529 if (xhci->quirks & XHCI_RENESAS_FW_QUIRK) in xhci_pci_remove()
532 xhci->xhc_state |= XHCI_STATE_REMOVING; in xhci_pci_remove()
534 if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW) in xhci_pci_remove()
537 if (xhci->shared_hcd) { in xhci_pci_remove()
538 usb_remove_hcd(xhci->shared_hcd); in xhci_pci_remove()
539 usb_put_hcd(xhci->shared_hcd); in xhci_pci_remove()
540 xhci->shared_hcd = NULL; in xhci_pci_remove()
544 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) in xhci_pci_remove()
552 * In some Intel xHCI controllers, in order to get D3 working,
554 * SSIC PORT need to be marked as "unused" before putting xHCI
556 * Without this change, xHCI might not enter D3 state.
560 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_ssic_port_unused_quirk() local
566 reg = (void __iomem *) xhci->cap_regs + in xhci_ssic_port_unused_quirk()
590 * Make sure PME works on some Intel xHCI controllers by writing 1 to clear
595 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pme_quirk() local
599 reg = (void __iomem *) xhci->cap_regs + 0x80a4; in xhci_pme_quirk()
616 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_suspend() local
624 if (xhci->quirks & XHCI_COMP_MODE_QUIRK) in xhci_pci_suspend()
627 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_suspend()
630 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED) in xhci_pci_suspend()
633 if (xhci->quirks & XHCI_DISABLE_SPARSE) in xhci_pci_suspend()
636 ret = xhci_suspend(xhci, do_wakeup); in xhci_pci_suspend()
637 if (ret && (xhci->quirks & XHCI_SSIC_PORT_UNUSED)) in xhci_pci_suspend()
645 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_resume() local
649 reset_control_reset(xhci->reset); in xhci_pci_resume()
652 * not support xHCI natively. That means that during system resume, it in xhci_pci_resume()
656 * The BIOS is supposed to remember whether the OS had xHCI ports in xhci_pci_resume()
657 * enabled before resume, and switch the ports back to xHCI when the in xhci_pci_resume()
661 * Unconditionally switch the ports back to xHCI after a system resume. in xhci_pci_resume()
662 * It should not matter whether the EHCI or xHCI controller is in xhci_pci_resume()
663 * resumed first. It's enough to do the switchover in xHCI because in xhci_pci_resume()
666 * xHCI host controllers) have been resumed. in xhci_pci_resume()
672 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED) in xhci_pci_resume()
675 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) in xhci_pci_resume()
678 retval = xhci_resume(xhci, hibernated); in xhci_pci_resume()
684 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_shutdown() local
690 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) in xhci_pci_shutdown()
710 /* handle any USB 3.0 xHCI controller */
719 * load firmware, so don't encumber the xhci-pci driver with it.
760 MODULE_DESCRIPTION("xHCI PCI Host Controller Driver");