[U-Boot] [PATCH v3 23/29] zynq-common: Define flash env. partition

Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki at xilinx.com
Thu Dec 19 19:09:14 CET 2013


Last 128Kb sector of 1Mb flash is defined as u-boot
environment partition.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
---
V3: none
V2: none

 include/configs/zynq-common.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 87f0d72..0d57092 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -136,7 +136,17 @@
 #define CONFIG_ENV_SIZE			(128 << 10)
 
 /* Environment */
-#define CONFIG_ENV_IS_NOWHERE
+#ifndef CONFIG_ENV_IS_NOWHERE
+# ifndef CONFIG_SYS_NO_FLASH
+#  define CONFIG_ENV_IS_IN_FLASH
+# elif defined(CONFIG_SYS_NO_FLASH)
+#  define CONFIG_ENV_IS_NOWHERE
+# endif
+
+# define CONFIG_ENV_SECT_SIZE		CONFIG_ENV_SIZE
+# define CONFIG_ENV_OFFSET		0xE0000
+# define CONFIG_CMD_SAVEENV
+#endif
 
 /* Default environment */
 #define CONFIG_EXTRA_ENV_SETTINGS	\
-- 
1.8.3




More information about the U-Boot mailing list