]> git.sur5r.net Git - u-boot/commitdiff
malta: store environment in flash
authorPaul Burton <paul.burton@imgtec.com>
Fri, 8 Nov 2013 11:18:56 +0000 (11:18 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 9 Nov 2013 16:21:02 +0000 (17:21 +0100)
Allow the environment to be stored in the monitor flash of a Malta
board. The environment is stored in the final 128KB of the flash, which
both leaves the majority of the flash available for U-boot code and also
matches the location which YAMON uses.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
include/configs/malta.h

index a0f6a4a7e9b2d9e4f3f95530752185c76b7aba4a..b58b6e4a5f764270bc57d1a8a9f4a9be05db05b7 100644 (file)
 #define CONFIG_SYS_NS16550_COM2                CKSEG1ADDR(MALTA_MSC01_UART0_BASE)
 #define CONFIG_CONS_INDEX              1
 
-/*
- * Environment
- */
-#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_SIZE                        0x10000
-
 /*
  * Flash configuration
  */
 #define CONFIG_FLASH_CFI_DRIVER
 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 
+/*
+ * Environment
+ */
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE           0x20000
+#define CONFIG_ENV_SIZE                        CONFIG_ENV_SECT_SIZE
+#define CONFIG_ENV_ADDR \
+       (CONFIG_SYS_FLASH_BASE + (4 << 20) - CONFIG_ENV_SIZE)
+
 /*
  * Commands
  */