usb: dwc2: gadget: Enable the BNA interrupt
authorVahram Aharonyan <vahrama@synopsys.com>
Tue, 15 Nov 2016 03:16:43 +0000 (19:16 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:47 +0000 (13:54 +0200)
Enable the BNA (Buffer Not Available) interrupt in descriptor DMA mode.

Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/hw.h

index 6f74a3f93365abd0ab59f216374c3982c8567447..9f2875661bbd56b70a8d5aedf606f29a5cf530f6 100644 (file)
@@ -3227,6 +3227,10 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,
                DOEPMSK_SETUPMSK,
                hsotg->regs + DOEPMSK);
 
+       /* Enable BNA interrupt for DDMA */
+       if (using_desc_dma(hsotg))
+               __orr32(hsotg->regs + DOEPMSK, DOEPMSK_BNAMSK);
+
        dwc2_writel(0, hsotg->regs + DAINTMSK);
 
        dev_dbg(hsotg->dev, "EP0: DIEPCTL0=0x%08x, DOEPCTL0=0x%08x\n",
index 631396ba733ffbad082073e5041b3253a53d99a0..5be056b39e5c9139c1e7299ed71bab85f1fe322b 100644 (file)
 #define DIEPMSK_XFERCOMPLMSK           (1 << 0)
 
 #define DOEPMSK                                HSOTG_REG(0x814)
+#define DOEPMSK_BNAMSK                 (1 << 9)
 #define DOEPMSK_BACK2BACKSETUP         (1 << 6)
 #define DOEPMSK_STSPHSERCVDMSK         (1 << 5)
 #define DOEPMSK_OUTTKNEPDISMSK         (1 << 4)