Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
[oweals/u-boot.git] / include / common.h
index 70f40daa9ee811cad617085c9b3a2439669d5413..d8f302ea92f059680753f53d3583fc25c9cb8740 100644 (file)
@@ -1,5 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
+ * Common header file for U-Boot
+ *
+ * This file still includes quite a bit of stuff that should be in separate
+ * headers like command.h, cpu.h and timer.h. Please think before adding more
+ * things. Patches to remove things are welcome.
+ *
  * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  */
@@ -45,16 +51,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
@@ -349,8 +345,6 @@ static inline struct in_addr env_get_ip(char *var)
        return string_to_ip(env_get(var));
 }
 
-int    pcmcia_init (void);
-
 #ifdef CONFIG_LED_STATUS
 # include <status_led.h>
 #endif
@@ -404,7 +398,7 @@ int cpu_release(u32 nr, int argc, char * const argv[]);
 
 /* Pull in stuff for the build system */
 #ifdef DO_DEPS_ONLY
-# include <environment.h>
+# include <env_internal.h>
 #endif
 
 #endif /* __COMMON_H_ */