aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/aspeed_sdhci.c
diff options
context:
space:
mode:
authorJoel Stanley2022-06-23 18:35:35 +0930
committerTom Rini2022-07-06 14:31:29 -0400
commita7d606ff6156928693e19273f6d2f8153d2c7f27 (patch)
tree81884d396e926450a99553ed5c57460c6926a735 /drivers/mmc/aspeed_sdhci.c
parent66900bc25432ed0f99d6decbf7b383536b3456aa (diff)
mmc/aspeed: Enable controller clocks
Request and enable the controller level clocks. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/mmc/aspeed_sdhci.c')
-rw-r--r--drivers/mmc/aspeed_sdhci.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c
index 5591fa2b089..9d79bf58cc7 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;
}