common: move TOTAL_MALLOC_LEN to include/common.h
RFC PATCH 3/19 common: move TOTAL_MALLOC_LEN to include/common.h
Signed-off-by Heiko Schocher <[email protected]>
--- arch/powerpc/lib/board.c | 10 ---------- include/common.h | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-)
arch/powerpc/lib/board.c +0 -10
@@ -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
include/common.h +9 -0
@@ -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
Signature · 5 lines
1.6.2.5 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany