[U-Boot] [PATCH 4/7] mmc: fsl_esdhc_imx: use mmc_of_parse to set host_caps
Peng Fan
peng.fan at nxp.com
Wed Jul 10 07:51:24 UTC 2019
Use mmc_of_parse to set host_caps.
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
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 c0d47ba378..32d34ccf7c 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.16.4
More information about the U-Boot
mailing list