usb: set bit18 of GUCTL1.[1/1]
authorYue Wang <yue.wang@amlogic.com>
Thu, 12 Apr 2018 07:35:00 +0000 (15:35 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 16 Apr 2018 02:10:29 +0000 (18:10 -0800)
PD#164190: usb: set bit18 of GUCTL1.[1/1]

for improve bulk transfer performance.

Change-Id: I986ddea677a9a31a6613cf00936b4c4e79449c1e
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h

index 5a5ad4f..bc0fa13 100644 (file)
@@ -740,6 +740,10 @@ static int dwc3_core_init(struct dwc3 *dwc)
        if (ret)
                goto err0;
 #ifdef CONFIG_AMLOGIC_USB
+       reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
+       reg |= DWC3_GUCTL_NAKPERENHHS;
+       dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
+
        reg = dwc3_readl(dwc->regs, DWC3_GUCTL);
        reg |= DWC3_GUCTL_USBHSTINAUTORETRYEN;
        dwc3_writel(dwc->regs, DWC3_GUCTL, reg);
index bc851ca..211bf71 100644 (file)
 #ifdef CONFIG_AMLOGIC_USB
 /* Global User Control Register */
 #define DWC3_GUCTL_USBHSTINAUTORETRYEN (1 << 14)
+#define DWC3_GUCTL_NAKPERENHHS                 (1 << 18)
 #endif
 
 /* Global Debug Queue/FIFO Space Available Register */