]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq: Move environment setting out of flash memories
authorMichal Simek <michal.simek@xilinx.com>
Wed, 5 Dec 2012 10:11:54 +0000 (11:11 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 5 Dec 2012 11:27:05 +0000 (12:27 +0100)
Separate environment setting from driver and command setup and
enable CMD_SAVEENV command when environment are saved
to flash memory.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
include/configs/zynq_common.h

index aa2e54515fb102299574d99362e382fe10d86943..99db3a9fd89cb71a0ce1e9b27b64d368f99ae3af 100644 (file)
 # undef CONFIG_CMD_NFS
 #endif
 
-/* no NOR flash */
-#ifdef CONFIG_SYS_NO_FLASH
-# define CONFIG_ENV_IS_NOWHERE
-#else
+/* NOR flash */
+#ifndef CONFIG_SYS_NO_FLASH
 # define CONFIG_SYS_FLASH_BASE           0xE2000000
 # define CONFIG_SYS_FLASH_SIZE           (16 * 1024 * 1024)
 # define CONFIG_SYS_MAX_FLASH_BANKS      1
 
 # undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */
 # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */
-
-/* Environment in NOR flash */
-# ifndef CONFIG_ENV_IS_NOWHERE
-#  define CONFIG_ENV_IS_IN_FLASH
-#  define CONFIG_ENV_SECT_SIZE         CONFIG_ENV_SIZE
-#  define CONFIG_ENV_OFFSET            0xE0000
-#  define CONFIG_CMD_SAVEENV   /* Command to save ENV to Flash */
-# endif
 #endif
 
 #ifdef CONFIG_ZYNQ_SPI
 # define CONFIG_MTD_DEVICE
 #endif
 
+#ifndef CONFIG_ENV_IS_NOWHERE
+# ifndef CONFIG_SYS_NO_FLASH
+/* Environment in NOR flash */
+#  define CONFIG_ENV_IS_IN_FLASH
+# endif
+
+# define CONFIG_ENV_SECT_SIZE          CONFIG_ENV_SIZE
+# define CONFIG_ENV_OFFSET             0xE0000
+# define CONFIG_CMD_SAVEENV    /* Command to save ENV to Flash */
+#endif
+
 /* For development/debugging */
 #ifdef DEBUG
 # define CONFIG_CMD_REGINFO