]> git.sur5r.net Git - u-boot/blobdiff - env/fat.c
Merge git://git.denx.de/u-boot-ubi
[u-boot] / env / fat.c
index 35f7ab5c6dd47356dfbb16033ce3cc1b99514b8a..19f260e881ac3e77f5d04e69aeb261691f780388 100644 (file)
--- a/env/fat.c
+++ b/env/fat.c
@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifdef CMD_SAVEENV
 static int env_fat_save(void)
 {
-       env_t   env_new;
+       env_t __aligned(ARCH_DMA_MINALIGN) env_new;
        struct blk_desc *dev_desc = NULL;
        disk_partition_t info;
        int dev, part;
@@ -89,6 +89,9 @@ static int env_fat_load(void)
        int dev, part;
        int err;
 
+       if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc"))
+               mmc_initialize(NULL);
+
        part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE,
                                        CONFIG_ENV_FAT_DEVICE_AND_PART,
                                        &dev_desc, &info, 1);