Skip to content
Snippets Groups Projects
Commit 3fbeeea6 authored by Heiko Schocher's avatar Heiko Schocher Committed by Wolfgang Denk
Browse files

common: move TOTAL_MALLOC_LEN to include/common.h


Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
parent 620f1f6a
No related branches found
No related tags found
No related merge requests found
...@@ -79,14 +79,6 @@ extern flash_info_t flash_info[]; ...@@ -79,14 +79,6 @@ extern flash_info_t flash_info[];
#include <environment.h> #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 __init_end;
extern ulong _end; extern ulong _end;
......
...@@ -39,14 +39,6 @@ ...@@ -39,14 +39,6 @@
DECLARE_GLOBAL_DATA_PTR; 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 #undef DEBUG
extern int timer_init(void); extern int timer_init(void);
......
...@@ -118,16 +118,6 @@ extern int board_start_ide(void); ...@@ -118,16 +118,6 @@ extern int board_start_ide(void);
DECLARE_GLOBAL_DATA_PTR; 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) #if !defined(CONFIG_SYS_MEM_TOP_HIDE)
#define CONFIG_SYS_MEM_TOP_HIDE 0 #define CONFIG_SYS_MEM_TOP_HIDE 0
#endif #endif
......
...@@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *); ...@@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *);
#define MIN(x, y) min(x, y) #define MIN(x, y) min(x, y)
#define MAX(x, y) max(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 * container_of - cast a member of a structure out to the containing structure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment