]> git.sur5r.net Git - u-boot/commitdiff
dm: mmc: Don't re-init when accessing environment
authorSimon Glass <sjg@chromium.org>
Mon, 24 Apr 2017 02:02:04 +0000 (20:02 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2017 13:03:04 +0000 (07:03 -0600)
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>
common/env_mmc.c

index 45d95a1e23ed95cf6563a26dda50cc71e9ad1b1d..404de85062360e3750e9fca91375f825fa070174 100644 (file)
@@ -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";