Lines Matching +full:bcm2711 +full:- +full:pcie

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"
144 * amd_chipset_sb_type_init - initialize amd chipset southbridge type
154 pinfo->sb_type.gen = AMD_CHIPSET_UNKNOWN; in amd_chipset_sb_type_init()
156 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, in amd_chipset_sb_type_init()
158 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
159 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
161 pinfo->sb_type.gen = AMD_CHIPSET_SB600; in amd_chipset_sb_type_init()
163 pinfo->sb_type.gen = AMD_CHIPSET_SB700; in amd_chipset_sb_type_init()
165 pinfo->sb_type.gen = AMD_CHIPSET_SB800; in amd_chipset_sb_type_init()
167 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, in amd_chipset_sb_type_init()
170 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
171 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
173 pinfo->sb_type.gen = AMD_CHIPSET_HUDSON2; in amd_chipset_sb_type_init()
175 pinfo->sb_type.gen = AMD_CHIPSET_BOLTON; in amd_chipset_sb_type_init()
177 pinfo->sb_type.gen = AMD_CHIPSET_YANGTZE; in amd_chipset_sb_type_init()
179 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, in amd_chipset_sb_type_init()
181 if (pinfo->smbus_dev) { in amd_chipset_sb_type_init()
182 rev = pinfo->smbus_dev->revision; in amd_chipset_sb_type_init()
183 pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN; in amd_chipset_sb_type_init()
185 pinfo->sb_type.gen = NOT_AMD_CHIPSET; in amd_chipset_sb_type_init()
190 pinfo->sb_type.rev = rev; in amd_chipset_sb_type_init()
269 /* race - someone else was faster - drop devices */ in usb_amd_find_chipset_info()
280 /* no race - commit the result */ in usb_amd_find_chipset_info()
293 dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n"); in usb_hcd_amd_remote_wakeup_quirk()
316 /* SB800 needs pre-fetch fix */ in usb_amd_prefetch_quirk()
329 * The hardware normally enables the A-link power management feature, which
353 amd_chipset.isoc_reqs--; in usb_amd_quirk_pll()
466 for (retry_count = 1000; retry_count > 0; --retry_count) { in usb_asmedia_wait_write()
471 dev_err(&pdev->dev, "%s: check_ready ERROR", __func__); in usb_asmedia_wait_write()
472 return -EIO; in usb_asmedia_wait_write()
481 dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__); in usb_asmedia_wait_write()
482 return -ETIMEDOUT; in usb_asmedia_wait_write()
518 amd_chipset.probe_count--; in usb_amd_dev_put()
580 switch (pdev->device) { in usb_amd_pt_check_port()
590 port_shift = port - 7; in usb_amd_pt_check_port()
604 port_shift = port - 3; in usb_amd_pt_check_port()
618 port_shift = port - 4; in usb_amd_pt_check_port()
645 /* Reset the HC - this will force us to get a in uhci_reset_hc()
654 dev_warn(&pdev->dev, "HCRESET not completed yet!\n"); in uhci_reset_hc()
687 dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n", in uhci_check_and_reset_hc()
695 dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n", in uhci_check_and_reset_hc()
702 dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n", in uhci_check_and_reset_hc()
709 dev_dbg(&pdev->dev, "Performing full reset\n"); in uhci_check_and_reset_hc()
766 if (pdev->vendor == PCI_VENDOR_ID_AL && pdev->device == 0x5237) in quirk_usb_handoff_ohci()
771 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ in quirk_usb_handoff_ohci()
783 wait_time -= 10; in quirk_usb_handoff_ohci()
787 dev_warn(&pdev->dev, in quirk_usb_handoff_ohci()
807 for (cnt = 30; cnt > 0; --cnt) { /* ... allow extra time */ in quirk_usb_handoff_ohci()
825 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-CE-133"),
832 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
839 DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
865 if (pdev->vendor == 0x8086 && (pdev->device == 0x283a || in ehci_bios_handoff()
866 pdev->device == 0x27cc)) { in ehci_bios_handoff()
872 dev_dbg(&pdev->dev, "EHCI: BIOS handoff\n"); in ehci_bios_handoff()
880 /* BIOS workaround (?): be sure the pre-Linux code in ehci_bios_handoff()
901 msec -= 10; in ehci_bios_handoff()
911 dev_warn(&pdev->dev, in ehci_bios_handoff()
950 while (offset && --count) { in quirk_usb_disable_ehci()
961 dev_warn(&pdev->dev, in quirk_usb_disable_ehci()
968 dev_printk(KERN_DEBUG, &pdev->dev, "EHCI: capability loop?\n"); in quirk_usb_disable_ehci()
983 wait_time -= 100; in quirk_usb_disable_ehci()
997 * handshake - spin reading a register until handshake completes
1006 * Returns -ETIMEDOUT if this condition is not true after
1031 * We write into the xHC's PCI configuration space in some Intel-specific
1043 /* Sony VAIO t-series with subsystem device ID 90a8 is not capable of in usb_enable_intel_xhci_ports()
1046 if (xhci_pdev->subsystem_vendor == PCI_VENDOR_ID_SONY && in usb_enable_intel_xhci_ports()
1047 xhci_pdev->subsystem_device == 0x90a8) in usb_enable_intel_xhci_ports()
1052 if (companion->class == PCI_CLASS_SERIAL_USB_EHCI && in usb_enable_intel_xhci_ports()
1053 companion->vendor == PCI_VENDOR_ID_INTEL) { in usb_enable_intel_xhci_ports()
1067 dev_warn(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1069 dev_warn(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1081 dev_dbg(&xhci_pdev->dev, "Configurable ports to enable SuperSpeed: 0x%x\n", in usb_enable_intel_xhci_ports()
1093 dev_dbg(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1104 dev_dbg(&xhci_pdev->dev, "Configurable USB 2.0 ports to hand over to xCHI: 0x%x\n", in usb_enable_intel_xhci_ports()
1116 dev_dbg(&xhci_pdev->dev, in usb_enable_intel_xhci_ports()
1132 * Takes care of the handoff between the Pre-OS (i.e. BIOS) and the OS.
1154 * Find the Legacy Support Capability register - in quirk_usb_handoff_xhci()
1164 dev_warn(&pdev->dev, "xHCI controller failing to respond"); in quirk_usb_handoff_xhci()
1170 if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) || in quirk_usb_handoff_xhci()
1171 (pdev->vendor == PCI_VENDOR_ID_RENESAS in quirk_usb_handoff_xhci()
1172 && pdev->device == 0x0014)) { in quirk_usb_handoff_xhci()
1187 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1203 if (pdev->vendor == PCI_VENDOR_ID_INTEL) in quirk_usb_handoff_xhci()
1216 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1226 /* Wait for the HC to halt - poll every 125 usec (one microframe). */ in quirk_usb_handoff_xhci()
1231 dev_warn(&pdev->dev, in quirk_usb_handoff_xhci()
1248 if (pdev->vendor == 0x184e) /* vendor Netlogic */ in quirk_usb_early_handoff()
1253 * taken care of by the board's co-processor. in quirk_usb_early_handoff()
1255 if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { in quirk_usb_early_handoff()
1256 parent = of_get_parent(pdev->bus->dev.of_node); in quirk_usb_early_handoff()
1257 is_rpi = of_device_is_compatible(parent, "brcm,bcm2711-pcie"); in quirk_usb_early_handoff()
1263 if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && in quirk_usb_early_handoff()
1264 pdev->class != PCI_CLASS_SERIAL_USB_OHCI && in quirk_usb_early_handoff()
1265 pdev->class != PCI_CLASS_SERIAL_USB_EHCI && in quirk_usb_early_handoff()
1266 pdev->class != PCI_CLASS_SERIAL_USB_XHCI) in quirk_usb_early_handoff()
1270 dev_warn(&pdev->dev, in quirk_usb_early_handoff()
1274 if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) in quirk_usb_early_handoff()
1276 else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) in quirk_usb_early_handoff()
1278 else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI) in quirk_usb_early_handoff()
1280 else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) in quirk_usb_early_handoff()