From: Thinh Nguyen <thinh.nguyen@synopsys.com>
To: <linux-pci@vger.kernel.org>, Bjorn Helgaas <bhelgaas@google.com>
Cc: Thinh Nguyen <thinh.nguyen@synopsys.com>
Subject: [PATCH 2/2] pci: quirks: Override Synopsys USB 3.x HAPS device driver
Date: Fri, 2 Nov 2018 18:47:44 -0700 [thread overview]
Message-ID: <8faa039d80ba1f8ab2c7192a237ff8431d5cdc4a.1541209477.git.thinhn@synopsys.com> (raw)
In-Reply-To: <62f746c341ea00ccadda47c3cb02eb57f2e90db2.1541209477.git.thinhn@synopsys.com>
Synopsys USB 3.x host HAPS platform has a class code of
PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these
devices should use dwc3-haps driver. Set driver_override to dwc3-haps
for these platforms.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
drivers/pci/quirks.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6bc27b7fd452..5f7c3ade7749 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -618,6 +618,27 @@ static void quirk_amd_nl_class(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
quirk_amd_nl_class);
+/*
+ * Synopsys USB 3.x host HAPS platform has a class code of
+ * PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these
+ * devices should use dwc3-haps driver. Set driver_override to dwc3-haps for
+ * these platforms.
+ */
+static void quirk_synopsys_haps(struct pci_dev *pdev)
+{
+ /* Use dwc3-haps driver instead of xhci-pci */
+ pdev->driver_override = "dwc3-haps";
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SYNOPSYS,
+ PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3,
+ quirk_synopsys_haps);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SYNOPSYS,
+ PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI,
+ quirk_synopsys_haps);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SYNOPSYS,
+ PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31,
+ quirk_synopsys_haps);
+
/*
* Let's make the southbridge information explicit instead of having to
* worry about people probing the ACPI areas, for example.. (Yes, it
--
2.11.0
next prev parent reply other threads:[~2018-11-03 1:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-03 1:47 [PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs Thinh Nguyen
2018-11-03 1:47 ` Thinh Nguyen [this message]
2018-11-05 18:49 ` [PATCH 2/2] pci: quirks: Override Synopsys USB 3.x HAPS device driver Thinh Nguyen
2018-11-06 8:43 ` Felipe Balbi
2018-12-08 2:49 ` Thinh Nguyen
2018-12-10 18:54 ` Bjorn Helgaas
2018-12-10 21:51 ` Thinh Nguyen
2018-11-03 6:25 ` [PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs Greg KH
2018-11-05 18:46 ` Thinh Nguyen
2018-11-05 18:56 ` Greg KH
2018-12-10 18:49 ` Bjorn Helgaas
2018-12-10 21:49 ` Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8faa039d80ba1f8ab2c7192a237ff8431d5cdc4a.1541209477.git.thinhn@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).