diff mbox series

[v2,7/9] usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4

Message ID 20200609175003.19793-8-nsaenzjulienne@suse.de (mailing list archive)
State Superseded, archived
Headers show
Series Raspberry Pi 4 USB firmware initialization rework | expand

Commit Message

Nicolas Saenz Julienne June 9, 2020, 5:50 p.m. UTC
The board doesn't need the quirks to be run, and takes care of its own
initialization trough a reset controller device. So let's bypass them.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

---

Changes since v1:
 - Correct typos

 drivers/usb/host/pci-quirks.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Andy Shevchenko June 9, 2020, 6:43 p.m. UTC | #1
On Tue, Jun 9, 2020 at 8:50 PM Nicolas Saenz Julienne
<nsaenzjulienne@suse.de> wrote:
>
> The board doesn't need the quirks to be run, and takes care of its own
> initialization trough a reset controller device. So let's bypass them.

through

...

> +       if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483 &&
> +           of_device_is_compatible(of_get_parent(pdev->bus->dev.of_node),
> +                                   "brcm,bcm2711-pcie"))
> +               return;

No put?
Nicolas Saenz Julienne June 10, 2020, 3:57 p.m. UTC | #2
Hi Andy,
Thanks for the review.

On Tue, 2020-06-09 at 21:43 +0300, Andy Shevchenko wrote:
> On Tue, Jun 9, 2020 at 8:50 PM Nicolas Saenz Julienne
> <nsaenzjulienne@suse.de> wrote:
> > The board doesn't need the quirks to be run, and takes care of its own
> > initialization trough a reset controller device. So let's bypass them.
> 
> through

Noted

> ...
> 
> > +       if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483 &&
> > +           of_device_is_compatible(of_get_parent(pdev->bus->dev.of_node),
> > +                                   "brcm,bcm2711-pcie"))
> > +               return;
> 
> No put?

Missed that, sorry.

Regards,
Nicolas
diff mbox series

Patch

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 92150ecdb036..294412ebbd0b 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -16,6 +16,8 @@ 
 #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"
 
@@ -1248,6 +1250,16 @@  static void quirk_usb_early_handoff(struct pci_dev *pdev)
 	 */
 	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 &&
+	    of_device_is_compatible(of_get_parent(pdev->bus->dev.of_node),
+				    "brcm,bcm2711-pcie"))
+		return;
+
 	if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&