diff options
Diffstat (limited to 'common/env_mmc.c')
-rw-r--r-- | common/env_mmc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/env_mmc.c b/common/env_mmc.c index 45d95a1e23..88b043ec35 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -121,9 +121,15 @@ static const char *init_mmc_for_env(struct mmc *mmc) if (!mmc) return "!No MMC card found"; +#ifdef CONFIG_BLK + struct udevice *dev; + + if (blk_get_from_parent(mmc->dev, &dev)) + return "!No block device"; +#else if (mmc_init(mmc)) return "!MMC init failed"; - +#endif if (mmc_set_env_part(mmc)) return "!MMC partition switch failed"; |