diff options
author | Tom Rini <trini@konsulko.com> | 2020-09-15 08:59:32 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-15 08:59:32 -0400 |
commit | 4dcced116976937f6f7dd9a0e39cde8120250c16 (patch) | |
tree | cc6dfcda4a98aeeabb60cf4518d5877fc23fe4f7 | |
parent | 0e12575645785c6bc72473ae31cb31a626ce2bc7 (diff) | |
parent | e79c59c0e293c49d52704fdc5ca1b6896eced2d9 (diff) |
Merge tag 'mmc-2020-9-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- Use mmc_of_parse for msm_sdhci
- Add missing common host caps for xenon_sdhci.
-rw-r--r-- | drivers/mmc/msm_sdhci.c | 4 | ||||
-rw-r--r-- | drivers/mmc/xenon_sdhci.c | 18 |
2 files changed, 8 insertions, 14 deletions
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 56c3e35c9e..2a1f412278 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -142,6 +142,10 @@ static int msm_sdc_probe(struct udevice *dev) writel(caps, host->ioaddr + SDHCI_VENDOR_SPEC_CAPABILITIES0); } + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + host->mmc = &plat->mmc; host->mmc->dev = dev; ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0); diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c index 7f9a579c83..6ce9d00d0a 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udevice *dev) armada_3700_soc_pad_voltage_set(host); host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz; - switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", - 1)) { - case 8: - host->host_caps |= MMC_MODE_8BIT; - break; - case 4: - host->host_caps |= MMC_MODE_4BIT; - break; - case 1: - break; - default: - printf("Invalid \"bus-width\" value\n"); - return -EINVAL; - } + + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; host->ops = &xenon_sdhci_ops; |