From: Felipe Balbi <ba...@ti.com>

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.

[rog...@ti.com] Updated code from platform data to device property
and added DT binding.

Signed-off-by: Felipe Balbi <ba...@ti.com>
Signed-off-by: Roger Quadros <rog...@ti.com>
Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com>
---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 +
 drivers/usb/host/xhci-plat.c                       | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt 
b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 0b7d857..2d80b60 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -27,6 +27,7 @@ Required properties:
 Optional properties:
   - clocks: reference to a clock
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
+  - quirk-broken-port-ped: set if the controller has broken port disable 
mechanism
 
 Example:
        usb@f0931000 {
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index f96caeb..e1939de 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -232,6 +232,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
        if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable"))
                xhci->quirks |= XHCI_LPM_SUPPORT;
 
+       if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
+               xhci->quirks |= XHCI_BROKEN_PORT_PED;
+
        hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0);
        if (IS_ERR(hcd->usb_phy)) {
                ret = PTR_ERR(hcd->usb_phy);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to