]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: env: Added support to save env to spi
authorVipul Kumar <vipul.kumar@xilinx.com>
Wed, 25 Apr 2018 11:08:21 +0000 (16:38 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 25 Apr 2018 13:35:29 +0000 (15:35 +0200)
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>
env/Kconfig
include/configs/xilinx_zynqmp.h

index bef6e89bfc3cc670077c5fb4cd80cbf5e29974bb..dceb235a214ce36aa80f156a075e106616cf5663 100644 (file)
@@ -445,4 +445,30 @@ config ENV_SIZE
 
 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
index 087b3e3cbe4220b855bc1f95252840d5039e56dd..59caeae3954c466951b71108db3b4f2131275168 100644 (file)
 
 #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