]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
shannon/INFERNO: fix special handling of environment configuration
authorWolfgang Denk <wd@denx.de>
Sun, 20 Jun 2010 19:26:20 +0000 (21:26 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 4 Jul 2010 21:48:55 +0000 (23:48 +0200)
Remove some INFERNO related #ifdef's from common environment code by
fixing the board configuration settings (add CONFIG_ENV_SECT_SIZE).

While we are at it, fix comment which incorrectly talks about 4 KB
environment size, while it's actually 0x4000 = 16 KiB.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Rolf Offermanns <rof@sysgo.de>
common/env_flash.c
common/env_nand.c
include/configs/shannon.h

index b860c48db2475e707713745d495665d391de5fcb..ef0582d63266d6a32b89a2bb21e0f2092c3b94fc 100644 (file)
@@ -44,12 +44,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #error CONFIG_ENV_SIZE_REDUND should not be less then CONFIG_ENV_SIZE
 #endif
 
-#ifdef CONFIG_INFERNO
-# ifdef CONFIG_ENV_ADDR_REDUND
-#error CONFIG_ENV_ADDR_REDUND is not implemented for CONFIG_INFERNO
-# endif
-#endif
-
 char * env_name_spec = "Flash";
 
 #ifdef ENV_IS_EMBEDDED
@@ -294,13 +288,7 @@ int saveenv(void)
        len      = CONFIG_ENV_SIZE;
 #endif /* CONFIG_ENV_SECT_SIZE */
 
-#ifndef CONFIG_INFERNO
        end_addr = flash_sect_addr + len - 1;
-#else
-       /* this is the last sector, and the size is hardcoded here */
-       /* otherwise we will get stack problems on loading 128 KB environment */
-       end_addr = flash_sect_addr + 0x20000 - 1;
-#endif
 
        debug ("Protect off %08lX ... %08lX\n",
                (ulong)flash_sect_addr, end_addr);
index a15a9509025d201337d7c7b2fb2c4a874a46a21b..50bc111a3bf30901849c54ea0ff1b58e5abd0694 100644 (file)
 #error CONFIG_ENV_SIZE_REDUND should be the same as CONFIG_ENV_SIZE
 #endif
 
-#ifdef CONFIG_INFERNO
-#error CONFIG_INFERNO not supported yet
-#endif
-
 #ifndef CONFIG_ENV_RANGE
 #define CONFIG_ENV_RANGE       CONFIG_ENV_SIZE
 #endif
index 13cc5ff3b73895015f3981a45dcc966460629b79..d848915d0e99761779a6ba2a78bd4467f1f0ff52 100644 (file)
 
 #define        CONFIG_ENV_IS_IN_FLASH  1
 #ifdef CONFIG_INFERNO
-/* we take the last sector, 128 KB in size, but we only use 4 KB of it for stack reasons */
+/* we take the last sector, 128 KB in size, but we only use 16 KB of it for stack reasons */
 #define CONFIG_ENV_ADDR                (PHYS_FLASH_1 + 0x003E0000)     /* Addr of Environment Sector   */
-#define CONFIG_ENV_SIZE                0x4000  /* Total Size of Environment Sector     */
+#define CONFIG_ENV_SIZE                0x4000  /* Total Size of Environment    */
+#define CONFIG_ENV_SECT_SIZE   (128 << 10)     /* size of environment sector */
 #else
 #define CONFIG_ENV_ADDR                (PHYS_FLASH_1 + 0x1C000)        /* Addr of Environment Sector   */
-#define CONFIG_ENV_SIZE                0x4000  /* Total Size of Environment Sector     */
+#define CONFIG_ENV_SIZE                0x4000  /* Total Size of Environment    */
 #endif
 
 /*-----------------------------------------------------------------------