[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200629161845.6021-8-nsaenzjulienne@suse.de>
Date: Mon, 29 Jun 2020 18:18:43 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: f.fainelli@...il.com, gregkh@...uxfoundation.org, robh@...nel.org,
wahrenst@....net, p.zabel@...gutronix.de, andy.shevchenko@...il.com
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com, tim.gover@...pberrypi.org,
linux-pci@...r.kernel.org, helgaas@...nel.org,
mathias.nyman@...ux.intel.com, lorenzo.pieralisi@....com,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Subject: [PATCH v5 7/9] 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.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
---
Changes since v2:
- Correct reference counting on parent device node
Changes since v1:
- Correct typos
drivers/usb/host/pci-quirks.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 358015328391..977d0b6d7577 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 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
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 &&
--
2.27.0
Powered by blists - more mailing lists