From e7017a3c7d2f9ff845516675205c99df4ad6eacc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 23 Apr 2017 20:02:04 -0600 Subject: [PATCH] dm: mmc: Don't re-init when accessing environment With driver model MMC is probed automatically when needed. We should not re-init MMC each time. Signed-off-by: Simon Glass --- common/env_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/env_mmc.c b/common/env_mmc.c index 45d95a1e23..404de85062 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -121,9 +121,10 @@ static const char *init_mmc_for_env(struct mmc *mmc) if (!mmc) return "!No MMC card found"; +#ifndef CONFIG_BLK if (mmc_init(mmc)) return "!MMC init failed"; - +#endif if (mmc_set_env_part(mmc)) return "!MMC partition switch failed"; -- 2.25.1