diff options
author | Andre Heider <a.heider@gmail.com> | 2020-09-10 19:53:40 +0200 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-09-15 10:15:56 +0800 |
commit | e79c59c0e293c49d52704fdc5ca1b6896eced2d9 (patch) | |
tree | f4c3b788b21c9d088fb4f4c70246832dfa70f6e8 /drivers | |
parent | 8505147403584f322bf1cb66b1c796bc11f29ad4 (diff) |
mmc: xenon_sdhci: Add missing common host capabilities
Use mmc_of_parse() to set the common host properties. That includes
"bus-width", so parsing it can be removed from the driver.
But more importantly, "non-removable" is now respected, which fixes
the usage of eMMC.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Tested-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/xenon_sdhci.c | 18 |
1 files changed, 4 insertions, 14 deletions
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; |