aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorVardan Mikayelyan <mvardan@synopsys.com>2016-05-25 21:07:02 -0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-06-21 03:49:13 -0400
commit6b58cb07a850f9b6d348feb2455b2c264a515f4a (patch)
tree7bb6f0d0b6f1604a7535f5c625573ce83829c418 /drivers/usb/dwc2
parent26ddef5da62993fb9189a822d3545fc00451d242 (diff)
usb: dwc2: gadget: Fix transfer stop programming for out endpoint
According DWC-OTG databook, "GOUTNakEff" is read only and can be cleared only by "DCTL.CGOUTNak", but here we do not need to clear it because DWC-OTG programming guide says that before disabling any OUT endpoint, the application must enable Global OUT NAK mode, so if this mode is enabled we can continue without this step. Tested-by: John Keeping <john@metanate.com> Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r--drivers/usb/dwc2/gadget.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 71681727c66d..54d242b6d2aa 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2866,10 +2866,8 @@ static void dwc2_hsotg_ep_stop_xfr(struct dwc2_hsotg *hsotg,
2866 dev_warn(hsotg->dev, 2866 dev_warn(hsotg->dev,
2867 "%s: timeout DIEPINT.NAKEFF\n", __func__); 2867 "%s: timeout DIEPINT.NAKEFF\n", __func__);
2868 } else { 2868 } else {
2869 /* Clear any pending nak effect interrupt */ 2869 if (!(dwc2_readl(hsotg->regs + GINTSTS) & GINTSTS_GOUTNAKEFF))
2870 dwc2_writel(GINTSTS_GOUTNAKEFF, hsotg->regs + GINTSTS); 2870 __orr32(hsotg->regs + DCTL, DCTL_SGOUTNAK);
2871
2872 __orr32(hsotg->regs + DCTL, DCTL_SGOUTNAK);
2873 2871
2874 /* Wait for global nak to take effect */ 2872 /* Wait for global nak to take effect */
2875 if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS, 2873 if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS,