From b0155ac63ce97a73183a6deae1559fb3baa3f61f Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 10 Jul 2019 09:35:24 +0000 Subject: [PATCH] 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 --- drivers/mmc/fsl_esdhc_imx.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 49382026f1..0d2587982c 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[] = { -- 2.39.5