summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephan Gerhold <[email protected]>2025-04-07 11:54:23 +0200
committerTom Rini <[email protected]>2025-10-30 11:04:51 -0600
commit2faabff35899a2106dc0480bd482783e906c8b7d (patch)
treec532815130168cbe81e933f5e3f0b34c0b34a9f4 /drivers
parente4e47da7e876d9f184e0060e6e59ac1f57d0290d (diff)
usb: host: ehci-msm: Disable clocks after all register accesses
We need the USB clocks to do accesses like wait_for_bit_le32(&ehci->usbcmd, CMD_RESET, ...) so we should disable them only after all of them are done. At the moment this works only because the clock driver doesn't actually disabling these clocks in U-Boot. Fixes: 9b3a9f896e66 ("ehci: msm: bring up iface + core clocks") Signed-off-by: Stephan Gerhold <[email protected]> Acked-by: Caleb Connolly <[email protected]> Tested-by: Sam Day <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-msm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 60b2dc44d3d..bf46e89104e 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -110,9 +110,6 @@ static int ehci_usb_remove(struct udevice *dev)
/* Stop controller. */
clrbits_le32(&ehci->usbcmd, CMD_RUN);
- clk_disable_unprepare(&p->iface_clk);
- clk_disable_unprepare(&p->core_clk);
-
ret = generic_shutdown_phy(&p->phy);
if (ret)
return ret;
@@ -130,6 +127,8 @@ static int ehci_usb_remove(struct udevice *dev)
return -ETIMEDOUT;
}
+ clk_disable_unprepare(&p->iface_clk);
+ clk_disable_unprepare(&p->core_clk);
return 0;
}