[PATCH v2 2/4] usb: xhci-pci: Move reset logic out of XHCI core
Marek Vasut
marex at denx.de
Mon Jul 5 10:19:35 CEST 2021
On 7/5/21 10:04 AM, Bin Meng wrote:
> On Sat, Apr 17, 2021 at 10:21 PM Samuel Holland <samuel at sholland.org> wrote:
>>
>> 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: 0b80371b350e ("usb: xhci: Add reset controller support")
>> Signed-off-by: Samuel Holland <samuel at sholland.org>
>> ---
>> drivers/usb/host/xhci-mem.c | 2 --
>> drivers/usb/host/xhci-pci.c | 51 ++++++++++++++++++++++++++++++++++---
>> drivers/usb/host/xhci.c | 35 -------------------------
>> include/usb/xhci.h | 2 --
>> 4 files changed, 47 insertions(+), 43 deletions(-)
>>
>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
So shall we apply this whole thing for 2021.10 ?
More information about the U-Boot
mailing list