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)
committerFelipe Balbi <balbi@ti.com>
Fri, 9 Oct 2015 21:06:59 +0000 (16:06 -0500)
Add platform data and set usb3_lpm_capable and has_lpm_erratum.

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/dwc3-pci.c

index a286db7ffe94e67d461f301e85a4cd4af3ad99f9..65165308a04fe0858f908ccd75135748f4612335 100644 (file)
@@ -108,6 +108,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;
 }
 
This page took 0.025548 seconds and 5 git commands to generate.