Skip to content

Commit

Permalink
usb: dwc2: gadget: Enable the BNA interrupt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vahram Aharonyan authored and Felipe Balbi committed Nov 18, 2016
1 parent 540ccba commit ec01f0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/dwc2/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/dwc2/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@
#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)
Expand Down

0 comments on commit ec01f0b

Please sign in to comment.