]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: dwc3: pci: Add platform data for Synopsys HAPS
authorJohn Youn <John.Youn@synopsys.com>
Sat, 26 Sep 2015 07:11:15 +0000 (00:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:22 +0000 (14:31 -0500)
commit bb7f3d6d323a56b9c3b3e727380d1395a7f10107 upstream.

Add platform data and set usb3_lpm_capable and has_lpm_erratum.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-pci.c

index a63a640ad4956721d677c1043201b650e14acc33..916905b03c37e2622c4517811adb5afa1e1cbf65 100644 (file)
@@ -102,6 +102,21 @@ static int dwc3_pci_quirks(struct pci_dev *pdev)
                }
        }
 
+       if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
+           (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
+            pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ||
+            pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) {
+
+               struct dwc3_platform_data pdata;
+
+               memset(&pdata, 0, sizeof(pdata));
+               pdata.usb3_lpm_capable = true;
+               pdata.has_lpm_erratum = true;
+
+               return platform_device_add_data(pci_get_drvdata(pdev), &pdata,
+                                               sizeof(pdata));
+       }
+
        return 0;
 }