diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-08 08:48:31 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-08 08:48:31 -0400 |
commit | 1ebf50d9bb3ae844cc05b7e720e7a34ab53557c8 (patch) | |
tree | 4d78dda7de1c24325ac7418d06230f2728eb75e3 /drivers/mmc/meson_gx_mmc.c | |
parent | 1f47e2aca42c2e51ff3a7754c717ee13f568c721 (diff) | |
parent | e13e7c9daec54f387468098aa1f857e99a1333ec (diff) |
Merge tag 'u-boot-amlogic-20200406' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic into next
- clk: meson-g12a: missing break
- sync all Amlogic DT from Linux v5.6-rc2
- MMC clock fixups
- add support for Libre Computer AML-S905D-PC and AML-S912-PC
Diffstat (limited to 'drivers/mmc/meson_gx_mmc.c')
-rw-r--r-- | drivers/mmc/meson_gx_mmc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index b5f5122b1b7..86c1a7164a9 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <clk.h> #include <cpu_func.h> #include <dm.h> #include <fdtdec.h> @@ -241,12 +242,23 @@ static int meson_mmc_probe(struct udevice *dev) struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); struct mmc *mmc = &pdata->mmc; struct mmc_config *cfg = &pdata->cfg; + struct clk_bulk clocks; uint32_t val; + int ret; + #ifdef CONFIG_PWRSEQ struct udevice *pwr_dev; - int ret; #endif + /* Enable the clocks feeding the MMC controller */ + ret = clk_get_bulk(dev, &clocks); + if (ret) + return ret; + + ret = clk_enable_bulk(&clocks); + if (ret) + return ret; + cfg->voltages = MMC_VDD_33_34 | MMC_VDD_32_33 | MMC_VDD_31_32 | MMC_VDD_165_195; cfg->host_caps = MMC_MODE_8BIT | MMC_MODE_4BIT | |