diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-15 13:08:59 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:43 +0200 |
commit | 65aca3205046d159b2c79f7531203a53aec9cf35 (patch) | |
tree | 8ccd0f3c9eafc8e4f082ae97cac43f1f2b47fa2b /drivers/usb/dwc3 | |
parent | ebbb2d59398fb7ef92fae83d6aeba0cbb2b6f99f (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>
Diffstat (limited to 'drivers/usb/dwc3')
-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 0481cb7d7142..3d5ba4106979 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2836,8 +2836,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt) */ evt->lpos = (evt->lpos + 4) % evt->length; left -= 4; - - dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), 4); } evt->count = 0; @@ -2899,6 +2897,8 @@ static irqreturn_t dwc3_check_event_buf(struct dwc3_event_buffer *evt) if (amount < count) memcpy(evt->cache, evt->buf, count - amount); + dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), count); + return IRQ_WAKE_THREAD; } |