]> git.baikalelectronics.ru Git - kernel.git/commit
usb: XHCI: platform: Move the Marvell quirks after the enabling the clocks
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 24 Feb 2015 16:27:00 +0000 (18:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Feb 2015 16:34:32 +0000 (08:34 -0800)
commit580236bb8d55af45d24a56f591517761504a7ce7
tree191ac86e46f4593f2d950ba53dadd7a1f9251a8d
parenta44d491bc7041e40f3f9864ae003386b48c5e575
usb: XHCI: platform: Move the Marvell quirks after the enabling the clocks

The commit 56473a3fcf55 ("usb: host: xhci-plat: add support for the Armada
375/38x XHCI controllers") extended the xhci-plat driver to support the Armada
375/38x SoCs, mostly by adding a quirk configuring the MBUS window.

However, that quirk was run before the clock the controllers needs has been
enabled. This usually worked because the clock was first enabled by the
bootloader, and left as such until the driver is probe, where it tries to
access the MBUS configuration registers before enabling the clock.

Things get messy when EPROBE_DEFER is involved during the probe, since as part
of its error path, the driver will rightfully disable the clock. When the
driver will be reprobed, it will retry to access the MBUS registers, but this
time with the clock disabled, which hangs forever.

Fix this by running the quirks after the clock has been enabled by the driver.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.16+
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c