diff options
author | Josh Wu <josh.wu@atmel.com> | 2015-09-16 11:34:14 +0800 |
---|---|---|
committer | Andreas Bießmann <andreas.devel@googlemail.com> | 2015-10-01 09:34:58 +0200 |
commit | ac1eefebf515035f7b0b14ed06baf36b99da6b35 (patch) | |
tree | d7b54c4a9ecc3cb00c9ad7819f3b3e9ecdeaa66f /include | |
parent | 1f8836396de8215b7f460616926052b32597bb29 (diff) | |
download | u-boot-imx-ac1eefebf515035f7b0b14ed06baf36b99da6b35.zip u-boot-imx-ac1eefebf515035f7b0b14ed06baf36b99da6b35.tar.gz u-boot-imx-ac1eefebf515035f7b0b14ed06baf36b99da6b35.tar.bz2 |
ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC
If defined CONFIG_ENV_IS_IN_MMC, then u-boot environment is saved in
mmc's raw sectors. Otherwise, u-boot environment is saved as a file:
uboot.env.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Bo Shen <voice.shen@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/at91-sama5_common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h index 3d6b0ae..a5990ce 100644 --- a/include/configs/at91-sama5_common.h +++ b/include/configs/at91-sama5_common.h @@ -53,6 +53,13 @@ #define CONFIG_CMD_DHCP #ifdef CONFIG_SYS_USE_MMC + +#ifdef CONFIG_ENV_IS_IN_MMC +/* Use raw reserved sectors to save environment */ +#define CONFIG_ENV_OFFSET 0x2000 +#define CONFIG_ENV_SIZE 0x1000 +#define CONFIG_SYS_MMC_ENV_DEV 0 +#else /* u-boot env in sd/mmc card */ #define CONFIG_ENV_IS_IN_FAT #define CONFIG_FAT_WRITE @@ -60,6 +67,7 @@ #define FAT_ENV_DEVICE_AND_PART "0" #define FAT_ENV_FILE "uboot.env" #define CONFIG_ENV_SIZE 0x4000 +#endif #define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \ "setenv dtb_name at91-${board_name}.dtb; " \ |