Skip to content

Commit

Permalink
usb: dwc3: gadget: change HIRD threshold to 12
Browse files Browse the repository at this point in the history
First of all, that 28 value makes no sense as
HIRD threshold is a 4-bit value, second of all
it's causing issues for OMAP5.

Using 12 because commit cbc725b (usb: dwc3:
keep default hird threshold value as 4b1100)
had the intention of setting the maximum allowed
value of 0xc.

Also, original code has been wrong forever, so
this should be backported as far back as
possible.

Cc: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Jan 24, 2013
1 parent 388e5c5 commit 1a94774
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,8 +2225,11 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
reg &= ~(DWC3_DCTL_HIRD_THRES_MASK | DWC3_DCTL_L1_HIBER_EN);

/* TODO: This should be configurable */
reg |= DWC3_DCTL_HIRD_THRES(28);
/*
* TODO: This should be configurable. For now using
* maximum allowed HIRD threshold value of 0b1100
*/
reg |= DWC3_DCTL_HIRD_THRES(12);

dwc3_writel(dwc->regs, DWC3_DCTL, reg);
}
Expand Down

0 comments on commit 1a94774

Please sign in to comment.