[PATCH RESEND 8/9] mmc/aspeed: Enable controller clocks
Joel Stanley
joel at jms.id.au
Thu Jun 23 11:05:35 CEST 2022
Request and enable the controller level clocks.
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
drivers/mmc/aspeed_sdhci.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c
index 5591fa2b0891..9d79bf58cc70 100644
--- a/drivers/mmc/aspeed_sdhci.c
+++ b/drivers/mmc/aspeed_sdhci.c
@@ -99,6 +99,21 @@ U_BOOT_DRIVER(aspeed_sdhci_drv) = {
static int aspeed_sdc_probe(struct udevice *parent)
{
+ struct clk clk;
+ int ret;
+
+ ret = clk_get_by_index(parent, 0, &clk);
+ if (ret) {
+ debug("%s: clock get failed %d\n", __func__, ret);
+ return ret;
+ }
+
+ ret = clk_enable(&clk);
+ if (ret) {
+ debug("%s: clock enable failed %d\n", __func__, ret);
+ return ret;
+ }
+
return 0;
}
--
2.35.1
More information about the U-Boot
mailing list