From: Joel Stanley Date: Thu, 23 Jun 2022 09:05:35 +0000 (+0930) Subject: mmc/aspeed: Enable controller clocks X-Git-Tag: baikal/mips/sdk5.8.2~5^2~292^2~5^2~9 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=5b9b0e2cfc4f59360211aaf355d8dfa326737248;p=uboot.git mmc/aspeed: Enable controller clocks Request and enable the controller level clocks. Signed-off-by: Joel Stanley --- diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c index 5591fa2b08..9d79bf58cc 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; }