diff options
Diffstat (limited to 'drivers/mmc/fsl_esdhc_imx.c')
-rw-r--r-- | drivers/mmc/fsl_esdhc_imx.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index aabf39535f..5dfd484ef9 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1411,7 +1411,6 @@ __weak void init_clk_usdhc(u32 index) static int fsl_esdhc_of_to_plat(struct udevice *dev) { -#if !CONFIG_IS_ENABLED(OF_PLATDATA) struct fsl_esdhc_priv *priv = dev_get_priv(dev); #if CONFIG_IS_ENABLED(DM_REGULATOR) struct udevice *vqmmc_dev; @@ -1419,10 +1418,12 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev) #endif const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); - fdt_addr_t addr; unsigned int val; + if (!CONFIG_IS_ENABLED(OF_REAL)) + return 0; + addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; @@ -1494,7 +1495,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev) priv->vs18_enable = 1; } #endif -#endif + return 0; } @@ -1598,11 +1599,11 @@ static int fsl_esdhc_probe(struct udevice *dev) return ret; } -#if !CONFIG_IS_ENABLED(OF_PLATDATA) - ret = mmc_of_parse(dev, &plat->cfg); - if (ret) - return ret; -#endif + if (CONFIG_IS_ENABLED(OF_REAL)) { + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + } mmc = &plat->mmc; mmc->cfg = &plat->cfg; |