diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-15 13:08:59 +0200 |
---|---|---|
committer | Mayank Rana <mrana@codeaurora.org> | 2017-03-31 14:14:15 -0700 |
commit | e63417d73cfc08d5e95f85089c9ae4d78bee5cd8 (patch) | |
tree | 95ecb4b76ef055e72d536188d93bc0e1539dc0fd /drivers/usb/dwc3/gadget.c | |
parent | 92124c76a2bd3e0c1d98de91d09199558117a1a9 (diff) |
usb: dwc3: gadget: clear events in top-half handler
Now that all the infrastructure is in place, we can
clear events in the top-half handler in order to
bring IRQ line low ASAP.
This is also a necessary step in order to implement
workaround for known erratum in follow-up patches.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Change-Id: Ic0823f85c0386045ab4865544bef0403ec047a99
Git-commit: 65aca3205046d159b2c79f7531203a53aec9cf35
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[hemantk@codeaurora.org: resolved merge conflict by replacing
DWC3_GEVNTCOUNT(0) with DWC3_GEVNTCOUNT(buf)]
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index e1284b6cc2ef..758d65937c1e 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3362,8 +3362,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3 *dwc, u32 buf) */ evt->lpos = (evt->lpos + 4) % DWC3_EVENT_BUFFERS_SIZE; left -= 4; - - dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(buf), 4); } dwc->bh_handled_evt_cnt[dwc->bh_dbg_index] += (evt->count / 4); @@ -3434,6 +3432,8 @@ static irqreturn_t dwc3_check_event_buf(struct dwc3 *dwc, u32 buf) reg |= DWC3_GEVNTSIZ_INTMASK; dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(buf), reg); + dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(buf), count); + return IRQ_WAKE_THREAD; } |