Lines Matching +full:pre +full:- +full:configurable
1 // SPDX-License-Identifier: GPL-2.0
4 * Some of it includes work-arounds for PCI hardware and BIOS quirks.
5 * It may need to run early during booting -- before USB would normally
6 * initialize -- to ensure that Linux doesn't use any legacy modes.
22 #include "pci-quirks.h"
23 #include "xhci-ext-caps.h"
146 * amd_chipset_sb_type_init - initialize amd chipset southbridge type
156 pinfo->sb_type.gen = AMD_CHIPSET_UNKNOWN; in amd_chipset_sb_type_init()
158 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, in amd_chipset_sb_type_init()
160 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
161 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
163 pinfo->sb_type.gen = AMD_CHIPSET_SB600; in amd_chipset_sb_type_init()
165 pinfo->sb_type.gen = AMD_CHIPSET_SB700; in amd_chipset_sb_type_init()
167 pinfo->sb_type.gen = AMD_CHIPSET_SB800; in amd_chipset_sb_type_init()
169 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, in amd_chipset_sb_type_init()
172 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
173 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
175 pinfo->sb_type.gen = AMD_CHIPSET_HUDSON2; in amd_chipset_sb_type_init()
177 pinfo->sb_type.gen = AMD_CHIPSET_BOLTON; in amd_chipset_sb_type_init()
179 pinfo->sb_type.gen = AMD_CHIPSET_YANGTZE; in amd_chipset_sb_type_init()
181 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, in amd_chipset_sb_type_init()
183 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
184 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
185 pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN; in amd_chipset_sb_type_init()
187 pinfo->sb_type.gen = NOT_AMD_CHIPSET; in amd_chipset_sb_type_init()
192 pinfo->sb_type.rev = rev; in amd_chipset_sb_type_init()
271 /* race - someone else was faster - drop devices */ in usb_amd_find_chipset_info()
282 /* no race - commit the result */ in usb_amd_find_chipset_info()
295 dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n"); in usb_hcd_amd_remote_wakeup_quirk()
318 /* SB800 needs pre-fetch fix */ in usb_amd_prefetch_quirk()
331 * The hardware normally enables the A-link power management feature, which
355 amd_chipset.isoc_reqs--; in usb_amd_quirk_pll()
476 amd_chipset.probe_count--; in usb_amd_dev_put()
538 switch (pdev->device) { in usb_amd_pt_check_port()
548 port_shift = port - 7; in usb_amd_pt_check_port()
562 port_shift = port - 3; in usb_amd_pt_check_port()
576 port_shift = port - 4; in usb_amd_pt_check_port()
598 for (retry_count = 1000; retry_count > 0; --retry_count) { in usb_asmedia_wait_write()
603 dev_err(&pdev->dev, "%s: check_ready ERROR", __func__); in usb_asmedia_wait_write()
604 return -EIO; in usb_asmedia_wait_write()
613 dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__); in usb_asmedia_wait_write()
614 return -ETIMEDOUT; in usb_asmedia_wait_write()
658 /* Reset the HC - this will force us to get a in uhci_reset_hc()
667 dev_warn(&pdev->dev, "HCRESET not completed yet!\n"); in uhci_reset_hc()
700 dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n", in uhci_check_and_reset_hc()
708 dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n", in uhci_check_and_reset_hc()
715 dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n", in uhci_check_and_reset_hc()
722 dev_dbg(&pdev->dev, "Performing full reset\n"); in uhci_check_and_reset_hc()
778 if (pdev->vendor == PCI_VENDOR_ID_AL && pdev->device == 0x5237) in quirk_usb_handoff_ohci()
783 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ in quirk_usb_handoff_ohci()
795 wait_time -= 10; in quirk_usb_handoff_ohci()
799 dev_warn(&pdev->dev, in quirk_usb_handoff_ohci()
819 for (cnt = 30; cnt > 0; --cnt) { /* ... allow extra time */ in quirk_usb_handoff_ohci()
837 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-CE-133"),
844 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
851 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
877 if (pdev->vendor == 0x8086 && (pdev->device == 0x283a || in ehci_bios_handoff()
878 pdev->device == 0x27cc)) { in ehci_bios_handoff()
884 dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n"); in ehci_bios_handoff()
892 /* BIOS workaround (?): be sure the pre-Linux code in ehci_bios_handoff()
913 msec -= 10; in ehci_bios_handoff()
923 dev_warn(&pdev->dev, in ehci_bios_handoff()
962 while (offset && --count) { in quirk_usb_disable_ehci()
973 dev_warn(&pdev->dev, in quirk_usb_disable_ehci()
980 dev_printk(KERN_DEBUG, &pdev->dev, "EHCI: capability loop?\n"); in quirk_usb_disable_ehci()
995 wait_time -= 100; in quirk_usb_disable_ehci()
1009 * handshake - spin reading a register until handshake completes
1018 * Returns -ETIMEDOUT if this condition is not true after
1043 * We write into the xHC's PCI configuration space in some Intel-specific
1055 /* Sony VAIO t-series with subsystem device ID 90a8 is not capable of in usb_enable_intel_xhci_ports()
1058 if (xhci_pdev->subsystem_vendor == PCI_VENDOR_ID_SONY && in usb_enable_intel_xhci_ports()
1059 xhci_pdev->subsystem_device == 0x90a8) in usb_enable_intel_xhci_ports()
1064 if (companion->class == PCI_CLASS_SERIAL_USB_EHCI && in usb_enable_intel_xhci_ports()
1065 companion->vendor == PCI_VENDOR_ID_INTEL) { in usb_enable_intel_xhci_ports()
1079 dev_warn(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1081 dev_warn(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1093 dev_dbg(&xhci_pdev->dev, "Configurable ports to enable SuperSpeed: 0x%x\n", in usb_enable_intel_xhci_ports()
1105 dev_dbg(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1116 dev_dbg(&xhci_pdev->dev, "Configurable USB 2.0 ports to hand over to xCHI: 0x%x\n", in usb_enable_intel_xhci_ports()
1128 dev_dbg(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1144 * Takes care of the handoff between the Pre-OS (i.e. BIOS) and the OS.
1166 * Find the Legacy Support Capability register - in quirk_usb_handoff_xhci()
1176 dev_warn(&pdev->dev, "xHCI controller failing to respond"); in quirk_usb_handoff_xhci()
1182 if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) || in quirk_usb_handoff_xhci()
1183 (pdev->vendor == PCI_VENDOR_ID_RENESAS in quirk_usb_handoff_xhci()
1184 && pdev->device == 0x0014)) { in quirk_usb_handoff_xhci()
1199 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1215 if (pdev->vendor == PCI_VENDOR_ID_INTEL) in quirk_usb_handoff_xhci()
1228 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1238 /* Wait for the HC to halt - poll every 125 usec (one microframe). */ in quirk_usb_handoff_xhci()
1243 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1260 if (pdev->vendor == 0x184e) /* vendor Netlogic */ in quirk_usb_early_handoff()
1265 * taken care of by the board's co-processor. in quirk_usb_early_handoff()
1267 if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { in quirk_usb_early_handoff()
1268 parent = of_get_parent(pdev->bus->dev.of_node); in quirk_usb_early_handoff()
1269 is_rpi = of_device_is_compatible(parent, "brcm,bcm2711-pcie"); in quirk_usb_early_handoff()
1275 if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && in quirk_usb_early_handoff()
1276 pdev->class != PCI_CLASS_SERIAL_USB_OHCI && in quirk_usb_early_handoff()
1277 pdev->class != PCI_CLASS_SERIAL_USB_EHCI && in quirk_usb_early_handoff()
1278 pdev->class != PCI_CLASS_SERIAL_USB_XHCI) in quirk_usb_early_handoff()
1282 dev_warn(&pdev->dev, in quirk_usb_early_handoff()
1286 if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) in quirk_usb_early_handoff()
1288 else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) in quirk_usb_early_handoff()
1290 else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI) in quirk_usb_early_handoff()
1292 else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) in quirk_usb_early_handoff()