Skip to content
Commit 70a98caf authored by Samuel Holland's avatar Samuel Holland Committed by Marek Vasut
Browse files

usb: xhci-pci: Move reset logic out of XHCI core



Resetting an XHCI controller inside xhci_register undoes any register
setup performed by the platform driver. And at least on the Allwinner
H6, resetting the XHCI controller also resets the PHY, which prevents
the controller from working. That means the controller must be taken out
of reset before initializing the PHY, which must be done before calling
xhci_register.

The logic in the XHCI core was added to support the Raspberry Pi 4
(although this was not mentioned in the commit log!), which uses the
xhci-pci platform driver. Move the reset logic to the platform driver,
where it belongs, and where it cannot interfere with other platform
drivers.

This also fixes a failure to call reset_free if xhci_register failed.

Fixes: 0b80371b ("usb: xhci: Add reset controller support")
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent 7f899da9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment