From: Stephan Gerhold Date: Mon, 7 Apr 2025 09:54:25 +0000 (+0200) Subject: usb: host: ehci-msm: Drop redundant EHCI register writes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5ff016b44902591520f020c77fd08e8de6fc412;p=thirdparty%2Fu-boot.git usb: host: ehci-msm: Drop redundant EHCI register writes ehci_unregister() already clears the CMD_RUN bit with more careful checks. It also ensures that we only do this in case we were actually in USB host (rather than USB device) mode. It's not clear what the extra register writes in the Qualcomm-specific ehci-msm driver are supposed to do, so just drop them. Signed-off-by: Stephan Gerhold Acked-by: Caleb Connolly Tested-by: Sam Day Link: https://patch.msgid.link/20250407-ehci-msm-fixes-v1-5-f8b30eb05d07@linaro.org Signed-off-by: Casey Connolly --- diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 17cfff8380c..659a917ad27 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -87,16 +87,12 @@ cleanup_clocks: static int ehci_usb_remove(struct udevice *dev) { struct msm_ehci_priv *p = dev_get_priv(dev); - struct usb_ehci *ehci = p->ehci; int ret; ret = ehci_deregister(dev); if (ret) return ret; - /* Stop controller. */ - clrbits_le32(&ehci->usbcmd, CMD_RUN); - ret = generic_shutdown_phy(&p->phy); if (ret) return ret; @@ -105,15 +101,6 @@ static int ehci_usb_remove(struct udevice *dev) if (ret < 0) return ret; - /* Reset controller */ - setbits_le32(&ehci->usbcmd, CMD_RESET); - - /* Wait for reset */ - if (wait_for_bit_le32(&ehci->usbcmd, CMD_RESET, false, 30, false)) { - printf("Stuck on USB reset.\n"); - return -ETIMEDOUT; - } - clk_release_bulk(&p->clks); return 0; }