Skip to content

Commit

Permalink
usb: dwc3: gadget: Check IP revision for GRXTHRCFG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thinh Nguyen authored and Felipe Balbi committed Mar 22, 2018
1 parent 2fbc5bd commit 01b0e2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 01b0e2c

Please sign in to comment.