diff options
author | Nikhil Badola <nikhil.badola@freescale.com> | 2015-03-26 03:44:00 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:29 (GMT) |
commit | 49628514a21ed9a92b5f01a117a12be63ff16cc7 (patch) | |
tree | 5a31604a4911ebcf21fbfc169a28d60faf67d6ef | |
parent | d0d31442e3937d873fd7b9568ba65ac27e05937c (diff) | |
download | linux-49628514a21ed9a92b5f01a117a12be63ff16cc7.tar.xz |
usb: dwc3: Implement workaround for Erratum A009116
Write fladj register adjusts (micro)frame length to appropriate
value thus avoiding USB 2.0 devices to time-out over a longer run
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
-rw-r--r-- | drivers/usb/dwc3/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index a9b948c..c6a8444 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -83,6 +83,10 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) mode = USB_DR_MODE_HOST; break; default: + /* Adjust Frame Length */ + if (dwc->configure_gfladj) + dwc3_writel(dwc->regs, DWC3_GFLADJ, GFLADJ_30MHZ_REG_SEL | + GFLADJ_30MHZ(GFLADJ_30MHZ_DEFAULT)); /* Change burst beat and outstanding pipelined transfers requests */ dwc3_writel(dwc->regs, DWC3_GSBUSCFG0, @@ -1174,6 +1178,12 @@ static int dwc3_probe(struct platform_device *pdev) dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); + dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); + + dwc->configure_gfladj = + of_property_read_bool(node, "configure-gfladj"); + dwc->dr_mode = of_usb_get_dr_mode(node); + dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); dwc->u2exit_lfps_quirk = device_property_read_bool(dev, |