diff options
author | Heiko Schocher <hs@denx.de> | 2010-09-17 13:10:34 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-09-19 19:29:52 +0200 |
commit | 3fbeeea63334f7a69406be7c05185f4bf45da8d8 (patch) | |
tree | aae31756e046a1d08a7c794d42b411bcb79349f0 /include | |
parent | 620f1f6a64095ed558e68d37f1965d015cd49b02 (diff) | |
download | u-boot-imx-3fbeeea63334f7a69406be7c05185f4bf45da8d8.zip u-boot-imx-3fbeeea63334f7a69406be7c05185f4bf45da8d8.tar.gz u-boot-imx-3fbeeea63334f7a69406be7c05185f4bf45da8d8.tar.bz2 |
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: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index 7e647e6..cc96672 100644 --- a/include/common.h +++ b/include/common.h @@ -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 |