]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
common: move TOTAL_MALLOC_LEN to include/common.h
authorHeiko Schocher <hs@denx.de>
Fri, 17 Sep 2010 11:10:34 +0000 (13:10 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 19 Sep 2010 17:29:52 +0000 (19:29 +0200)
Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
arch/m68k/lib/board.c
arch/mips/lib/board.c
arch/powerpc/lib/board.c
include/common.h

index acbdc585822b246acd5c62e41f16f101411a1dfa..ae9478a11e6c531e783be7e0e1975ed0aac1575b 100644 (file)
@@ -79,14 +79,6 @@ extern flash_info_t flash_info[];
 
 #include <environment.h>
 
-#if ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
-      (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \
-    defined(CONFIG_ENV_IS_IN_NVRAM)
-#define        TOTAL_MALLOC_LEN        (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE)
-#else
-#define        TOTAL_MALLOC_LEN        CONFIG_SYS_MALLOC_LEN
-#endif
-
 extern ulong __init_end;
 extern ulong _end;
 
index 2f259cb5be9bb8b934788b7f40b9f451bfdc8fa2..0044b19450170f87cbfa7341c30c9198b520703d 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
-      (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \
-    defined(CONFIG_ENV_IS_IN_NVRAM)
-#define        TOTAL_MALLOC_LEN        (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE)
-#else
-#define        TOTAL_MALLOC_LEN        CONFIG_SYS_MALLOC_LEN
-#endif
-
 #undef DEBUG
 
 extern int timer_init(void);
index 80c1efc311739092e2a10bb65ef96c7df65d99eb..94348e678ea82d521af4f8797a44f3b548b2af2c 100644 (file)
@@ -118,16 +118,6 @@ extern int board_start_ide(void);
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_ENV_IS_EMBEDDED)
-#define TOTAL_MALLOC_LEN       CONFIG_SYS_MALLOC_LEN
-#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
-       (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \
-      defined(CONFIG_ENV_IS_IN_NVRAM)
-#define        TOTAL_MALLOC_LEN        (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE)
-#else
-#define        TOTAL_MALLOC_LEN        CONFIG_SYS_MALLOC_LEN
-#endif
-
 #if !defined(CONFIG_SYS_MEM_TOP_HIDE)
 #define CONFIG_SYS_MEM_TOP_HIDE        0
 #endif
index 7e647e64a7aa18b74711ba3efc0fed5a52d8a32d..cc966722ead0332142fe457f107a9b431c024884 100644 (file)
@@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *);
 #define MIN(x, y)  min(x, y)
 #define MAX(x, y)  max(x, y)
 
+#if defined(CONFIG_ENV_IS_EMBEDDED)
+#define TOTAL_MALLOC_LEN       CONFIG_SYS_MALLOC_LEN
+#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
+       (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \
+      defined(CONFIG_ENV_IS_IN_NVRAM)
+#define        TOTAL_MALLOC_LEN        (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE)
+#else
+#define        TOTAL_MALLOC_LEN        CONFIG_SYS_MALLOC_LEN
+#endif
 
 /**
  * container_of - cast a member of a structure out to the containing structure