From ea188950af50dbe172041d111c9ab57dd4632517 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 28 Dec 2019 10:45:03 -0700 Subject: [PATCH] common: Move the image globals into image.h These three globals relate to image handling. Move them to the image header file. Signed-off-by: Simon Glass --- cmd/bmp.c | 1 + cmd/bootz.c | 1 + cmd/cramfs.c | 1 + cmd/disk.c | 1 + cmd/elf.c | 1 + cmd/jffs2.c | 1 + cmd/load.c | 1 + cmd/mvebu/bubt.c | 1 + cmd/nand.c | 1 + cmd/net.c | 1 + cmd/pxe_utils.c | 1 + common/board_r.c | 1 + common/update.c | 1 + drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c | 1 + include/common.h | 4 ---- include/image.h | 4 ++++ lib/optee/optee.c | 1 + net/net.c | 1 + net/nfs.c | 1 + net/tftp.c | 1 + 20 files changed, 22 insertions(+), 4 deletions(-) diff --git a/cmd/bmp.c b/cmd/bmp.c index 1e4c9720fe..edf4f56426 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootz.c b/cmd/bootz.c index 7bfc491221..f14a5fefbf 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/cramfs.c b/cmd/cramfs.c index 1bc987528f..ad232deae0 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/disk.c b/cmd/disk.c index c57561b3cb..15973b7d13 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -6,6 +6,7 @@ #include #include #include +#include #include int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, diff --git a/cmd/elf.c b/cmd/elf.c index 57736f997b..ba06df06cf 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_X86 diff --git a/cmd/jffs2.c b/cmd/jffs2.c index 672ed43b3f..da2580d85d 100644 --- a/cmd/jffs2.c +++ b/cmd/jffs2.c @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/load.c b/cmd/load.c index bed973ede9..fab30fe894 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index 6c68620d14..2041a7a29a 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/nand.c b/cmd/nand.c index 92089a73c1..4de6892a01 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/cmd/net.c b/cmd/net.c index 6bce214e45..1b724cc570 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -10,6 +10,7 @@ #include #include #include +#include #include static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []); diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index ff8b0dcd7b..8b830212ce 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index cf3a5f7b73..668496abed 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/common/update.c b/common/update.c index bfb760e52a..c8dd346a09 100644 --- a/common/update.c +++ b/common/update.c @@ -8,6 +8,7 @@ #include #include +#include #if !(defined(CONFIG_FIT) && defined(CONFIG_OF_LIBFDT)) #error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature" diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c index 27610d48cf..9293d54e5a 100644 --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c @@ -6,6 +6,7 @@ #include "ddr3_init.h" #include "mv_ddr_regs.h" #include "ddr_training_ip_db.h" +#include #define PATTERN_1 0x55555555 #define PATTERN_2 0xaaaaaaaa diff --git a/include/common.h b/include/common.h index 09b5f62ae3..5e38c5fc58 100644 --- a/include/common.h +++ b/include/common.h @@ -62,10 +62,6 @@ void hang (void) __attribute__ ((noreturn)); /* common/cmd_source.c */ int source (ulong addr, const char *fit_uname); -extern ulong image_load_addr; /* Default Load Address */ -extern ulong image_save_addr; /* Default Save Address */ -extern ulong image_save_size; /* Default Save Size */ - /* common/memsize.c */ long get_ram_size (long *, long); phys_size_t get_effective_memsize(void); diff --git a/include/image.h b/include/image.h index 86ebaae4fe..3649644cf1 100644 --- a/include/image.h +++ b/include/image.h @@ -112,6 +112,10 @@ struct fdt_region; # define IMAGE_OF_SYSTEM_SETUP 0 #endif +extern ulong image_load_addr; /* Default Load Address */ +extern ulong image_save_addr; /* Default Save Address */ +extern ulong image_save_size; /* Default Save Size */ + enum ih_category { IH_ARCH, IH_COMP, diff --git a/lib/optee/optee.c b/lib/optee/optee.c index c883c498e1..9b49eb8ee7 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/net/net.c b/net/net.c index b9bf0d1a8b..d8a60b6119 100644 --- a/net/net.c +++ b/net/net.c @@ -93,6 +93,7 @@ #include #include #include +#include #include #include #include diff --git a/net/nfs.c b/net/nfs.c index 5226e2c163..72e1018a3b 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/net/tftp.c b/net/tftp.c index 899d3b89d3..02401898c5 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include -- 2.39.5