usb: dwc3: gadget: change HIRD threshold to 12
authorFelipe Balbi <balbi@ti.com>
Thu, 24 Jan 2013 09:56:11 +0000 (11:56 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 24 Jan 2013 10:02:31 +0000 (12:02 +0200)
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 cbc725b3 (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>
drivers/usb/dwc3/gadget.c

index 38e8d3e5dfd37c5a90e98da261280123e0b7586c..77a0013c9dd3cd12112a7910861a9af4d58bf0aa 100644 (file)
@@ -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);
        }