]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 20 Jun 2019 17:50:22 +0000 (19:50 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 3 Jul 2019 07:59:22 +0000 (10:59 +0300)
commitdfc4fdebc5d62ac4e2fe5428e59b273675515fb2
treefdcd16b2472e11074154295d2c85bff37bc3cfb3
parentd2d06c18d78ed4aa969ceac33bcfdcc524668424
usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()

Use a 10000us AHB idle timeout in dwc2_core_reset() and make it
consistent with the other "wait for AHB master IDLE state" ocurrences.

This fixes a problem for me where dwc2 would not want to initialize when
updating to 4.19 on a MIPS Lantiq VRX200 SoC. dwc2 worked fine with
4.14.
Testing on my board shows that it takes 180us until AHB master IDLE
state is signalled. The very old vendor driver for this SoC (ifxhcd)
used a 1 second timeout.
Use the same timeout that is used everywhere when polling for
GRSTCTL_AHBIDLE instead of using a timeout that "works for one board"
(180us in my case) to have consistent behavior across the dwc2 driver.

Cc: linux-stable <stable@vger.kernel.org> # 4.19+
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/core.c