This patch added support to save environment to spi. User
need to enable CONFIG_ENV_IS_IN_SPI_FLASH. This patch also
added support to enable CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET
and CONFIG_ENV_SECT_SIZE through Kconfig.
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
endif
+if ARCH_ZYNQMP
+
+config ENV_OFFSET
+ hex "Environment Offset"
+ depends on !ENV_IS_NOWHERE
+ depends on ENV_IS_IN_SPI_FLASH
+ default 0x1e00000
+ help
+ Offset from the start of the device (or partition)
+
+config ENV_SIZE
+ hex "Environment Size"
+ default 0x40000 if ENV_IS_IN_SPI_FLASH
+ default 0x8000 if !ENV_IS_IN_SPI_FLASH
+ help
+ Size of the environment storage area.
+
+config ENV_SECT_SIZE
+ hex "Environment Sector-Size"
+ depends on ENV_IS_IN_SPI_FLASH
+ default 0x40000
+ help
+ Size of the sector containing the environment.
+
+endif
+
endmenu
#define CONFIG_PREBOOT "run setup"
-/* Do not preserve environment */
-#define CONFIG_ENV_SIZE 0x8000
-
/* Monitor Command Prompt */
/* Console I/O Buffer Size */
#define CONFIG_SYS_CBSIZE 2048