summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-04-24 02:02:04 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:04 (GMT)
commite7017a3c7d2f9ff845516675205c99df4ad6eacc (patch)
tree35b761f3374fc2a6bf1b383d1d313d13c1f8b2ab /common
parent05cbeb7c3612da8d4bafa82be05092450a500052 (diff)
downloadu-boot-fsl-qoriq-e7017a3c7d2f9ff845516675205c99df4ad6eacc.tar.xz
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>
Diffstat (limited to 'common')
-rw-r--r--common/env_mmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 45d95a1..404de85 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";