summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2020-06-29 18:18:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-18 13:01:11 +0200
commit56132c8db84aa45f0766d82488790c6b28a7748c (patch)
tree687afefeee4e5450a273d4d7425f86a0629be40a
parent83a06a102d709ffe69600310807880d72e3a99a9 (diff)
downloadlinux-56132c8db84aa45f0766d82488790c6b28a7748c.tar.bz2
usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4
The board doesn't need the quirks to be run, and takes care of its own initialization through a reset controller device. So let's bypass them. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629161845.6021-8-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/pci-quirks.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index a81f03f95649..ce32ef864d6a 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -16,6 +16,7 @@
#include <linux/export.h>
#include <linux/acpi.h>
#include <linux/dmi.h>
+#include <linux/of.h>
#include "pci-quirks.h"
#include "xhci-ext-caps.h"
@@ -1244,11 +1245,27 @@ iounmap:
static void quirk_usb_early_handoff(struct pci_dev *pdev)
{
+ struct device_node *parent;
+ bool is_rpi;
+
/* Skip Netlogic mips SoC's internal PCI USB controller.
* This device does not need/support EHCI/OHCI handoff
*/
if (pdev->vendor == 0x184e) /* vendor Netlogic */
return;
+
+ /*
+ * Bypass the Raspberry Pi 4 controller xHCI controller, things are
+ * taken care of by the board's co-processor.
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
+ parent = of_get_parent(pdev->bus->dev.of_node);
+ is_rpi = of_device_is_compatible(parent, "brcm,bcm2711-pcie");
+ of_node_put(parent);
+ if (is_rpi)
+ return;
+ }
+
if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&