Message ID | 8faa039d80ba1f8ab2c7192a237ff8431d5cdc4a.1541209477.git.thinhn@synopsys.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | [1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs | expand |
++ linux-usb ++ Greg On 11/2/2018 6:47 PM, Thinh Nguyen wrote: > 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
Thinh Nguyen <thinh.nguyen@synopsys.com> writes: > ++ linux-usb > ++ Greg > > On 11/2/2018 6:47 PM, Thinh Nguyen wrote: >> 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> FWIW: Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Hi Bjorn, On 11/6/2018 12:44 AM, Felipe Balbi wrote: > Thinh Nguyen <thinh.nguyen@synopsys.com> writes: > >> ++ linux-usb >> ++ Greg >> >> On 11/2/2018 6:47 PM, Thinh Nguyen wrote: >>> 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> > FWIW: > > Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> > Please let me know if you're ok with these 2 patches. (This and patch subject "[PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs") Thanks, Thinh
On Sat, Dec 08, 2018 at 02:49:09AM +0000, Thinh Nguyen wrote: > Hi Bjorn, > > On 11/6/2018 12:44 AM, Felipe Balbi wrote: > > Thinh Nguyen <thinh.nguyen@synopsys.com> writes: > > > >> ++ linux-usb > >> ++ Greg > >> > >> On 11/2/2018 6:47 PM, Thinh Nguyen wrote: > >>> 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> > > FWIW: > > > > Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> > > > > Please let me know if you're ok with these 2 patches. (This and patch > subject "[PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs") 1) Run "git log --oneline drivers/pci/quirks.c" ... 2) quirk_amd_nl_class() and quirk_netmos() do something similar in a different way. quirk_amd_nl_class() in particular seems to be doing exactly the same thing. I think since they're doing the same thing, they should do it the same way. Would the quirk_amd_nl_class() solution work for you? Bjorn
Hi Bjorn, On 12/10/2018 10:54 AM, Bjorn Helgaas wrote: > On Sat, Dec 08, 2018 at 02:49:09AM +0000, Thinh Nguyen wrote: >> Hi Bjorn, >> >> On 11/6/2018 12:44 AM, Felipe Balbi wrote: >>> Thinh Nguyen <thinh.nguyen@synopsys.com> writes: >>> >>>> ++ linux-usb >>>> ++ Greg >>>> >>>> On 11/2/2018 6:47 PM, Thinh Nguyen wrote: >>>>> 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> >>> FWIW: >>> >>> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> >>> >> Please let me know if you're ok with these 2 patches. (This and patch >> subject "[PATCH 1/2] pci: pci_ids: Move Synopsys HAPS platform device IDs") > 1) Run "git log --oneline drivers/pci/quirks.c" ... > > 2) quirk_amd_nl_class() and quirk_netmos() do something similar in a > different way. quirk_amd_nl_class() in particular seems to be doing > exactly the same thing. I think since they're doing the same thing, they > should do it the same way. Would the quirk_amd_nl_class() solution work > for you? > > Bjorn > Yes. Also, the way Netmos handling multiple devices is cleaner. I'll incorporate the their solutions. Thanks, Thinh
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
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(+)