diff options
author | Felipe Balbi <balbi@ti.com> | 2017-04-04 15:32:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-12 06:41:19 -0400 |
commit | 7bdf7bebbbedb2bfe1dc3bcad71acb77bf660113 (patch) | |
tree | 6dd0d44744d62f8c63f67f136bfafda345d0cdf1 | |
parent | 15159247d25b70a310bcc1450c90050d266192ae (diff) |
usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested
[ Upstream commit 21939f003ad09355d9c975735750bb22aa37d8de ]
In case 'quirk-broken-port-ped' property is passed in via device property,
we should enable the corresponding BROKEN_PED quirk flag for XHCI core.
[rogerq@ti.com] Updated code from platform data to device property
and added DT binding.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 | ||||
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt index 966885c636d0..7790c819859a 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt | |||
@@ -26,6 +26,7 @@ Required properties: | |||
26 | Optional properties: | 26 | Optional properties: |
27 | - clocks: reference to a clock | 27 | - clocks: reference to a clock |
28 | - usb3-lpm-capable: determines if platform is USB3 LPM capable | 28 | - usb3-lpm-capable: determines if platform is USB3 LPM capable |
29 | - quirk-broken-port-ped: set if the controller has broken port disable mechanism | ||
29 | 30 | ||
30 | Example: | 31 | Example: |
31 | usb@f0931000 { | 32 | usb@f0931000 { |
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 5895e84f9dcc..be1572331a64 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c | |||
@@ -223,6 +223,9 @@ static int xhci_plat_probe(struct platform_device *pdev) | |||
223 | if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable")) | 223 | if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable")) |
224 | xhci->quirks |= XHCI_LPM_SUPPORT; | 224 | xhci->quirks |= XHCI_LPM_SUPPORT; |
225 | 225 | ||
226 | if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped")) | ||
227 | xhci->quirks |= XHCI_BROKEN_PORT_PED; | ||
228 | |||
226 | hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); | 229 | hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); |
227 | if (IS_ERR(hcd->usb_phy)) { | 230 | if (IS_ERR(hcd->usb_phy)) { |
228 | ret = PTR_ERR(hcd->usb_phy); | 231 | ret = PTR_ERR(hcd->usb_phy); |