OSDN Git Service

usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated.
authorArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
Fri, 16 Apr 2021 12:47:38 +0000 (16:47 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Apr 2021 09:55:34 +0000 (11:55 +0200)
commit5160d6871aaede2f7e27e2137b6571940f25697a
treefd694bf499c7586a563cf047eb714ad5151218e3
parent238f65aeeae8329fd6f6c2a9b87f2972b96094e5
usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated.

When hibernation exit is performed the dwc2_hib_restore_common()
function is called. In that function we wait until GINTSTS_RESTOREDONE
bit is set. However, after the setting of that bit we get a lot of
(dwc2_hsotg_irq:) interrupts which indicates that (GINTSTS.RstrDoneInt)
restore done interrupt is asserted.

To avoid restore done interrupt storm after restore is generated
clear GINTSTS_RESTOREDONE bit in GINTSTS register.

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210416124739.D6269A005D@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/core.c