From d3205f02cee2b948fb8b25f7b7e9f69c9dfdb9ff Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Sun, 21 May 2017 14:18:00 +0800 Subject: [PATCH] sunxi: enable env on spi flash when spi flash is available Signed-off-by: Icenowy Zheng --- include/configs/sunxi-common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index f4489fad6d..fcecd0bfca 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -191,6 +191,19 @@ #define CONFIG_FAT_WRITE /* enable write access */ +/* SPI Flash environment */ +#ifdef CONFIG_SPI_FLASH +#undef CONFIG_ENV_SIZE +#define CONFIG_ENV_SIZE 0x8000 +#define CONFIG_ENV_SECT_SIZE 0x1000 +#ifdef CONFIG_ENV_IS_IN_MMC +#undef CONFIG_ENV_IS_IN_MMC +#endif +#define CONFIG_ENV_IS_IN_SPI_FLASH +#undef CONFIG_ENV_OFFSET +#define CONFIG_ENV_OFFSET 0x000f8000 +#endif + #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_LOAD_IMAGE