]> git.sur5r.net Git - u-boot/blobdiff - env/fat.c
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
[u-boot] / env / fat.c
index e6bd1f915dc616aeaeee3016fef1c424da59baeb..5e5b1efe89334ecd2d1aac4f27d9c954a786e28b 100644 (file)
--- a/env/fat.c
+++ b/env/fat.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (c) Copyright 2011 by Tigris Elektronik GmbH
  *
  * Author:
  *  Maximilian Schwerin <mvs@tigris.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -31,8 +30,6 @@
 # endif
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CMD_SAVEENV
 static int env_fat_save(void)
 {
@@ -89,6 +86,11 @@ static int env_fat_load(void)
        int dev, part;
        int err;
 
+#ifdef CONFIG_MMC
+       if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc"))
+               mmc_initialize(NULL);
+#endif
+
        part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE,
                                        CONFIG_ENV_FAT_DEVICE_AND_PART,
                                        &dev_desc, &info, 1);