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 header
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 b025fd99a0b..0bb08e7a4cf 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 0e6448becbc..eab63e9ca51 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 4327a43a33b..0cddf0359dc 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 a6db087f960..b54aa30a944 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 9fa4d4b42e5..9793439adff 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 8298693900d..defaed8426d 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 e9aaddf3e61..0b6325db660 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 5f87358fd85..d5b78b9f487 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 6635ab2bcf8..048eacb9ef9 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 b7f0f0ff418..9466651d1a2 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 5c158d03b4a..c7614a4c90f 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 3fe6791edaa..95af73f17b5 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 f3cc45cab54..567273a0ce8 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 b29a7cfd93d..cf0270a9c11 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 4578f07021f..20d8b759bc2 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 05238a8ba91..fc64002f736 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 daf3eea5f96..26a561c365b 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 18f7c8db03b..d07b0e0f09b 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 4ca9eec4ef1..b9061489396 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 707b44a69d7..0157cce32d5 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 31cc580941a..897e04c7a38 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 33210ef3c03..adc3e551de9 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 f3c209ae8b7..4abd3c080f7 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 6923dac7c07..a6500f5f5c7 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 8c8a5eac057..3f183ee1132 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 62071bd0179..d0be1bb17a2 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 7225ee44041..63d0cca3a00 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 02f2db3a99e..ab5614ad0e3 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 246eb4c4955..1650615cdb9 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 767f0febc51..6b0034c3ba2 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 8776fd47039..6abb13c93b8 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 4eb09157bb9..53c4def5d1c 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 34f0b490938..0267fb6bec8 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 e95c68265ab..d5d13d51bf1 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 cdd7b05f279..e3d84082f44 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 a6ad094e91a..a2612b45a59 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 41e0746bb01..1c0abf8553a 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 2744fb5d520..6a4e0332870 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 f51ca5ddf37..2737fc6e7ff 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 abf9b1e9158..2b883fddbea 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; |