diff options
-rw-r--r-- | common/env_mmc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/env_mmc.c b/common/env_mmc.c index 404de85..88b043e 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -121,7 +121,12 @@ static const char *init_mmc_for_env(struct mmc *mmc) if (!mmc) return "!No MMC card found"; -#ifndef CONFIG_BLK +#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 |