diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-07-10 09:35:24 +0000 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-07-15 10:30:09 +0800 |
commit | b0155ac63ce97a73183a6deae1559fb3baa3f61f (patch) | |
tree | 9ede12b0535ed3a8503997b476e3a31d4d7d63f1 | |
parent | 479a8dd6dc2ca9223514289ed2aa11c659197594 (diff) | |
download | u-boot-b0155ac63ce97a73183a6deae1559fb3baa3f61f.zip u-boot-b0155ac63ce97a73183a6deae1559fb3baa3f61f.tar.gz u-boot-b0155ac63ce97a73183a6deae1559fb3baa3f61f.tar.bz2 |
mmc: fsl_esdhc_imx: use mmc_of_parse to set host_caps
Use mmc_of_parse to set host_caps.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/mmc/fsl_esdhc_imx.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 4938202..0d25879 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -101,7 +101,6 @@ struct fsl_esdhc_plat { struct esdhc_soc_data { u32 flags; - u32 caps; }; /** @@ -1426,10 +1425,8 @@ static int fsl_esdhc_probe(struct udevice *dev) priv->esdhc_regs = (struct fsl_esdhc *)addr; priv->dev = dev; priv->mode = -1; - if (data) { + if (data) priv->flags = data->flags; - priv->caps = data->caps; - } val = dev_read_u32_default(dev, "bus-width", -1); if (val == 8) @@ -1490,9 +1487,6 @@ static int fsl_esdhc_probe(struct udevice *dev) } #endif - if (fdt_get_property(fdt, node, "no-1-8-v", NULL)) - priv->caps &= ~(UHS_CAPS | MMC_MODE_HS200 | MMC_MODE_HS400); - /* * TODO: * Because lack of clk driver, if SDHC clk is not enabled, @@ -1543,6 +1537,10 @@ static int fsl_esdhc_probe(struct udevice *dev) return ret; } + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + mmc = &plat->mmc; mmc->cfg = &plat->cfg; mmc->dev = dev; @@ -1610,8 +1608,6 @@ static struct esdhc_soc_data usdhc_imx7d_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 | ESDHC_FLAG_HS400, - .caps = UHS_CAPS | MMC_MODE_HS200 | MMC_MODE_DDR_52MHz | - MMC_MODE_HS_52MHz | MMC_MODE_HS, }; static const struct udevice_id fsl_esdhc_ids[] = { |