Browse Source

usb: dwc3: gadget: make sure HIRD threshold is 0 in superspeed

During superspeed, HIRD threshold should always
be zero. Curent driver wasn't making sure that
was the case.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi 11 years ago
parent
commit
356363bf6b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/usb/dwc3/gadget.c

+ 4 - 0
drivers/usb/dwc3/gadget.c

@@ -2288,6 +2288,10 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
 		 */
 		reg |= DWC3_DCTL_HIRD_THRES(12);
 
+		dwc3_writel(dwc->regs, DWC3_DCTL, reg);
+	} else {
+		reg = dwc3_readl(dwc->regs, DWC3_DCTL);
+		reg &= ~DWC3_DCTL_HIRD_THRES_MASK;
 		dwc3_writel(dwc->regs, DWC3_DCTL, reg);
 	}