Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65aca320 authored by John Youn's avatar John Youn Committed by Felipe Balbi
Browse files

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: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent ebbb2d59
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}