summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 11:40:01 -0600
committerTom Rini <trini@konsulko.com>2020-05-18 17:33:33 -0400
commit4d72caa5b96b71e49b63f98bd8548b194380b544 (patch)
tree8e636424599794d122342437e21fb601a7c62180
parent52f24238046ca28085f6de946d0358e5c7c7cbe8 (diff)
downloadu-boot-4d72caa5b96b71e49b63f98bd8548b194380b544.tar.gz
u-boot-4d72caa5b96b71e49b63f98bd8548b194380b544.tar.xz
u-boot-4d72caa5b96b71e49b63f98bd8548b194380b544.zip
common: Drop image.h from common header
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arc/lib/bootm.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/mp.c1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/spl.c1
-rw-r--r--arch/arm/cpu/armv8/sec_firmware.c2
-rw-r--r--arch/arm/lib/bootm.c1
-rw-r--r--arch/arm/lib/image.c1
-rw-r--r--arch/arm/lib/zimage.c1
-rw-r--r--arch/arm/mach-imx/misc.c1
-rw-r--r--arch/arm/mach-k3/common.c1
-rw-r--r--arch/arm/mach-k3/security.c1
-rw-r--r--arch/arm/mach-k3/sysfw-loader.c1
-rw-r--r--arch/arm/mach-keystone/mon.c1
-rw-r--r--arch/arm/mach-rockchip/misc.c1
-rw-r--r--arch/arm/mach-rockchip/rk3399/rk3399.c1
-rw-r--r--arch/arm/mach-rockchip/spl.c1
-rw-r--r--arch/arm/mach-stm32mp/dram_init.c2
-rw-r--r--arch/arm/mach-sunxi/spl_spi_sunxi.c1
-rw-r--r--arch/arm/mach-zynq/spl.c1
-rw-r--r--arch/arm/mach-zynqmp/spl.c1
-rw-r--r--arch/m68k/lib/bootm.c1
-rw-r--r--arch/microblaze/lib/bootm.c1
-rw-r--r--arch/mips/lib/bootm.c1
-rw-r--r--arch/mips/mach-jz47xx/jz4780/jz4780.c1
-rw-r--r--arch/nds32/include/asm/u-boot-nds32.h2
-rw-r--r--arch/nios2/lib/bootm.c1
-rw-r--r--arch/powerpc/include/asm/fsl_i2c.h1
-rw-r--r--arch/powerpc/lib/bootm.c1
-rw-r--r--arch/riscv/lib/image.c1
-rw-r--r--arch/sandbox/lib/bootm.c1
-rw-r--r--arch/sh/lib/bootm.c1
-rw-r--r--arch/x86/cpu/apollolake/spl.c1
-rw-r--r--arch/x86/lib/spl.c1
-rw-r--r--arch/x86/lib/tpl.c1
-rw-r--r--board/AndesTech/ax25-ae350/ax25-ae350.c1
-rw-r--r--board/Arcturus/ucp1020/ucp1020.c1
-rw-r--r--board/advantech/imx8qm_rom7720_a1/spl.c1
-rw-r--r--board/aristainetos/aristainetos.c1
-rw-r--r--board/dhelectronics/dh_imx6/dh_imx6.c1
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c1
-rw-r--r--board/engicam/common/spl.c1
-rw-r--r--board/freescale/b4860qds/b4860qds.c1
-rw-r--r--board/freescale/bsc9131rdb/bsc9131rdb.c1
-rw-r--r--board/freescale/bsc9132qds/bsc9132qds.c1
-rw-r--r--board/freescale/c29xpcie/c29xpcie.c1
-rw-r--r--board/freescale/corenet_ds/corenet_ds.c1
-rw-r--r--board/freescale/corenet_ds/eth_p4080.c1
-rw-r--r--board/freescale/imx8mm_evk/spl.c1
-rw-r--r--board/freescale/imx8mn_evk/spl.c1
-rw-r--r--board/freescale/imx8mp_evk/spl.c1
-rw-r--r--board/freescale/imx8mq_evk/spl.c1
-rw-r--r--board/freescale/imx8qm_mek/spl.c1
-rw-r--r--board/freescale/imx8qxp_mek/spl.c1
-rw-r--r--board/freescale/ls1046afrwy/eth.c1
-rw-r--r--board/freescale/ls1046ardb/eth.c1
-rw-r--r--board/freescale/lx2160a/eth_lx2160aqds.c2
-rw-r--r--board/freescale/lx2160a/eth_lx2160ardb.c1
-rw-r--r--board/freescale/mpc8572ds/mpc8572ds.c1
-rw-r--r--board/freescale/mx6sabreauto/mx6sabreauto.c1
-rw-r--r--board/freescale/mx6sabresd/mx6sabresd.c1
-rw-r--r--board/freescale/p1010rdb/p1010rdb.c1
-rw-r--r--board/freescale/p1022ds/p1022ds.c1
-rw-r--r--board/freescale/p1023rdb/p1023rdb.c1
-rw-r--r--board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c1
-rw-r--r--board/freescale/p1_twr/p1_twr.c1
-rw-r--r--board/freescale/p2041rdb/p2041rdb.c1
-rw-r--r--board/freescale/t102xqds/eth_t102xqds.c1
-rw-r--r--board/freescale/t102xqds/t102xqds.c1
-rw-r--r--board/freescale/t102xrdb/eth_t102xrdb.c1
-rw-r--r--board/freescale/t102xrdb/t102xrdb.c1
-rw-r--r--board/freescale/t1040qds/eth.c1
-rw-r--r--board/freescale/t1040qds/t1040qds.c1
-rw-r--r--board/freescale/t104xrdb/t104xrdb.c1
-rw-r--r--board/freescale/t208xqds/eth_t208xqds.c2
-rw-r--r--board/freescale/t208xqds/t208xqds.c1
-rw-r--r--board/freescale/t208xrdb/eth_t208xrdb.c1
-rw-r--r--board/freescale/t208xrdb/t208xrdb.c1
-rw-r--r--board/freescale/t4qds/eth.c2
-rw-r--r--board/freescale/t4qds/t4240emu.c1
-rw-r--r--board/freescale/t4qds/t4240qds.c1
-rw-r--r--board/freescale/t4rdb/eth.c1
-rw-r--r--board/freescale/t4rdb/t4240rdb.c1
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c1
-rw-r--r--board/gdsys/p1022/controlcenterd.c1
-rw-r--r--board/ge/bx50v3/bx50v3.c1
-rw-r--r--board/highbank/highbank.c1
-rw-r--r--board/keymile/kmp204x/kmp204x.c1
-rw-r--r--board/liebherr/display5/display5.c1
-rw-r--r--board/liebherr/display5/spl.c1
-rw-r--r--board/liebherr/mccmon6/spl.c1
-rw-r--r--board/liebherr/xea/xea.c1
-rw-r--r--board/mscc/jr2/jr2.c1
-rw-r--r--board/mscc/luton/luton.c1
-rw-r--r--board/mscc/ocelot/ocelot.c1
-rw-r--r--board/mscc/serval/serval.c1
-rw-r--r--board/mscc/servalt/servalt.c1
-rw-r--r--board/renesas/rcar-common/common.c1
-rw-r--r--board/renesas/rcar-common/gen3-spl.c1
-rw-r--r--board/renesas/salvator-x/salvator-x.c1
-rw-r--r--board/renesas/ulcb/ulcb.c1
-rw-r--r--board/solidrun/mx6cuboxi/mx6cuboxi.c1
-rw-r--r--board/st/stm32mp1/stm32mp1.c1
-rw-r--r--board/sunxi/board.c1
-rw-r--r--board/synopsys/hsdk/hsdk.c1
-rw-r--r--board/technexion/pico-imx6/spl.c1
-rw-r--r--board/ti/am335x/board.c1
-rw-r--r--board/ti/am43xx/board.c1
-rw-r--r--board/ti/am57xx/board.c1
-rw-r--r--board/ti/am65x/evm.c2
-rw-r--r--board/ti/dra7xx/evm.c1
-rw-r--r--board/ti/j721e/evm.c2
-rw-r--r--board/ti/ks2_evm/board.c1
-rw-r--r--board/ti/ks2_evm/board_k2e.c1
-rw-r--r--board/ti/ks2_evm/board_k2g.c1
-rw-r--r--board/ti/ks2_evm/board_k2hk.c1
-rw-r--r--board/ti/ks2_evm/board_k2l.c1
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c1
-rw-r--r--board/toradex/verdin-imx8mm/spl.c1
-rw-r--r--board/tqc/tqma6/tqma6.c1
-rw-r--r--board/varisys/cyrus/cyrus.c1
-rw-r--r--board/wandboard/wandboard.c1
-rw-r--r--cmd/abootimg.c1
-rw-r--r--cmd/bootefi.c1
-rw-r--r--cmd/fdt.c1
-rw-r--r--cmd/fpga.c1
-rw-r--r--cmd/md5sum.c1
-rw-r--r--cmd/spl.c1
-rw-r--r--common/bootm_os.c2
-rw-r--r--common/fdt_region.c1
-rw-r--r--common/hash.c2
-rw-r--r--common/image-fdt.c1
-rw-r--r--common/image-fit.c1
-rw-r--r--common/image-sig.c2
-rw-r--r--common/image.c1
-rw-r--r--common/spl/spl_atf.c1
-rw-r--r--common/spl/spl_legacy.c1
-rw-r--r--common/spl/spl_nand.c2
-rw-r--r--common/spl/spl_net.c1
-rw-r--r--common/spl/spl_nor.c1
-rw-r--r--common/spl/spl_onenand.c1
-rw-r--r--common/spl/spl_opensbi.c2
-rw-r--r--common/spl/spl_ram.c1
-rw-r--r--common/spl/spl_spi.c1
-rw-r--r--common/spl/spl_ubi.c1
-rw-r--r--common/spl/spl_xip.c1
-rw-r--r--common/spl/spl_ymodem.c1
-rw-r--r--drivers/fastboot/fb_mmc.c1
-rw-r--r--drivers/fpga/socfpga_arria10.c1
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c1
-rw-r--r--drivers/net/fm/fdt.c1
-rw-r--r--drivers/net/fm/init.c1
-rw-r--r--drivers/net/fsl-mc/mc.c1
-rw-r--r--drivers/net/fsl_enetc.c1
-rw-r--r--drivers/net/mvpp2.c1
-rw-r--r--drivers/net/pfe_eth/pfe_firmware.c1
-rw-r--r--drivers/net/ti/keystone_net.c1
-rw-r--r--drivers/phy/marvell/comphy_core.c3
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson.c1
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c1
-rw-r--r--drivers/pinctrl/pinctrl-sti.c1
-rw-r--r--drivers/pinctrl/pinctrl_stm32.c1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rockchip-core.c1
-rw-r--r--drivers/spi/fsl_qspi.c3
-rw-r--r--drivers/thermal/imx_scu_thermal.c1
-rw-r--r--include/asm-generic/u-boot.h1
-rw-r--r--include/common.h1
-rw-r--r--include/tee/optee.h7
-rw-r--r--include/vxworks.h6
-rw-r--r--lib/lmb.c1
-rw-r--r--net/tftp.c1
-rw-r--r--test/compression.c1
-rw-r--r--test/overlay/cmd_ut_overlay.c1
-rw-r--r--tools/imx8image.c1
173 files changed, 195 insertions, 7 deletions
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 1b08ffe285..9fa6aaf3b2 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -5,7 +5,9 @@
#include <common.h>
#include <bootstage.h>
+#include <image.h>
#include <irq_func.h>
+#include <lmb.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
index 8110412da6..e73689ce26 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <fdt_support.h>
#include <asm/arch-fsl-layerscape/immap_lsch3.h>
#include <asm/arch-fsl-layerscape/fsl_icid.h>
#include <asm/arch-fsl-layerscape/fsl_portals.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 4e779dde1d..4ef2a30278 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
#include <asm/cache.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 2c0ce80c0c..c0201341ea 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -7,6 +7,7 @@
#include <clock_legacy.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
#include <spl.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 36f40a4015..c7445e647e 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <fdt_support.h>
+#include <image.h>
#include <asm/cache.h>
#include <linux/kernel.h>
#include <asm/io.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index c189bdcf9a..68beea2c9d 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -17,6 +17,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <hang.h>
+#include <lmb.h>
#include <dm/root.h>
#include <env.h>
#include <image.h>
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 699bf44e70..9cf4a67406 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <image.h>
#include <mapmem.h>
#include <linux/sizes.h>
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 49305299b3..477ea94997 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -7,6 +7,7 @@
* Copyright (C) 2012 Marek Vasut <marek.vasut@gmail.com>
*/
#include <common.h>
+#include <image.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
#define BAREBOX_IMAGE_MAGIC 0x00786f62
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 31e95a9a28..6744fbda46 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <lmb.h>
#include <asm/arch/sys_proto.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 33273b8eff..af1020be95 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
#include <spl.h>
#include "common.h"
#include <dm.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index dd7c998487..256b0526f2 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -10,6 +10,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <hang.h>
+#include <image.h>
#include <asm/cache.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <mach/spl.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 6d54b65f08..472b5085ed 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <spl.h>
#include <malloc.h>
#include <remoteproc.h>
diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c
index b7de9ba099..58995d73ac 100644
--- a/arch/arm/mach-keystone/mon.c
+++ b/arch/arm/mach-keystone/mon.c
@@ -6,6 +6,7 @@
*/
#include <hang.h>
+#include <image.h>
#include <asm/unaligned.h>
#include <common.h>
#include <command.h>
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 6dbb9bde48..17066bcf8b 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
#include <dm.h>
+#include <hash.h>
#include <dm/uclass-internal.h>
#include <misc.h>
#include <u-boot/crc.h>
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index dafa142824..3a51194108 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <fdt_support.h>
#include <spl.h>
#include <spl_gpio.h>
#include <syscon.h>
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 0b76af6080..2796e41369 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -7,6 +7,7 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#include <image.h>
#include <ram.h>
#include <spl.h>
#include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 3233415eff..24389d5cf1 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <dm.h>
+#include <image.h>
+#include <init.h>
#include <lmb.h>
#include <ram.h>
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index a3997b2590..612942025b 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <spl.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 02a7dc9854..627c84ceba 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <debug_uart.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <generated/dt.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 68df0a79c4..35dbff01bd 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <spl.h>
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index fb1170d00d..c36ee79c92 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <env.h>
#include <image.h>
+#include <lmb.h>
#include <u-boot/zlib.h>
#include <bzlib.h>
#include <watchdog.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index f7303b790f..592ac97f82 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -15,6 +15,7 @@
#include <fdt_support.h>
#include <hang.h>
#include <image.h>
+#include <lmb.h>
#include <asm/cache.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 6a6764ac2d..ce2b076b7d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <image.h>
#include <fdt_support.h>
+#include <lmb.h>
#include <asm/addrspace.h>
#include <asm/io.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index 015840de25..26fcfc842c 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <asm/sections.h>
diff --git a/arch/nds32/include/asm/u-boot-nds32.h b/arch/nds32/include/asm/u-boot-nds32.h
index 7d39320c15..f086f34729 100644
--- a/arch/nds32/include/asm/u-boot-nds32.h
+++ b/arch/nds32/include/asm/u-boot-nds32.h
@@ -12,6 +12,8 @@
#ifndef _U_BOOT_NDS32_H_
#define _U_BOOT_NDS32_H_ 1
+#include <linux/types.h>
+
/* for the following variables, see start.S */
extern ulong IRQ_STACK_START; /* top of IRQ stack */
extern ulong FIQ_STACK_START; /* top of FIQ stack */
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index e1891617c7..bec18fe28f 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
#include <irq_func.h>
#define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
diff --git a/arch/powerpc/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h
index fbf32b9a07..73105fa8e4 100644
--- a/arch/powerpc/include/asm/fsl_i2c.h
+++ b/arch/powerpc/include/asm/fsl_i2c.h
@@ -14,6 +14,7 @@
#define _ASM_FSL_I2C_H_
#include <asm/types.h>
+#include <linux/compiler.h>
typedef struct fsl_i2c_base {
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 1cef75c4be..8aec8c9fd3 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -12,6 +12,7 @@
#include <cpu_func.h>
#include <env.h>
#include <init.h>
+#include <lmb.h>
#include <watchdog.h>
#include <command.h>
#include <image.h>
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 7357d3b07d..91b7f1624e 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <mapmem.h>
#include <errno.h>
#include <linux/sizes.h>
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index d38c3164c1..d1d460b84a 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bootstage.h>
+#include <image.h>
#include <asm/io.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c
index 2896e45f0d..5f14a04ab4 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
+#include <image.h>
#include <asm/byteorder.h>
#include <asm/zimage.h>
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index a555e6c0d3..1cf7cebff5 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -7,6 +7,7 @@
#include <binman_sym.h>
#include <bootstage.h>
#include <dm.h>
+#include <image.h>
#include <malloc.h>
#include <spi.h>
#include <spl.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 212b4d596d..bdae9291e7 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -8,6 +8,7 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#include <image.h>
#include <irq_func.h>
#include <malloc.h>
#include <spl.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 34804b53cc..f9dcf32d73 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -7,6 +7,7 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/cpu.h>
#include <asm/mtrr.h>
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index 920d43ecc6..da5bc5b1f1 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <flash.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c
index dfa1fd4f15..240e804137 100644
--- a/board/Arcturus/ucp1020/ucp1020.c
+++ b/board/Arcturus/ucp1020/ucp1020.c
@@ -12,6 +12,7 @@
#include <command.h>
#include <env.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 3f31a8f9c3..6863da82d6 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <image.h>
#include <spl.h>
#include <fsl_esdhc.h>
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 70671039c2..5095cf65d1 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -9,6 +9,7 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#include <image.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 74b461983c..4df293b7ab 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <eeprom.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <dm/device-internal.h>
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index c3f96988b1..b814df780c 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <env.h>
#include <fdtdec.h>
+#include <image.h>
#include <spl.h>
#include <init.h>
#include <virtio_types.h>
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index a9820a9028..6359fb3223 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <image.h>
#include <serial.h>
#include <spl.h>
diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
index e7f684bfb3..037a8beb64 100644
--- a/board/freescale/b4860qds/b4860qds.c
+++ b/board/freescale/b4860qds/b4860qds.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <irq_func.h>
#include <netdev.h>
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 30e7a1f7ed..871d066d68 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index 89742dfedb..6870674f7a 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/processor.h>
diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c
index 17292936b7..74502c6d18 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/processor.h>
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index 66eea32e07..f0c7bed68f 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index b1989bcbc2..5892bbd62c 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 4d34622465..f73ade5549 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 45417b2446..7cb7f6e60b 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index c5f640dc7b..79b504d409 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/io.h>
#include <errno.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 6ba6a52ebb..8b5b240edf 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <hang.h>
+#include <image.h>
#include <asm/io.h>
#include <errno.h>
#include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index ba99002cf2..5a0a2f5d2f 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <image.h>
#include <spl.h>
#include <dm/uclass.h>
#include <dm/device.h>
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index eefee64ab1..1ced8f770a 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <image.h>
#include <spl.h>
#include <dm/uclass.h>
#include <dm/device.h>
diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c
index 3f7c35b5c9..09a692be1d 100644
--- a/board/freescale/ls1046afrwy/eth.c
+++ b/board/freescale/ls1046afrwy/eth.c
@@ -3,6 +3,7 @@
* Copyright 2019 NXP
*/
#include <common.h>
+#include <fdt_support.h>
#include <net.h>
#include <asm/io.h>
#include <netdev.h>
diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c
index 6ffd4aec3e..f3b1dcd306 100644
--- a/board/freescale/ls1046ardb/eth.c
+++ b/board/freescale/ls1046ardb/eth.c
@@ -3,6 +3,7 @@
* Copyright 2016 Freescale Semiconductor, Inc.
*/
#include <common.h>
+#include <fdt_support.h>
#include <net.h>
#include <asm/io.h>
#include <netdev.h>
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index 0e928ebd86..7ffc85d1a1 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env.h>
+#include <fdt_support.h>
#include <hwconfig.h>
#include <command.h>
#include <net.h>
@@ -20,6 +21,7 @@
#include <asm/arch/fsl_serdes.h>
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h>
+#include <linux/libfdt.h>
#include "../common/qixis.h"
diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index aeb989a638..21fb559250 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <malloc.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index b7e0eeded5..13cfe159ae 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index 33da3914d3..829e42f677 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/io.h>
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index d46dcd4b8a..8d24af0a99 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -5,6 +5,7 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/arch/clock.h>
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 782c2b71bc..1adc898441 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/processor.h>
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 33edff9727..244a053d7a 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index 5321e26a9c..13df3e8637 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index 5d619dbd2e..59c57e43a5 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <hang.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c
index 6d0e1b1ffa..8e1522a604 100644
--- a/board/freescale/p1_twr/p1_twr.c
+++ b/board/freescale/p1_twr/p1_twr.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c
index 95ed0ef429..076e63a357 100644
--- a/board/freescale/p2041rdb/p2041rdb.c
+++ b/board/freescale/p2041rdb/p2041rdb.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 1820419511..4a3be4c569 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c
index 32b4780376..311d9efbfc 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index d40b590108..dbf25a237d 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index a34490c8bd..983c723a10 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 3f10e420a0..b349b77951 100644
--- a/board/freescale/t1040qds/eth.c
+++ b/board/freescale/t1040qds/eth.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c
index 9e253fdec2..c166403ba4 100644
--- a/board/freescale/t1040qds/t1040qds.c
+++ b/board/freescale/t1040qds/t1040qds.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index dc3b59d26f..a156d2ee09 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index 72991ea591..057fe411e9 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
@@ -28,6 +29,7 @@
#include "../common/qixis.h"
#include "../common/fman.h"
#include "t208xqds_qixis.h"
+#include <linux/libfdt.h>
#define EMI_NONE 0xFFFFFFFF
#define EMI1_RGMII1 0
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index 9100401022..9bf6ab1037 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 669bc1efef..db4718128d 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index b5c20112d0..24f0d0764c 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t4qds/eth.c b/board/freescale/t4qds/eth.c
index d93d75950c..8a9f631e8d 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
@@ -26,6 +27,7 @@
#include <hwconfig.h>
#include "../common/qixis.h"
#include "../common/fman.h"
+#include <linux/libfdt.h>
#include "t4240qds_qixis.h"
diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c
index 104b40a110..8f2032acc7 100644
--- a/board/freescale/t4qds/t4240emu.c
+++ b/board/freescale/t4qds/t4240emu.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 869c01de92..0b00ec6e29 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <irq_func.h>
#include <netdev.h>
diff --git a/board/freescale/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 3321ce1ea1..4c896c8a90 100644
--- a/board/freescale/t4rdb/eth.c
+++ b/board/freescale/t4rdb/eth.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 8015666ecc..d801f2c7a1 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 6c81864319..1443ef91ef 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -33,6 +33,7 @@
#include <mtd_node.h>
#include <netdev.h>
#include <pci.h>
+#include <linux/libfdt.h>
#include <power/pmic.h>
#include <power/ltc3676_pmic.h>
#include <power/pfuze100_pmic.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 14e3e25c18..b39b0b6002 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <pci.h>
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 69cd0a1bc7..6f7f752a8d 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -5,6 +5,7 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
+#include <image.h>
#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index f7f2e2c525..ffde1161d0 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -7,6 +7,7 @@
#include <ahci.h>
#include <cpu_func.h>
#include <env.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <scsi.h>
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index 0a6cf1fd29..21afbc7f39 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 85ca777c1d..a362d25c01 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <fdt_support.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 765463e370..0f5eab79b5 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
#include <serial.h>
#include <spl.h>
#include <linux/libfdt.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 08d2b56d54..8ed8e03295 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -5,6 +5,7 @@
* Richard Hu <hakahu@gmail.com>
*/
+#include <image.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 1a9c05275f..95c9064066 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <fdt_support.h>
#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index 067907ba52..b240c7649c 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index e614058d10..acc26157c7 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index ad227a4169..5fbd8fc6cd 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <asm/addrspace.h>
diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c
index 6c6dbf2bff..ed1aea55cc 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c
index 71891f6fe3..d0e6016b9a 100644
--- a/board/mscc/servalt/servalt.c
+++ b/board/mscc/servalt/servalt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 37f8a46d7e..5a6aa8255b 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <dm/uclass-internal.h>
#include <asm/arch/rmobile.h>
+#include <linux/libfdt.h>
#ifdef CONFIG_RCAR_GEN3
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index d9741c1939..a3e2aebe77 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
#include <asm/io.h>
#include <spl.h>
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index 91c3728571..ecf0dde4ef 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index b91f940b48..04ca49572f 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 262f6640d9..a2d7b1a1c8 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/arch/clock.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 09090935e5..571492274f 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <env.h>
#include <env_internal.h>
+#include <fdt_support.h>
#include <g_dnl.h>
#include <generic-phy.h>
#include <hang.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 6afea6ef42..e210824b4e 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <env.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <mmc.h>
#include <axp_pmic.h>
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index e32e782787..e102d0f068 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#include <irq_func.h>
#include <asm/cache.h>
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index bafe9ba6b7..983f98beec 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index c6de8602d0..56fe171aa7 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
#include <init.h>
#include <malloc.h>
#include <net.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 87c7ef6b3f..923b224e4c 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <eeprom.h>
+#include <image.h>
#include <dm/uclass.h>
#include <env.h>
#include <fdt_support.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index c80a458c12..8720eb87a5 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <malloc.h>
#include <net.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 9d96710f05..346f745bb0 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -9,6 +9,8 @@
#include <common.h>
#include <dm.h>
+#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 8f59598950..acf7ff1691 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <spl.h>
#include <net.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 7bc03edd53..d9af309818 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -8,6 +8,8 @@
*/
#include <common.h>
+#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <net.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 6554c0eb11..8595b20e87 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -10,6 +10,7 @@
#include "board.h"
#include <env.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <spl.h>
#include <exports.h>
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index ecd4a42df4..350cc68e49 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/arch/ddr3.h>
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index c6a14a0554..21f002e3b1 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -9,6 +9,7 @@
#include <eeprom.h>
#include <env.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <asm/arch/clock.h>
#include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index 4c0acd627f..1eb6cd761e 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/arch/clock.h>
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index e49d8b3482..5ff11ee0d6 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/arch/ddr3.h>
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 47925568c6..dac9503c1b 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <image.h>
#include <init.h>
#include <net.h>
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index dc5bd84f33..c614fc7a3f 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <asm/arch/clock.h>
#include <asm/arch/ddr.h>
#include <asm/arch/imx8mm_pins.h>
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 675341abdd..d7df4f976a 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -14,6 +14,7 @@
#include <asm/arch/iomux.h>
#include <asm/arch/sys_proto.h>
#include <env.h>
+#include <fdt_support.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index 13429072c7..a42910f600 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 9705a1d8e3..5e993d0258 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 670bcb3aaa..15e727f4a2 100644
--- a/cmd/abootimg.c
+++ b/cmd/abootimg.c
@@ -6,6 +6,7 @@
#include <android_image.h>
#include <common.h>
+#include <image.h>
#include <mapmem.h>
#define abootimg_addr() \
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 9849eb4f99..b84373453d 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -13,6 +13,7 @@
#include <efi_selftest.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <linux/libfdt_env.h>
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 36cc726540..f66ceca2c7 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <linux/ctype.h>
#include <linux/types.h>
#include <asm/global_data.h>
diff --git a/cmd/fpga.c b/cmd/fpga.c
index b1c7b5453b..563528ca5e 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -13,6 +13,7 @@
#include <fpga.h>
#include <fs.h>
#include <gzip.h>
+#include <image.h>
#include <malloc.h>
static long do_fpga_get_device(char *arg)
diff --git a/cmd/md5sum.c b/cmd/md5sum.c
index 63cbae0364..4e30334951 100644
--- a/cmd/md5sum.c
+++ b/cmd/md5sum.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <mapmem.h>
#include <u-boot/md5.h>
#include <asm/io.h>
diff --git a/cmd/spl.c b/cmd/spl.c
index 56051b8a4b..61256f4830 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <cmd_spl.h>
#include <env.h>
+#include <image.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 44023532e1..8599bc8ca3 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -11,6 +11,8 @@
#include <efi_loader.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
+#include <lmb.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <mapmem.h>
diff --git a/common/fdt_region.c b/common/fdt_region.c
index bf0a9be730..667659054a 100644
--- a/common/fdt_region.c
+++ b/common/fdt_region.c
@@ -5,6 +5,7 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#include <fdt_support.h>
#include <linux/libfdt_env.h>
#include <fdt_region.h>
diff --git a/common/hash.c b/common/hash.c
index 2cf763575f..810854ce0f 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -23,10 +23,10 @@
#else
#include "mkimage.h"
#include <time.h>
-#include <image.h>
#endif /* !USE_HOSTCC*/
#include <hash.h>
+#include <image.h>
#include <u-boot/crc.h>
#include <u-boot/sha1.h>
#include <u-boot/sha256.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 3002948b6b..270732278e 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -14,6 +14,7 @@
#include <env.h>
#include <errno.h>
#include <image.h>
+#include <lmb.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <mapmem.h>
diff --git a/common/image-fit.c b/common/image-fit.c
index 368b73088a..dc745fef7c 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -11,6 +11,7 @@
#ifdef USE_HOSTCC
#include "mkimage.h"
#include <time.h>
+#include <linux/libfdt.h>
#include <u-boot/crc.h>
#else
#include <linux/compiler.h>
diff --git a/common/image-sig.c b/common/image-sig.c
index 84b2c0439c..5122dc948f 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -5,7 +5,9 @@
#ifdef USE_HOSTCC
#include "mkimage.h"
+#include <fdt_support.h>
#include <time.h>
+#include <linux/libfdt.h>
#else
#include <common.h>
#include <malloc.h>
diff --git a/common/image.c b/common/image.c
index 20fa4bd497..6a24abf6ff 100644
--- a/common/image.c
+++ b/common/image.c
@@ -11,6 +11,7 @@
#include <bootstage.h>
#include <cpu_func.h>
#include <env.h>
+#include <lmb.h>
#include <malloc.h>
#include <asm/cache.h>
#include <u-boot/crc.h>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index bc2921c552..b83e3bb54a 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -13,6 +13,7 @@
#include <atf_common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <image.h>
#include <spl.h>
#include <asm/cache.h>
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index 29d3ec7073..db5017a4b0 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <malloc.h>
#include <spl.h>
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 5f8a111a2f..e81279aa1b 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
#include <config.h>
+#include <fdt_support.h>
+#include <image.h>
#include <spl.h>
#include <asm/io.h>
#include <nand.h>
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 30c050c0b3..a9b6b07ab3 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
#include <spl.h>
#include <net.h>
#include <linux/libfdt.h>
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 3f03ffe6a3..d4733ea90a 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <spl.h>
static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c
index ee30f328e6..8ba3d4027a 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
#include <config.h>
+#include <image.h>
#include <spl.h>
#include <asm/io.h>
#include <onenand_uboot.h>
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index 3519c34299..e88136e6f3 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -9,9 +9,11 @@
#include <cpu_func.h>
#include <errno.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/smp.h>
#include <opensbi.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 954e91a004..80572ceec2 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
#include <binman_sym.h>
+#include <image.h>
#include <mapmem.h>
#include <spl.h>
#include <linux/libfdt.h>
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 288dbb5fa9..7a374bbfcc 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <image.h>
#include <spi.h>
#include <spi_flash.h>
#include <errno.h>
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index 0cb5080882..de6a63bd2d 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
+#include <image.h>
#include <nand.h>
#include <onenand_uboot.h>
#include <ubispl.h>
diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c
index 1af4da8725..f857278018 100644
--- a/common/spl/spl_xip.c
+++ b/common/spl/spl_xip.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <image.h>
#include <spl.h>
static int spl_xip(struct spl_image_info *spl_image,
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 8500ee8ba5..414e62176b 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
#include <gzip.h>
+#include <image.h>
#include <spl.h>
#include <xyzModem.h>
#include <asm/u-boot.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index c666eb0f29..94fab4e5e0 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -12,6 +12,7 @@
#include <fb_mmc.h>
#include <flash.h>
#include <image-sparse.h>
+#include <image.h>
#include <part.h>
#include <mmc.h>
#include <div64.h>
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 2853581b97..6a3ad6a969 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -2,6 +2,7 @@
/*
* Copyright (C) 2017-2019 Intel Corporation <www.intel.com>
*/
+#include <image.h>
#include <asm/io.h>
#include <asm/arch/fpga_manager.h>
#include <asm/arch/reset_manager.h>
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 0575bd8937..83dcb40213 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -17,6 +17,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <linux/errno.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index a6b0d87415..242d27a34e 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -4,6 +4,7 @@
*/
#include <asm/io.h>
#include <env.h>
+#include <fdt_support.h>
#include <fsl_qe.h> /* For struct qe_firmware */
#include <u-boot/crc.h>
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index f654562f64..2cc8bbfb10 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -10,6 +10,7 @@
#include <fsl_mdio.h>
#ifdef CONFIG_FSL_LAYERSCAPE
#include <asm/arch/fsl_serdes.h>
+#include <linux/libfdt.h>
#else
#include <asm/fsl_serdes.h>
#endif
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index fee372968a..da0815a46f 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
#include <malloc.h>
#include <linux/bug.h>
#include <asm/io.h>
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 2fa27c7b6e..2a66c2e5f9 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <fdt_support.h>
#include <malloc.h>
#include <memalign.h>
#include <net.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 29067194cb..1e0db6c8c7 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -34,6 +34,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <linux/compat.h>
+#include <linux/libfdt.h>
#include <linux/mbus.h>
#include <asm-generic/gpio.h>
#include <fdt_support.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index 13112d9c1a..dbb69a0c59 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -10,6 +10,7 @@
* files.
*/
+#include <image.h>
#include <malloc.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 4baeeb83f1..ecd6df9e45 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -21,6 +21,7 @@
#include <asm/ti-common/keystone_net.h>
#include <asm/ti-common/keystone_serdes.h>
#include <asm/arch/psc_defs.h>
+#include <linux/libfdt.h>
#include "cpsw_mdio.h"
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index 244beef18d..27bff27ff7 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,10 +8,11 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
-#include <asm/io.h>
+#include <linux/libfdt.h>
#include "comphy_core.h"
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 7fbe2810a2..535f491d49 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -13,6 +13,7 @@
#include <fdt_support.h>
#include <linux/err.h>
#include <linux/io.h>
+#include <linux/libfdt.h>
#include <linux/sizes.h>
#include <asm/gpio.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 6e0bcae991..b9fb46815b 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -32,6 +32,7 @@
#include <asm/gpio.h>
#include <asm/system.h>
#include <asm/io.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index f0cd845fea..14fcad5aad 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -14,6 +14,7 @@
#include <syscon.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 9926235b52..32038cea8f 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -9,6 +9,7 @@
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <linux/err.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 0fd0416b18..386a13ed87 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -9,6 +9,7 @@
#include <regmap.h>
#include <syscon.h>
#include <fdtdec.h>
+#include <linux/libfdt.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index ee2c8b67dc..caf31ef98c 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -25,6 +25,9 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/libfdt.h>
+#include <linux/sizes.h>
+#include <linux/iopoll.h>
#include <dm.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index da13121a09..ecf25a7c99 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -11,6 +11,7 @@
#include <dm/device-internal.h>
#include <dm/device.h>
#include <asm/arch/sci/sci.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index cc94d39069..6f749736f1 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -23,6 +23,7 @@
#ifndef __ASSEMBLY__
+#include <asm/types.h>
#include <linux/types.h>
typedef struct bd_info {
diff --git a/include/common.h b/include/common.h
index fd3e2de4cc..a87c062880 100644
--- a/include/common.h
+++ b/include/common.h
@@ -28,7 +28,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <linux/kernel.h>
-#include <image.h>
#include <log.h>
#include <asm/u-boot.h> /* boot information for Linux kernel */
#include <asm/global_data.h> /* global data used for startup functions */
diff --git a/include/tee/optee.h b/include/tee/optee.h
index 121b30a303..affa937da0 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -10,6 +10,7 @@
#define _OPTEE_H
#include <linux/errno.h>
+#include <image.h>
#define OPTEE_MAGIC 0x4554504f
#define OPTEE_VERSION 1
@@ -28,14 +29,16 @@ struct optee_header {
uint32_t paged_size;
};
-static inline uint32_t optee_image_get_entry_point(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_entry_point(const struct image_header *hdr)
{
struct optee_header *optee_hdr = (struct optee_header *)(hdr + 1);
return optee_hdr->init_load_addr_lo;
}
-static inline uint32_t optee_image_get_load_addr(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_load_addr(const struct image_header *hdr)
{
return optee_image_get_entry_point(hdr) - sizeof(struct optee_header);
}
diff --git a/include/vxworks.h b/include/vxworks.h
index d90d862fb7..10c5e116d5 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -9,6 +9,8 @@
#include <efi_api.h>
+struct bootm_headers;
+
/* Use Linux compatible standard DTB */
#define VXWORKS_SYSFLG_STD_DTB 0x1
@@ -84,7 +86,7 @@ struct efi_gop_info {
};
int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-void boot_prep_vxworks(bootm_headers_t *images);
-void boot_jump_vxworks(bootm_headers_t *images);
+void boot_prep_vxworks(struct bootm_headers *images);
+void boot_jump_vxworks(struct bootm_headers *images);
#endif
diff --git a/lib/lmb.c b/lib/lmb.c
index 07b9308adf..2f0e495edf 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <lmb.h>
#include <malloc.h>
diff --git a/net/tftp.c b/net/tftp.c
index be24e63075..3348521c90 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -11,6 +11,7 @@
#include <efi_loader.h>
#include <env.h>
#include <image.h>
+#include <lmb.h>
#include <mapmem.h>
#include <net.h>
#include <net/tftp.h>
diff --git a/test/compression.c b/test/compression.c
index 63f929fa4b..bceb2c273c 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -7,6 +7,7 @@
#include <bootm.h>
#include <command.h>
#include <gzip.h>
+#include <image.h>
#include <lz4.h>
#include <malloc.h>
#include <mapmem.h>
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index d0083fd6be..c8d41a4dca 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <errno.h>
#include <fdt_support.h>
+#include <image.h>
#include <malloc.h>
#include <linux/sizes.h>
diff --git a/tools/imx8image.c b/tools/imx8image.c
index 1b428c3b2f..133780f5ea 100644
--- a/tools/imx8image.c
+++ b/tools/imx8image.c
@@ -6,6 +6,7 @@
*/
#include "imx8image.h"
+#include <image.h>
static int p_idx;
static int sector_size;