Browse Source

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 <sjg@chromium.org>
Simon Glass 8 years ago
parent
commit
e7017a3c7d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      common/env_mmc.c

+ 2 - 1
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";