diff options
author | Simon Glass <sjg@chromium.org> | 2020-10-30 21:38:53 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-02 15:33:42 -0500 |
commit | 401d1c4f5d2d29c4bc4beaec95402ca23eb63295 (patch) | |
tree | 0122abb2a3f1ea9837eaccc6150d2dae9570388e /common | |
parent | fdcb93e1709ab1a2ebb562455621617c29e2099c (diff) | |
download | u-boot-401d1c4f5d2d29c4bc4beaec95402ca23eb63295.tar.gz |
common: Drop asm/global_data.h from common headerWIP/2021-02-02-drop-asm_global_data-when-unused
Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
40 files changed, 40 insertions, 1 deletions
diff --git a/common/autoboot.c b/common/autoboot.c index b025fd99a0..0bb08e7a4c 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -19,6 +19,7 @@ #include <menu.h> #include <post.h> #include <time.h> +#include <asm/global_data.h> #include <linux/delay.h> #include <u-boot/sha256.h> #include <bootcount.h> diff --git a/common/bloblist.c b/common/bloblist.c index 0e6448becb..eab63e9ca5 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -9,6 +9,7 @@ #include <log.h> #include <mapmem.h> #include <spl.h> +#include <asm/global_data.h> #include <u-boot/crc.h> /* diff --git a/common/board_f.c b/common/board_f.c index 4327a43a33..0cddf0359d 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -49,6 +49,7 @@ #if defined(CONFIG_MP) && defined(CONFIG_PPC) #include <asm/mp.h> #endif +#include <asm/global_data.h> #include <asm/io.h> #include <asm/sections.h> #include <dm/root.h> diff --git a/common/board_info.c b/common/board_info.c index a6db087f96..b54aa30a94 100644 --- a/common/board_info.c +++ b/common/board_info.c @@ -2,6 +2,7 @@ #include <common.h> #include <init.h> +#include <asm/global_data.h> #include <linux/libfdt.h> #include <linux/compiler.h> diff --git a/common/board_r.c b/common/board_r.c index 9fa4d4b42e..9793439adf 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -21,6 +21,7 @@ #include <log.h> #include <net.h> #include <asm/cache.h> +#include <asm/global_data.h> #include <u-boot/crc.h> /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) diff --git a/common/bootm.c b/common/bootm.c index 8298693900..defaed8426 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -19,6 +19,7 @@ #include <mapmem.h> #include <net.h> #include <asm/cache.h> +#include <asm/global_data.h> #include <asm/io.h> #include <linux/sizes.h> #if defined(CONFIG_CMD_USB) diff --git a/common/bootm_os.c b/common/bootm_os.c index e9aaddf3e6..0b6325db66 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -14,6 +14,7 @@ #include <image.h> #include <lmb.h> #include <log.h> +#include <asm/global_data.h> #include <linux/libfdt.h> #include <malloc.h> #include <mapmem.h> diff --git a/common/bootstage.c b/common/bootstage.c index 5f87358fd8..d5b78b9f48 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -16,6 +16,7 @@ #include <malloc.h> #include <sort.h> #include <spl.h> +#include <asm/global_data.h> #include <linux/compiler.h> #include <linux/libfdt.h> diff --git a/common/cli.c b/common/cli.c index 6635ab2bcf..048eacb9ef 100644 --- a/common/cli.c +++ b/common/cli.c @@ -18,6 +18,7 @@ #include <fdtdec.h> #include <hang.h> #include <malloc.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/cli_hush.c b/common/cli_hush.c index b7f0f0ff41..9466651d1a 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -84,6 +84,7 @@ #include <cli.h> #include <cli_hush.h> #include <command.h> /* find_cmd */ +#include <asm/global_data.h> #endif #ifndef __U_BOOT__ #include <ctype.h> /* isalpha, isdigit */ diff --git a/common/cli_readline.c b/common/cli_readline.c index 5c158d03b4..c7614a4c90 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -14,6 +14,7 @@ #include <command.h> #include <time.h> #include <watchdog.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/command.c b/common/command.c index 3fe6791eda..95af73f17b 100644 --- a/common/command.c +++ b/common/command.c @@ -14,6 +14,7 @@ #include <console.h> #include <env.h> #include <log.h> +#include <asm/global_data.h> #include <linux/ctype.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/console.c b/common/console.c index f3cc45cab5..567273a0ce 100644 --- a/common/console.c +++ b/common/console.c @@ -19,6 +19,7 @@ #include <exports.h> #include <env_internal.h> #include <watchdog.h> +#include <asm/global_data.h> #include <linux/delay.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/dlmalloc.c b/common/dlmalloc.c index b29a7cfd93..cf0270a9c1 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1,5 +1,6 @@ #include <common.h> #include <log.h> +#include <asm/global_data.h> #if CONFIG_IS_ENABLED(UNIT_TEST) #define DEBUG diff --git a/common/exports.c b/common/exports.c index 4578f07021..20d8b759bc 100644 --- a/common/exports.c +++ b/common/exports.c @@ -4,6 +4,7 @@ #include <malloc.h> #include <spi.h> #include <i2c.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/hash.c b/common/hash.c index 05238a8ba9..fc64002f73 100644 --- a/common/hash.c +++ b/common/hash.c @@ -18,6 +18,7 @@ #include <mapmem.h> #include <hw_sha.h> #include <asm/cache.h> +#include <asm/global_data.h> #include <asm/io.h> #include <linux/errno.h> #include <u-boot/crc.h> diff --git a/common/hwconfig.c b/common/hwconfig.c index daf3eea5f9..26a561c365 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -15,6 +15,7 @@ #include <exports.h> #include <hwconfig.h> #include <log.h> +#include <asm/global_data.h> #include <linux/types.h> #include <linux/string.h> #else diff --git a/common/image-android.c b/common/image-android.c index 18f7c8db03..d07b0e0f09 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -12,6 +12,7 @@ #include <errno.h> #include <asm/unaligned.h> #include <mapmem.h> +#include <linux/libfdt.h> #define ANDROID_IMAGE_DEFAULT_KERNEL_ADDR 0x10008000 diff --git a/common/image-cipher.c b/common/image-cipher.c index 4ca9eec4ef..b906148939 100644 --- a/common/image-cipher.c +++ b/common/image-cipher.c @@ -9,6 +9,7 @@ #else #include <common.h> #include <malloc.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSdTCC*/ #include <image.h> diff --git a/common/image-fdt.c b/common/image-fdt.c index 707b44a69d..0157cce32d 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -17,6 +17,7 @@ #include <lmb.h> #include <log.h> #include <malloc.h> +#include <asm/global_data.h> #include <linux/libfdt.h> #include <mapmem.h> #include <asm/io.h> diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c index 31cc580941..897e04c7a3 100644 --- a/common/image-fit-sig.c +++ b/common/image-fit-sig.c @@ -10,6 +10,7 @@ #include <common.h> #include <log.h> #include <malloc.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ #include <fdt_region.h> diff --git a/common/image-fit.c b/common/image-fit.c index 33210ef3c0..adc3e551de 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -21,6 +21,7 @@ #include <mapmem.h> #include <asm/io.h> #include <malloc.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ diff --git a/common/image-sig.c b/common/image-sig.c index f3c209ae8b..4abd3c080f 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -12,6 +12,7 @@ #include <common.h> #include <log.h> #include <malloc.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ #include <image.h> diff --git a/common/image.c b/common/image.c index 6923dac7c0..a6500f5f5c 100644 --- a/common/image.c +++ b/common/image.c @@ -36,6 +36,7 @@ #include <xilinx.h> #endif +#include <asm/global_data.h> #include <u-boot/md5.h> #include <u-boot/sha1.h> #include <linux/errno.h> diff --git a/common/init/board_init.c b/common/init/board_init.c index 8c8a5eac05..3f183ee113 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -9,6 +9,7 @@ #include <common.h> #include <bootstage.h> #include <init.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/init/handoff.c b/common/init/handoff.c index 62071bd017..d0be1bb17a 100644 --- a/common/init/handoff.c +++ b/common/init/handoff.c @@ -7,6 +7,7 @@ #include <common.h> #include <handoff.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/iotrace.c b/common/iotrace.c index 7225ee4404..63d0cca3a0 100644 --- a/common/iotrace.c +++ b/common/iotrace.c @@ -8,6 +8,7 @@ #include <common.h> #include <mapmem.h> #include <time.h> +#include <asm/global_data.h> #include <asm/io.h> #include <linux/bug.h> #include <u-boot/crc.h> diff --git a/common/lcd.c b/common/lcd.c index 02f2db3a99..ab5614ad0e 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -15,6 +15,7 @@ #include <log.h> #include <asm/cache.h> #include <init.h> +#include <asm/global_data.h> #include <linux/types.h> #include <stdio_dev.h> #include <lcd.h> diff --git a/common/lcd_simplefb.c b/common/lcd_simplefb.c index 246eb4c495..1650615cdb 100644 --- a/common/lcd_simplefb.c +++ b/common/lcd_simplefb.c @@ -10,6 +10,7 @@ #include <dm.h> #include <lcd.h> #include <fdt_support.h> +#include <asm/global_data.h> #include <linux/libfdt.h> #include <video.h> diff --git a/common/log.c b/common/log.c index 767f0febc5..6b0034c3ba 100644 --- a/common/log.c +++ b/common/log.c @@ -9,6 +9,7 @@ #include <common.h> #include <log.h> #include <malloc.h> +#include <asm/global_data.h> #include <dm/uclass.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/log_console.c b/common/log_console.c index 8776fd4703..6abb13c93b 100644 --- a/common/log_console.c +++ b/common/log_console.c @@ -8,6 +8,7 @@ #include <common.h> #include <log.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/log_syslog.c b/common/log_syslog.c index 4eb09157bb..53c4def5d1 100644 --- a/common/log_syslog.c +++ b/common/log_syslog.c @@ -8,6 +8,7 @@ #include <common.h> #include <log.h> #include <net.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/malloc_simple.c b/common/malloc_simple.c index 34f0b49093..0267fb6bec 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -11,6 +11,7 @@ #include <log.h> #include <malloc.h> #include <mapmem.h> +#include <asm/global_data.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/memsize.c b/common/memsize.c index e95c68265a..d5d13d51bf 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -6,6 +6,7 @@ #include <common.h> #include <init.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/spl/spl.c b/common/spl/spl.c index cdd7b05f27..e3d84082f4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -18,6 +18,7 @@ #include <log.h> #include <serial.h> #include <spl.h> +#include <asm/global_data.h> #include <asm/u-boot.h> #include <nand.h> #include <fat.h> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index a6ad094e91..a2612b45a5 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -14,6 +14,7 @@ #include <spl.h> #include <sysinfo.h> #include <asm/cache.h> +#include <asm/global_data.h> #include <linux/libfdt.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index 41e0746bb0..1c0abf8553 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -11,6 +11,7 @@ #include <hang.h> #include <image.h> #include <spl.h> +#include <asm/global_data.h> #include <asm/smp.h> #include <opensbi.h> #include <linux/libfdt.h> diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index 2744fb5d52..6a4e033287 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -15,6 +15,7 @@ #include <spi_flash.h> #include <errno.h> #include <spl.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/splash_source.c b/common/splash_source.c index f51ca5ddf3..2737fc6e7f 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -20,6 +20,7 @@ #include <spi_flash.h> #include <splash.h> #include <usb.h> +#include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/stdio.c b/common/stdio.c index abf9b1e915..2b883fddbe 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -19,7 +19,7 @@ #include <serial.h> #include <splash.h> #include <i2c.h> - +#include <asm/global_data.h> #include <dm/device-internal.h> DECLARE_GLOBAL_DATA_PTR; |