projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: dts: stm32: Remove useless u-boot, dm-pre-reloc in stm32f746-disco-u-boot.dtsi
[oweals/u-boot.git]
/
env
/
fat.c
diff --git
a/env/fat.c
b/env/fat.c
index 158a9a34357bb8eb791ac3372c977d9a0d2b698e..7f74c64dfe7e094af8142cb66dc94682dabc6b5a 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>
/*
* (c) Copyright 2011 by Tigris Elektronik GmbH
*
* Author:
* Maximilian Schwerin <mvs@tigris.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
*/
#include <common.h>
@@
-31,12
+30,10
@@
# endif
#endif
# endif
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CMD_SAVEENV
static int env_fat_save(void)
{
#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;
struct blk_desc *dev_desc = NULL;
disk_partition_t info;
int dev, part;
@@
-89,6
+86,11
@@
static int env_fat_load(void)
int dev, part;
int err;
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);
part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE,
CONFIG_ENV_FAT_DEVICE_AND_PART,
&dev_desc, &info, 1);
@@
-117,11
+119,10
@@
static int env_fat_load(void)
goto err_env_relocate;
}
goto err_env_relocate;
}
- env_import(buf, 1);
- return 0;
+ return env_import(buf, 1);
err_env_relocate:
err_env_relocate:
- set_default_env(NULL);
+ set_default_env(NULL
, 0
);
return -EIO;
}
return -EIO;
}