usb: dwc3: Fix continuous spurious interrupts

The controller may keep the interrupt line asserted
even when the software acknowledged the interrupt
by reading the GEVNTCOUNT and writing the processed
bytes. This can lead to a storm of spurious interrupts
and software hogging the CPU.
The databook (DWC3 3.00A - Section 6.3.57) suggests
to read the GEVNTCOUNT in this case of continuous interrupts.
Hence, fix the same by reading the GEVNTCOUNT when the
controller is being halted and interrupts are seen.

Change-Id: Ifc7b29d51ebb75cc79ab410379646c0c0337bdc0
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed