mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-22 18:01:29 +01:00
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 <stephan.gerhold@linaro.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Tested-by: Sam Day <me@samcday.com>
Link: https://patch.msgid.link/20250407-ehci-msm-fixes-v1-3-f8b30eb05d07@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
parent
e4e47da7e8
commit
2faabff358
@ -110,9 +110,6 @@ static int ehci_usb_remove(struct udevice *dev)
|
|||||||
/* Stop controller. */
|
/* Stop controller. */
|
||||||
clrbits_le32(&ehci->usbcmd, CMD_RUN);
|
clrbits_le32(&ehci->usbcmd, CMD_RUN);
|
||||||
|
|
||||||
clk_disable_unprepare(&p->iface_clk);
|
|
||||||
clk_disable_unprepare(&p->core_clk);
|
|
||||||
|
|
||||||
ret = generic_shutdown_phy(&p->phy);
|
ret = generic_shutdown_phy(&p->phy);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@ -130,6 +127,8 @@ static int ehci_usb_remove(struct udevice *dev)
|
|||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clk_disable_unprepare(&p->iface_clk);
|
||||||
|
clk_disable_unprepare(&p->core_clk);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user