diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 79b789444fee..fa6df9fbf005 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1289,6 +1289,8 @@ static void dwc3_get_properties(struct dwc3 *dwc) "snps,dis-tx-ipgap-linecheck-quirk"); dwc->xhci_slow_suspend_quirk = device_property_read_bool(dev, "snps,xhci-slow-suspend-quirk"); + dwc->xhci_trb_ent_quirk = device_property_read_bool(dev, + "snps,xhci-trb-ent-quirk"); dwc->tx_de_emphasis_quirk = device_property_read_bool(dev, "snps,tx_de_emphasis_quirk"); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 232ccd02a775..f286396d6efb 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -995,6 +995,9 @@ struct dwc3_scratchpad_array { * @xhci_slow_suspend_quirk: set if need an extraordinary delay to wait * for xHC enter the Halted state after the Run/Stop * (R/S) bit is cleared to '0'. + * @xhci_trb_ent_quirk: set if need to enable the Evaluate Next TRB(ENT) + flag in the TRB data structure to force xHC to + pre-fetch the next TRB of a TD. * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value * 0 - -6dB de-emphasis @@ -1168,6 +1171,7 @@ struct dwc3 { unsigned dis_del_phy_power_chg_quirk:1; unsigned dis_tx_ipgap_linecheck_quirk:1; unsigned xhci_slow_suspend_quirk:1; + unsigned xhci_trb_ent_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 3c3b3ba4b50f..b50c410ec71b 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -46,7 +46,7 @@ out: int dwc3_host_init(struct dwc3 *dwc) { - struct property_entry props[3]; + struct property_entry props[4]; struct platform_device *xhci; int ret, irq; struct resource *res; @@ -96,6 +96,9 @@ int dwc3_host_init(struct dwc3 *dwc) if (dwc->xhci_slow_suspend_quirk) props[prop_idx++].name = "xhci-slow-suspend"; + if (dwc->xhci_trb_ent_quirk) + props[prop_idx++].name = "xhci-trb-ent-quirk"; + /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work.