[PATCH v1] HSD #18028953892: usb: xhci-dwc3: Fix USB3.1 controller register access in reset state
Jit Loon Lim
jit.loon.lim at intel.com
Wed Jun 21 16:11:16 CEST 2023
From: Teik Heng Chong <teik.heng.chong at intel.com>
The controller registers should not be accessed while the controller's
vcc_reset_n is asserted.
Signed-off-by: Teik Heng Chong <teik.heng.chong at intel.com>
---
drivers/usb/host/xhci-dwc3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 1dbd65dfaa..3172956bd6 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -227,6 +227,11 @@ static int xhci_dwc3_probe(struct udevice *dev)
static int xhci_dwc3_remove(struct udevice *dev)
{
struct xhci_dwc3_plat *plat = dev_get_plat(dev);
+ int ret;
+
+ ret = xhci_deregister(dev);
+ if (ret)
+ return ret;
dwc3_shutdown_phy(dev, &plat->phys);
@@ -234,7 +239,7 @@ static int xhci_dwc3_remove(struct udevice *dev)
reset_release_bulk(&plat->resets);
- return xhci_deregister(dev);
+ return 0;
}
static const struct udevice_id xhci_dwc3_ids[] = {
--
2.26.2
More information about the U-Boot
mailing list