mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
env: Move TOTAL_MALLOC_LEN to environment.h
This declaration is only used in three files. Although it relates to malloc() it is actually only used during malloc() init. It uses CONFIG options including CONFIG_ENV_ADDR which are defined only in environment.h so this header must be included anyway, for TOTAL_MALLOC_LEN to be correct. Nove it to environment.h to simplify the common file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
This commit is contained in:
@@ -45,16 +45,6 @@ typedef void (interrupt_handler_t)(void *);
|
||||
#include <asm/u-boot.h> /* boot information for Linux kernel */
|
||||
#include <asm/global_data.h> /* global data used for startup functions */
|
||||
|
||||
#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
|
||||
|
||||
/* startup functions, used in:
|
||||
* common/board_f.c
|
||||
* common/init/board_init.c
|
||||
|
Reference in New Issue
Block a user