usb: ehci-platform: support no relinquishing port quirk
authorFrank Wang <frank.wang@rock-chips.com>
Tue, 11 Oct 2016 07:27:44 +0000 (15:27 +0800)
committerFrank Wang <frank.wang@rock-chips.com>
Tue, 11 Oct 2016 09:23:18 +0000 (17:23 +0800)
Add a quirk to cancel relinquishing port from ehci to
abnormal ohci when HS device is not ready connected.

To support this function, the no-relinquish-port property
must be specified in ehci node of dt.

Change-Id: Ief0b24cf9e58dde28f386ea67fe8936e8fd74f2d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
drivers/usb/host/ehci-platform.c

index bd7082f297bbe76b7db8c10ad091402c79f45786..5756dc8e8e0055642cdd8b4154c2ff0c6398c58d 100644 (file)
@@ -202,6 +202,10 @@ static int ehci_platform_probe(struct platform_device *dev)
                                          "has-transaction-translator"))
                        hcd->has_tt = 1;
 
+               if (of_property_read_bool(dev->dev.of_node,
+                                         "no-relinquish-port"))
+                       ehci_platform_hc_driver.relinquish_port = NULL;
+
                priv->num_phys = of_count_phandle_with_args(dev->dev.of_node,
                                "phys", "#phy-cells");