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

Commit 551d2906 authored by John Youn's avatar John Youn Committed by Mayank Rana
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>
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]
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 0f105b40
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3473,8 +3473,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3 *dwc)
		 */
		evt->lpos = (evt->lpos + 4) % DWC3_EVENT_BUFFERS_SIZE;
		left -= 4;

		dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), 4);
	}

	dwc->bh_handled_evt_cnt[dwc->bh_dbg_index] += (evt->count / 4);
@@ -3543,6 +3541,8 @@ static irqreturn_t dwc3_check_event_buf(struct dwc3 *dwc)
	reg |= DWC3_GEVNTSIZ_INTMASK;
	dwc3_writel(dwc->regs, DWC3_GEVNTSIZ(0), reg);

	dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), count);

	return IRQ_WAKE_THREAD;
}