diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2018-03-16 23:34:13 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-22 09:48:53 +0100 |
commit | 01b0e2cc7d89b6aa4084993634b3ea673caff4e8 (patch) | |
tree | 5c7bf4c88ec102fc331108a464318f2c781e7c54 /drivers/usb | |
parent | usb: dwc3: Add DWC_usb31 GRXTHRCFG bit fields (diff) | |
download | linux-01b0e2cc7d89b6aa4084993634b3ea673caff4e8.tar.xz linux-01b0e2cc7d89b6aa4084993634b3ea673caff4e8.zip |
usb: dwc3: gadget: Check IP revision for GRXTHRCFG
DWC_usb31 controller has a different UsbRxPktCnt bit fields from
GRXTHRCFG register. Check for DWC_usb31 IP revision to read the
appropriate value.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1431a88437af..19cf9c0eef12 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1858,7 +1858,11 @@ static int __dwc3_gadget_start(struct dwc3 *dwc) * bursts of data without going through any sort of endpoint throttling. */ reg = dwc3_readl(dwc->regs, DWC3_GRXTHRCFG); - reg &= ~DWC3_GRXTHRCFG_PKTCNTSEL; + if (dwc3_is_usb31(dwc)) + reg &= ~DWC31_GRXTHRCFG_PKTCNTSEL; + else + reg &= ~DWC3_GRXTHRCFG_PKTCNTSEL; + dwc3_writel(dwc->regs, DWC3_GRXTHRCFG, reg); dwc3_gadget_setup_nump(dwc); |