Patchwork [U-Boot,v5,23/30] zynq-common: Define flash env. partition

login
register
mail settings
Submitter Jagannadha Sutradharudu Teki
Date Jan. 8, 2014, 8:18 p.m.
Message ID <b381cc02-3bb7-4115-ad6e-3eac3d1c4b23@VA3EHSMHS004.ehs.local>
Download mbox | patch
Permalink /patch/308437/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Jagannadha Sutradharudu Teki - Jan. 8, 2014, 8:18 p.m.
Last 128Kb sector of 1Mb flash is defined as u-boot
environment partition.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
---
 include/configs/zynq-common.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Patch

diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 402009e..568c49f 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -133,7 +133,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	\