diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index aaf7b7c447..40b98dbf08 100644 --- a/arch/arm/mach-mvebu/arm64-common.c +++ b/arch/arm/mach-mvebu/arm64-common.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c index af00a6b637..530644c043 100644 --- a/arch/arm/mach-rockchip/sdram.c +++ b/arch/arm/mach-rockchip/sdram.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 07f54f0684..d3497a2673 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index ec18df8879..0ae5e09e01 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c index b7b1207235..1dc77efeca 100644 --- a/arch/riscv/cpu/generic/dram.c +++ b/arch/riscv/cpu/generic/dram.c @@ -5,6 +5,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c index b31d78c092..dfd8afc35f 100644 --- a/arch/x86/cpu/broadwell/sdram.c +++ b/arch/x86/cpu/broadwell/sdram.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index 664817feff..27e859885e 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index af6dd2f743..66df128787 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c index a45525f842..3143c079ad 100644 --- a/arch/x86/cpu/efi/sdram.c +++ b/arch/x86/cpu/efi/sdram.c @@ -5,6 +5,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c index b35102a3f0..755670a847 100644 --- a/arch/x86/cpu/intel_common/mrc.c +++ b/arch/x86/cpu/intel_common/mrc.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index 8a58d0383d..51ca4ad301 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c index 6707b7b363..19d92f27d8 100644 --- a/arch/x86/cpu/qemu/dram.c +++ b/arch/x86/cpu/qemu/dram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c index 1b764dfccd..995e119fb6 100644 --- a/arch/x86/cpu/quark/dram.c +++ b/arch/x86/cpu/quark/dram.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c index 05d40d196c..33e91fb636 100644 --- a/arch/x86/cpu/slimbootloader/sdram.c +++ b/arch/x86/cpu/slimbootloader/sdram.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 2d1023068f..bc456bb4a9 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 3e3a11ac2f..5bb55e256f 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index 20be0c3bd4..75395d92cd 100644 --- a/board/armadeus/apf27/apf27.c +++ b/board/armadeus/apf27/apf27.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c index 3f8a5c0d8e..241b384668 100644 --- a/board/imgtec/boston/ddr.c +++ b/board/imgtec/boston/ddr.c @@ -4,6 +4,7 @@ */ #include +#include #include diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index bda5f0df5b..065e6a2ccc 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 3d4afaf653..5f120ea9c2 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 544f872459..4d86757c39 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index db5d7b8834..51b121ce05 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 05f4b73c6e..d66afb37ca 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c index add64b85b5..076e9ea019 100644 --- a/drivers/video/fsl_dcu_fb.c +++ b/drivers/video/fsl_dcu_fb.c @@ -6,6 +6,7 @@ * FSL DCU Framebuffer driver */ +#include #include #include #include diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index b1aa4b25be..31f0aa7ddc 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 16d4b0612f..9bdd1cf85c 100644 --- a/include/common.h +++ b/include/common.h @@ -73,17 +73,6 @@ extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ int mdm_init(void); -/** - * Get the uppermost pointer that is valid to access - * - * Some systems may not map all of their address space. This function allows - * boards to indicate what their highest support pointer value is for DRAM - * access. - * - * @param total_size Size of U-Boot (unused?) - */ -ulong board_get_usable_ram_top(ulong total_size); - /** * arch_fixup_fdt() - Write arch-specific information to fdt * diff --git a/include/init.h b/include/init.h index afc953d51e..6076283d2c 100644 --- a/include/init.h +++ b/include/init.h @@ -10,6 +10,8 @@ #ifndef __INIT_H_ #define __INIT_H_ 1 +#include + #ifndef __ASSEMBLY__ /* put C only stuff in this section */ /* @@ -149,6 +151,8 @@ ulong board_init_f_alloc_reserve(ulong top); */ void board_init_f_init_reserve(ulong base); +struct global_data; + /** * arch_setup_gd() - Set up the global_data pointer * @gd_ptr: Pointer to global data @@ -160,10 +164,11 @@ void board_init_f_init_reserve(ulong base); * * gd = gd_ptr; */ -void arch_setup_gd(gd_t *gd_ptr); +void arch_setup_gd(struct global_data *gd_ptr); /* common/board_r.c */ -void board_init_r(gd_t *id, ulong dest_addr) __attribute__ ((noreturn)); +void board_init_r(struct global_data *id, ulong dest_addr) + __attribute__ ((noreturn)); int cpu_init_r(void); int last_stage_init(void); @@ -181,6 +186,17 @@ int init_func_vid(void); int checkboard(void); int show_board_info(void); +/** + * Get the uppermost pointer that is valid to access + * + * Some systems may not map all of their address space. This function allows + * boards to indicate what their highest support pointer value is for DRAM + * access. + * + * @param total_size Size of U-Boot (unused?) + */ +ulong board_get_usable_ram_top(ulong total_size); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index d46001f608..89adf20310 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include