[RFCv2 01/16] common: Drop asm/global_data.h from common header

Tom Rini trini at konsulko.com
Wed Aug 19 15:08:53 CEST 2020


From: Simon Glass <sjg at chromium.org>

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
 arch/arc/lib/bootm.c                                    | 1 +
 arch/arc/lib/cache.c                                    | 1 +
 arch/arc/lib/cpu.c                                      | 1 +
 arch/arc/lib/relocate.c                                 | 1 +
 arch/arm/cpu/arm1136/mx35/generic.c                     | 1 +
 arch/arm/cpu/arm926ejs/armada100/dram.c                 | 1 +
 arch/arm/cpu/arm926ejs/armada100/timer.c                | 1 +
 arch/arm/cpu/arm926ejs/mx25/generic.c                   | 1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c                     | 1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c                        | 1 +
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c                   | 1 +
 arch/arm/cpu/arm926ejs/mxs/timer.c                      | 1 +
 arch/arm/cpu/arm926ejs/spear/spr_misc.c                 | 1 +
 arch/arm/cpu/arm926ejs/spear/timer.c                    | 1 +
 arch/arm/cpu/armv7/arch_timer.c                         | 1 +
 arch/arm/cpu/armv7/ls102xa/clock.c                      | 1 +
 arch/arm/cpu/armv7/ls102xa/cpu.c                        | 1 +
 arch/arm/cpu/armv7/ls102xa/fdt.c                        | 1 +
 arch/arm/cpu/armv7/ls102xa/timer.c                      | 1 +
 arch/arm/cpu/armv7/s5p-common/cpu_info.c                | 1 +
 arch/arm/cpu/armv7/s5p-common/timer.c                   | 1 +
 arch/arm/cpu/armv7/s5p4418/cpu.c                        | 1 +
 arch/arm/cpu/armv7/stv0991/timer.c                      | 1 +
 arch/arm/cpu/armv7/sunxi/timer.c                        | 1 +
 arch/arm/cpu/armv7/vf610/generic.c                      | 1 +
 arch/arm/cpu/armv7/vf610/timer.c                        | 1 +
 arch/arm/cpu/armv7m/systick-timer.c                     | 1 +
 arch/arm/cpu/armv8/cache_v8.c                           | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c                 | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c     | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c     | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c                  | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c                 | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c                 | 1 +
 arch/arm/cpu/armv8/generic_timer.c                      | 1 +
 arch/arm/cpu/armv8/s32v234/generic.c                    | 1 +
 arch/arm/cpu/armv8/sec_firmware.c                       | 1 +
 arch/arm/include/asm/arch-rockchip/clock.h              | 2 ++
 arch/arm/include/asm/arch-tegra/clock.h                 | 2 ++
 arch/arm/include/asm/arch-tegra/tegra_i2c.h             | 2 ++
 arch/arm/include/asm/global_data.h                      | 3 +++
 arch/arm/include/asm/mach-imx/video.h                   | 4 +---
 arch/arm/include/asm/secure.h                           | 1 +
 arch/arm/include/asm/string.h                           | 2 --
 arch/arm/include/asm/ti-common/sys_proto.h              | 2 ++
 arch/arm/lib/bdinfo.c                                   | 1 +
 arch/arm/lib/bootm-fdt.c                                | 1 +
 arch/arm/lib/bootm.c                                    | 1 +
 arch/arm/lib/cache-cp15.c                               | 1 +
 arch/arm/lib/cache.c                                    | 1 +
 arch/arm/lib/image.c                                    | 1 +
 arch/arm/lib/interrupts.c                               | 1 +
 arch/arm/lib/interrupts_64.c                            | 1 +
 arch/arm/lib/spl.c                                      | 1 +
 arch/arm/lib/stack.c                                    | 1 +
 arch/arm/mach-aspeed/ast2500/board_common.c             | 1 +
 arch/arm/mach-aspeed/ast2500/sdram_ast2500.c            | 1 +
 arch/arm/mach-at91/arm920t/clock.c                      | 1 +
 arch/arm/mach-at91/arm920t/timer.c                      | 1 +
 arch/arm/mach-at91/arm926ejs/clock.c                    | 1 +
 arch/arm/mach-at91/arm926ejs/timer.c                    | 1 +
 arch/arm/mach-at91/armv7/clock.c                        | 1 +
 arch/arm/mach-at91/armv7/timer.c                        | 1 +
 arch/arm/mach-at91/spl_at91.c                           | 1 +
 arch/arm/mach-bcm283x/init.c                            | 1 +
 arch/arm/mach-davinci/cpu.c                             | 1 +
 arch/arm/mach-davinci/misc.c                            | 1 +
 arch/arm/mach-davinci/timer.c                           | 1 +
 arch/arm/mach-exynos/spl_boot.c                         | 1 +
 arch/arm/mach-imx/cpu.c                                 | 2 +-
 arch/arm/mach-imx/imx8/ahab.c                           | 1 +
 arch/arm/mach-imx/imx8/clock.c                          | 1 +
 arch/arm/mach-imx/imx8/cpu.c                            | 1 +
 arch/arm/mach-imx/imx8/fdt.c                            | 1 +
 arch/arm/mach-imx/imx8/iomux.c                          | 1 +
 arch/arm/mach-imx/imx8/snvs_security_sc.c               | 1 +
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                  | 1 +
 arch/arm/mach-imx/imx8m/soc.c                           | 1 +
 arch/arm/mach-imx/misc.c                                | 1 +
 arch/arm/mach-imx/mx5/mx53_dram.c                       | 1 +
 arch/arm/mach-imx/mx6/litesom.c                         | 1 +
 arch/arm/mach-imx/mx6/opos6ul.c                         | 1 +
 arch/arm/mach-imx/mx7/clock.c                           | 1 +
 arch/arm/mach-imx/mx7ulp/clock.c                        | 1 +
 arch/arm/mach-imx/speed.c                               | 1 +
 arch/arm/mach-imx/spl.c                                 | 1 +
 arch/arm/mach-imx/spl_imx_romapi.c                      | 1 +
 arch/arm/mach-imx/syscounter.c                          | 1 +
 arch/arm/mach-k3/common.c                               | 1 +
 arch/arm/mach-k3/sysfw-loader.c                         | 1 +
 arch/arm/mach-mediatek/mt7623/init.c                    | 1 +
 arch/arm/mach-mediatek/mt7629/init.c                    | 1 +
 arch/arm/mach-mediatek/mt8512/init.c                    | 1 +
 arch/arm/mach-mediatek/mt8516/init.c                    | 1 +
 arch/arm/mach-mediatek/mt8518/init.c                    | 1 +
 arch/arm/mach-meson/board-axg.c                         | 1 +
 arch/arm/mach-meson/board-common.c                      | 1 +
 arch/arm/mach-meson/board-g12a.c                        | 1 +
 arch/arm/mach-meson/board-gx.c                          | 1 +
 arch/arm/mach-meson/board-info.c                        | 1 +
 arch/arm/mach-meson/sm.c                                | 1 +
 arch/arm/mach-mvebu/arm64-common.c                      | 1 +
 arch/arm/mach-mvebu/armada3700/cpu.c                    | 1 +
 arch/arm/mach-mvebu/armada8k/dram.c                     | 1 +
 arch/arm/mach-mvebu/dram.c                              | 1 +
 arch/arm/mach-mvebu/spl.c                               | 1 +
 arch/arm/mach-omap2/am33xx/board.c                      | 1 +
 arch/arm/mach-omap2/boot-common.c                       | 1 +
 arch/arm/mach-omap2/hwinit-common.c                     | 1 +
 arch/arm/mach-omap2/omap-cache.c                        | 1 +
 arch/arm/mach-omap2/omap3/am35x_musb.c                  | 1 +
 arch/arm/mach-omap2/omap3/emif4.c                       | 1 +
 arch/arm/mach-omap2/omap3/sdrc.c                        | 1 +
 arch/arm/mach-omap2/timer.c                             | 1 +
 arch/arm/mach-orion5x/dram.c                            | 1 +
 arch/arm/mach-orion5x/timer.c                           | 1 +
 arch/arm/mach-owl/soc.c                                 | 1 +
 arch/arm/mach-rmobile/memmap-gen3.c                     | 1 +
 arch/arm/mach-rockchip/board.c                          | 1 +
 arch/arm/mach-rockchip/rk3036-board-spl.c               | 1 +
 arch/arm/mach-rockchip/rk3036/rk3036.c                  | 1 +
 arch/arm/mach-rockchip/rk3128/rk3128.c                  | 1 +
 arch/arm/mach-rockchip/rk3188/rk3188.c                  | 1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c                  | 1 +
 arch/arm/mach-rockchip/rk3308/rk3308.c                  | 1 +
 arch/arm/mach-rockchip/rk3328/rk3328.c                  | 1 +
 arch/arm/mach-rockchip/rk3368/rk3368.c                  | 1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c                  | 1 +
 arch/arm/mach-rockchip/sdram.c                          | 1 +
 arch/arm/mach-rockchip/spl-boot-order.c                 | 1 +
 arch/arm/mach-rockchip/spl.c                            | 1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.h           | 2 +-
 arch/arm/mach-socfpga/board.c                           | 1 +
 arch/arm/mach-socfpga/clock_manager.c                   | 1 +
 arch/arm/mach-socfpga/clock_manager_agilex.c            | 1 +
 arch/arm/mach-socfpga/clock_manager_s10.c               | 1 +
 arch/arm/mach-socfpga/mailbox_s10.c                     | 1 +
 arch/arm/mach-socfpga/misc.c                            | 1 +
 arch/arm/mach-socfpga/misc_gen5.c                       | 1 +
 arch/arm/mach-socfpga/misc_s10.c                        | 1 +
 arch/arm/mach-socfpga/mmu-arm64_s10.c                   | 1 +
 arch/arm/mach-socfpga/reset_manager_arria10.c           | 1 +
 arch/arm/mach-socfpga/reset_manager_s10.c               | 1 +
 arch/arm/mach-socfpga/spl_a10.c                         | 1 +
 arch/arm/mach-socfpga/spl_agilex.c                      | 1 +
 arch/arm/mach-socfpga/spl_gen5.c                        | 1 +
 arch/arm/mach-socfpga/spl_s10.c                         | 1 +
 arch/arm/mach-socfpga/system_manager_s10.c              | 1 +
 arch/arm/mach-stm32mp/boot_params.c                     | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c         | 1 +
 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c  | 1 +
 arch/arm/mach-stm32mp/cpu.c                             | 1 +
 arch/arm/mach-stm32mp/dram_init.c                       | 1 +
 arch/arm/mach-stm32mp/fdt.c                             | 1 +
 arch/arm/mach-stm32mp/spl.c                             | 1 +
 arch/arm/mach-tegra/board.c                             | 1 +
 arch/arm/mach-tegra/board2.c                            | 1 +
 arch/arm/mach-tegra/cboot.c                             | 1 +
 arch/arm/mach-tegra/emc.c                               | 1 +
 arch/arm/mach-tegra/pmc.c                               | 1 +
 arch/arm/mach-tegra/tegra124/xusb-padctl.c              | 1 +
 arch/arm/mach-tegra/tegra20/warmboot.c                  | 1 +
 arch/arm/mach-tegra/tegra210/xusb-padctl.c              | 1 +
 arch/arm/mach-uniphier/board_late_init.c                | 1 +
 arch/arm/mach-versal/clk.c                              | 1 +
 arch/arm/mach-versal/cpu.c                              | 1 +
 arch/arm/mach-versal/mp.c                               | 1 +
 arch/arm/mach-zynq/clk.c                                | 1 +
 arch/arm/mach-zynq/timer.c                              | 1 +
 arch/arm/mach-zynqmp-r5/cpu.c                           | 1 +
 arch/arm/mach-zynqmp/clk.c                              | 1 +
 arch/arm/mach-zynqmp/cpu.c                              | 1 +
 arch/m68k/cpu/mcf5227x/cpu.c                            | 1 +
 arch/m68k/cpu/mcf5227x/speed.c                          | 1 +
 arch/m68k/cpu/mcf523x/cpu.c                             | 1 +
 arch/m68k/cpu/mcf523x/speed.c                           | 1 +
 arch/m68k/cpu/mcf52x2/cpu.c                             | 1 +
 arch/m68k/cpu/mcf52x2/speed.c                           | 1 +
 arch/m68k/cpu/mcf530x/speed.c                           | 1 +
 arch/m68k/cpu/mcf532x/cpu.c                             | 1 +
 arch/m68k/cpu/mcf532x/speed.c                           | 1 +
 arch/m68k/cpu/mcf5445x/cpu.c                            | 1 +
 arch/m68k/cpu/mcf5445x/speed.c                          | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu.c                          | 1 +
 arch/m68k/cpu/mcf547x_8x/slicetimer.c                   | 1 +
 arch/m68k/cpu/mcf547x_8x/speed.c                        | 1 +
 arch/m68k/include/asm/immap.h                           | 1 +
 arch/m68k/lib/bdinfo.c                                  | 1 +
 arch/m68k/lib/bootm.c                                   | 1 +
 arch/m68k/lib/fec.c                                     | 1 +
 arch/m68k/lib/time.c                                    | 1 +
 arch/microblaze/cpu/interrupts.c                        | 1 +
 arch/microblaze/cpu/timer.c                             | 1 +
 arch/microblaze/lib/bootm.c                             | 1 +
 arch/mips/include/asm/io.h                              | 1 +
 arch/mips/lib/boot.c                                    | 1 +
 arch/mips/lib/bootm.c                                   | 1 +
 arch/mips/lib/cache.c                                   | 1 +
 arch/mips/lib/reloc.c                                   | 1 +
 arch/mips/lib/stack.c                                   | 1 +
 arch/mips/lib/traps.c                                   | 1 +
 arch/mips/mach-ath79/ar933x/clk.c                       | 1 +
 arch/mips/mach-ath79/ar934x/clk.c                       | 1 +
 arch/mips/mach-ath79/ar934x/ddr.c                       | 1 +
 arch/mips/mach-ath79/cpu.c                              | 1 +
 arch/mips/mach-ath79/dram.c                             | 1 +
 arch/mips/mach-ath79/include/mach/ath79.h               | 1 +
 arch/mips/mach-ath79/qca953x/clk.c                      | 1 +
 arch/mips/mach-ath79/qca956x/clk.c                      | 1 +
 arch/mips/mach-ath79/qca956x/ddr.c                      | 1 +
 arch/mips/mach-bmips/dram.c                             | 1 +
 arch/mips/mach-jz47xx/jz4780/jz4780.c                   | 1 +
 arch/mips/mach-mscc/cpu.c                               | 1 +
 arch/mips/mach-mscc/dram.c                              | 1 +
 arch/mips/mach-mtmips/cpu.c                             | 1 +
 arch/mips/mach-mtmips/ddr_cal.c                         | 1 +
 arch/mips/mach-mtmips/mt7628/ddr.c                      | 1 +
 arch/mips/mach-mtmips/mt7628/init.c                     | 1 +
 arch/mips/mach-mtmips/spl.c                             | 2 +-
 arch/mips/mach-pic32/cpu.c                              | 1 +
 arch/nds32/lib/bootm.c                                  | 1 +
 arch/nios2/cpu/cpu.c                                    | 1 +
 arch/nios2/include/asm/io.h                             | 3 +++
 arch/nios2/lib/cache.c                                  | 1 +
 arch/powerpc/cpu/mpc83xx/cpu.c                          | 1 +
 arch/powerpc/cpu/mpc83xx/cpu_init.c                     | 1 +
 arch/powerpc/cpu/mpc83xx/fdt.c                          | 1 +
 arch/powerpc/cpu/mpc83xx/interrupts.c                   | 1 +
 arch/powerpc/cpu/mpc83xx/pci.c                          | 1 +
 arch/powerpc/cpu/mpc83xx/pcie.c                         | 1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c                    | 1 +
 arch/powerpc/cpu/mpc83xx/speed.c                        | 1 +
 arch/powerpc/cpu/mpc83xx/spl_minimal.c                  | 1 +
 arch/powerpc/cpu/mpc83xx/traps.c                        | 1 +
 arch/powerpc/cpu/mpc85xx/commproc.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                          | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c               | 1 +
 arch/powerpc/cpu/mpc85xx/fdt.c                          | 1 +
 arch/powerpc/cpu/mpc85xx/mp.c                           | 1 +
 arch/powerpc/cpu/mpc85xx/serial_scc.c                   | 1 +
 arch/powerpc/cpu/mpc85xx/speed.c                        | 1 +
 arch/powerpc/cpu/mpc85xx/tlb.c                          | 1 +
 arch/powerpc/cpu/mpc85xx/traps.c                        | 1 +
 arch/powerpc/cpu/mpc86xx/cpu.c                          | 1 +
 arch/powerpc/cpu/mpc86xx/cpu_init.c                     | 1 +
 arch/powerpc/cpu/mpc86xx/mp.c                           | 1 +
 arch/powerpc/cpu/mpc86xx/speed.c                        | 1 +
 arch/powerpc/cpu/mpc86xx/traps.c                        | 1 +
 arch/powerpc/cpu/mpc8xx/cpu.c                           | 1 +
 arch/powerpc/cpu/mpc8xx/fdt.c                           | 1 +
 arch/powerpc/cpu/mpc8xx/immap.c                         | 1 +
 arch/powerpc/cpu/mpc8xx/speed.c                         | 1 +
 arch/powerpc/cpu/mpc8xxx/cpu.c                          | 1 +
 arch/powerpc/cpu/mpc8xxx/law.c                          | 1 +
 arch/powerpc/cpu/mpc8xxx/pamu_table.c                   | 1 +
 arch/powerpc/lib/bat_rw.c                               | 1 +
 arch/powerpc/lib/bdinfo.c                               | 1 +
 arch/powerpc/lib/bootm.c                                | 1 +
 arch/powerpc/lib/stack.c                                | 1 +
 arch/riscv/cpu/fu540/cache.c                            | 1 +
 arch/riscv/cpu/fu540/dram.c                             | 1 +
 arch/riscv/cpu/generic/dram.c                           | 1 +
 arch/riscv/lib/andes_plic.c                             | 1 +
 arch/riscv/lib/andes_plmt.c                             | 1 +
 arch/riscv/lib/asm-offsets.c                            | 1 +
 arch/riscv/lib/bootm.c                                  | 1 +
 arch/riscv/lib/fdt_fixup.c                              | 1 +
 arch/riscv/lib/image.c                                  | 1 +
 arch/riscv/lib/sifive_clint.c                           | 1 +
 arch/riscv/lib/smp.c                                    | 1 +
 arch/riscv/lib/spl.c                                    | 1 +
 arch/sandbox/cpu/cpu.c                                  | 1 +
 arch/sandbox/cpu/spl.c                                  | 1 +
 arch/sandbox/cpu/start.c                                | 1 +
 arch/sh/lib/board.c                                     | 1 +
 arch/x86/cpu/apollolake/cpu_spl.c                       | 1 +
 arch/x86/cpu/apollolake/fsp_s.c                         | 1 +
 arch/x86/cpu/baytrail/fsp_configs.c                     | 1 +
 arch/x86/cpu/braswell/fsp_configs.c                     | 1 +
 arch/x86/cpu/broadwell/cpu.c                            | 1 +
 arch/x86/cpu/broadwell/cpu_from_spl.c                   | 1 +
 arch/x86/cpu/broadwell/cpu_full.c                       | 1 +
 arch/x86/cpu/broadwell/lpc.c                            | 1 +
 arch/x86/cpu/broadwell/northbridge.c                    | 1 +
 arch/x86/cpu/broadwell/pch.c                            | 1 +
 arch/x86/cpu/broadwell/pinctrl_broadwell.c              | 1 +
 arch/x86/cpu/broadwell/sata.c                           | 1 +
 arch/x86/cpu/broadwell/sdram.c                          | 1 +
 arch/x86/cpu/coreboot/coreboot.c                        | 1 +
 arch/x86/cpu/coreboot/sdram.c                           | 1 +
 arch/x86/cpu/coreboot/tables.c                          | 1 +
 arch/x86/cpu/cpu.c                                      | 1 +
 arch/x86/cpu/cpu_x86.c                                  | 1 +
 arch/x86/cpu/efi/payload.c                              | 1 +
 arch/x86/cpu/efi/sdram.c                                | 1 +
 arch/x86/cpu/i386/cpu.c                                 | 1 +
 arch/x86/cpu/i386/interrupt.c                           | 1 +
 arch/x86/cpu/intel_common/cpu.c                         | 1 +
 arch/x86/cpu/intel_common/cpu_from_spl.c                | 1 +
 arch/x86/cpu/intel_common/itss.c                        | 1 +
 arch/x86/cpu/intel_common/lpc.c                         | 1 +
 arch/x86/cpu/intel_common/microcode.c                   | 1 +
 arch/x86/cpu/intel_common/mrc.c                         | 1 +
 arch/x86/cpu/irq.c                                      | 1 +
 arch/x86/cpu/ivybridge/bd82x6x.c                        | 1 +
 arch/x86/cpu/ivybridge/cpu.c                            | 1 +
 arch/x86/cpu/ivybridge/fsp_configs.c                    | 1 +
 arch/x86/cpu/ivybridge/lpc.c                            | 1 +
 arch/x86/cpu/ivybridge/model_206ax.c                    | 1 +
 arch/x86/cpu/ivybridge/northbridge.c                    | 1 +
 arch/x86/cpu/ivybridge/sata.c                           | 1 +
 arch/x86/cpu/ivybridge/sdram_nop.c                      | 1 +
 arch/x86/cpu/mp_init.c                                  | 1 +
 arch/x86/cpu/mtrr.c                                     | 1 +
 arch/x86/cpu/qemu/dram.c                                | 1 +
 arch/x86/cpu/qemu/e820.c                                | 1 +
 arch/x86/cpu/quark/acpi.c                               | 1 +
 arch/x86/cpu/quark/dram.c                               | 1 +
 arch/x86/cpu/slimbootloader/sdram.c                     | 1 +
 arch/x86/cpu/slimbootloader/serial.c                    | 1 +
 arch/x86/cpu/slimbootloader/slimbootloader.c            | 1 +
 arch/x86/cpu/turbo.c                                    | 1 +
 arch/x86/cpu/x86_64/cpu.c                               | 1 +
 arch/x86/include/asm/cpu_common.h                       | 1 +
 arch/x86/include/asm/fast_spi.h                         | 4 +++-
 arch/x86/include/asm/io.h                               | 2 +-
 arch/x86/include/asm/mp.h                               | 2 ++
 arch/x86/lib/acpi_s3.c                                  | 1 +
 arch/x86/lib/acpi_table.c                               | 1 +
 arch/x86/lib/asm-offsets.c                              | 1 +
 arch/x86/lib/bios.c                                     | 1 +
 arch/x86/lib/bootm.c                                    | 1 +
 arch/x86/lib/cmd_boot.c                                 | 1 +
 arch/x86/lib/coreboot_table.c                           | 1 +
 arch/x86/lib/e820.c                                     | 1 +
 arch/x86/lib/fsp/fsp_common.c                           | 1 +
 arch/x86/lib/fsp/fsp_dram.c                             | 1 +
 arch/x86/lib/fsp/fsp_graphics.c                         | 1 +
 arch/x86/lib/fsp1/fsp_common.c                          | 1 +
 arch/x86/lib/fsp1/fsp_dram.c                            | 1 +
 arch/x86/lib/fsp2/fsp_dram.c                            | 1 +
 arch/x86/lib/fsp2/fsp_meminit.c                         | 1 +
 arch/x86/lib/fsp2/fsp_silicon_init.c                    | 1 +
 arch/x86/lib/fsp2/fsp_support.c                         | 1 +
 arch/x86/lib/init_helpers.c                             | 1 +
 arch/x86/lib/mpspec.c                                   | 1 +
 arch/x86/lib/mrccache.c                                 | 1 +
 arch/x86/lib/physmem.c                                  | 1 +
 arch/x86/lib/pinctrl_ich6.c                             | 1 +
 arch/x86/lib/pirq_routing.c                             | 1 +
 arch/x86/lib/relocate.c                                 | 1 +
 arch/x86/lib/spl.c                                      | 1 +
 arch/x86/lib/tables.c                                   | 1 +
 arch/x86/lib/tpl.c                                      | 1 +
 arch/xtensa/lib/bootm.c                                 | 1 +
 board/AndesTech/adp-ae3xx/adp-ae3xx.c                   | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c                 | 1 +
 board/AndesTech/ax25-ae350/ax25-ae350.c                 | 1 +
 board/Arcturus/ucp1020/spl.c                            | 1 +
 board/BuR/brppt1/board.c                                | 1 +
 board/BuR/brppt2/board.c                                | 1 +
 board/BuR/brsmarc1/board.c                              | 1 +
 board/BuR/brxre1/board.c                                | 1 +
 board/BuR/common/common.c                               | 1 +
 board/BuS/eb_cpu5282/eb_cpu5282.c                       | 1 +
 board/CZ.NIC/turris_mox/turris_mox.c                    | 1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c                | 1 +
 board/CarMediaLab/flea3/flea3.c                         | 1 +
 board/LaCie/edminiv2/edminiv2.c                         | 1 +
 board/LaCie/net2big_v2/net2big_v2.c                     | 1 +
 board/LaCie/netspace_v2/netspace_v2.c                   | 1 +
 board/Marvell/aspenite/aspenite.c                       | 1 +
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c             | 1 +
 board/Marvell/db-88f6720/db-88f6720.c                   | 1 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c           | 1 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c             | 1 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c             | 1 +
 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c             | 1 +
 board/Marvell/dreamplug/dreamplug.c                     | 1 +
 board/Marvell/gplugd/gplugd.c                           | 1 +
 board/Marvell/guruplug/guruplug.c                       | 1 +
 board/Marvell/mvebu_armada-37xx/board.c                 | 1 +
 board/Marvell/mvebu_armada-8k/board.c                   | 1 +
 board/Marvell/openrd/openrd.c                           | 1 +
 board/Marvell/sheevaplug/sheevaplug.c                   | 1 +
 board/Seagate/dockstar/dockstar.c                       | 1 +
 board/Seagate/goflexhome/goflexhome.c                   | 1 +
 board/Seagate/nas220/nas220.c                           | 1 +
 board/Synology/ds109/ds109.c                            | 1 +
 board/Synology/ds414/ds414.c                            | 1 +
 board/advantech/dms-ba16/dms-ba16.c                     | 1 +
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c   | 1 +
 board/advantech/imx8qm_rom7720_a1/spl.c                 | 1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c             | 1 +
 board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c         | 1 +
 board/alliedtelesis/common/gpio_hog.c                   | 1 +
 board/alliedtelesis/x530/x530.c                         | 1 +
 board/amazon/kc1/kc1.c                                  | 1 +
 board/aristainetos/aristainetos.c                       | 1 +
 board/armadeus/apf27/apf27.c                            | 1 +
 board/armltd/integrator/integrator.c                    | 1 +
 board/armltd/vexpress/vexpress_common.c                 | 1 +
 board/armltd/vexpress64/vexpress64.c                    | 1 +
 board/astro/mcf5373l/mcf5373l.c                         | 1 +
 board/atmark-techno/armadillo-800eva/armadillo-800eva.c | 1 +
 board/atmel/at91rm9200ek/at91rm9200ek.c                 | 1 +
 board/atmel/at91sam9260ek/at91sam9260ek.c               | 1 +
 board/atmel/at91sam9261ek/at91sam9261ek.c               | 1 +
 board/atmel/at91sam9263ek/at91sam9263ek.c               | 1 +
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c         | 1 +
 board/atmel/at91sam9n12ek/at91sam9n12ek.c               | 1 +
 board/atmel/at91sam9rlek/at91sam9rlek.c                 | 1 +
 board/atmel/at91sam9x5ek/at91sam9x5ek.c                 | 1 +
 board/atmel/common/video_display.c                      | 1 +
 board/atmel/sam9x60ek/sam9x60ek.c                       | 1 +
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c         | 1 +
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c     | 1 +
 board/atmel/sama5d2_icp/sama5d2_icp.c                   | 1 +
 board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c             | 1 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c         | 1 +
 board/atmel/sama5d3_xplained/sama5d3_xplained.c         | 1 +
 board/atmel/sama5d3xek/sama5d3xek.c                     | 1 +
 board/atmel/sama5d4_xplained/sama5d4_xplained.c         | 1 +
 board/atmel/sama5d4ek/sama5d4ek.c                       | 1 +
 board/bachmann/ot1200/ot1200.c                          | 1 +
 board/barco/platinum/platinum.c                         | 1 +
 board/barco/titanium/titanium.c                         | 1 +
 board/beacon/beacon-rzg2m/beacon-rzg2m.c                | 1 +
 board/beacon/imx8mm/imx8mm_beacon.c                     | 1 +
 board/beacon/imx8mm/spl.c                               | 1 +
 board/beckhoff/mx53cx9020/mx53cx9020.c                  | 1 +
 board/bluegiga/apx4devkit/apx4devkit.c                  | 1 +
 board/bluewater/gurnard/gurnard.c                       | 1 +
 board/bluewater/snapper9260/snapper9260.c               | 1 +
 board/bosch/guardian/board.c                            | 1 +
 board/bosch/shc/board.c                                 | 1 +
 board/boundary/nitrogen6x/nitrogen6x.c                  | 1 +
 board/broadcom/bcm23550_w1d/bcm23550_w1d.c              | 1 +
 board/broadcom/bcm28155_ap/bcm28155_ap.c                | 1 +
 board/broadcom/bcm_ep/board.c                           | 1 +
 board/broadcom/bcmns2/northstar2.c                      | 1 +
 board/broadcom/bcmns3/ns3.c                             | 1 +
 board/broadcom/bcmstb/bcmstb.c                          | 1 +
 board/bticino/mamoj/mamoj.c                             | 1 +
 board/bticino/mamoj/spl.c                               | 1 +
 board/buffalo/lsxl/lsxl.c                               | 1 +
 board/calao/usb_a9263/usb_a9263.c                       | 1 +
 board/cavium/thunderx/thunderx.c                        | 1 +
 board/ccv/xpress/xpress.c                               | 1 +
 board/cirrus/edb93xx/edb93xx.c                          | 1 +
 board/cloudengines/pogo_e02/pogo_e02.c                  | 1 +
 board/cobra5272/cobra5272.c                             | 1 +
 board/compulab/cl-som-imx7/cl-som-imx7.c                | 1 +
 board/compulab/cm_fx6/cm_fx6.c                          | 1 +
 board/compulab/cm_t335/cm_t335.c                        | 1 +
 board/compulab/cm_t43/cm_t43.c                          | 1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c                | 1 +
 board/corscience/tricorder/tricorder.c                  | 1 +
 board/cortina/presidio-asic/presidio.c                  | 1 +
 board/creative/xfi3/xfi3.c                              | 1 +
 board/cssi/MCR3000/MCR3000.c                            | 1 +
 board/d-link/dns325/dns325.c                            | 1 +
 board/davinci/da8xxevm/da850evm.c                       | 1 +
 board/davinci/da8xxevm/omapl138_lcdk.c                  | 1 +
 board/dhelectronics/dh_imx6/dh_imx6.c                   | 1 +
 board/dhelectronics/dh_stm32mp1/board.c                 | 1 +
 board/ea/mx7ulp_com/mx7ulp_com.c                        | 1 +
 board/eets/pdu001/board.c                               | 1 +
 board/egnite/ethernut5/ethernut5.c                      | 1 +
 board/el/el6x/el6x.c                                    | 1 +
 board/elgin/elgin_rv1108/elgin_rv1108.c                 | 1 +
 board/embest/mx6boards/mx6boards.c                      | 1 +
 board/engicam/common/board.c                            | 1 +
 board/esd/meesc/meesc.c                                 | 1 +
 board/esd/vme8349/vme8349.c                             | 1 +
 board/firefly/firefly-rk3288/firefly-rk3288.c           | 1 +
 board/freescale/common/arm_sleep.c                      | 1 +
 board/freescale/common/emc2305.c                        | 1 +
 board/freescale/common/mpc85xx_sleep.c                  | 1 +
 board/freescale/corenet_ds/corenet_ds.c                 | 1 +
 board/freescale/corenet_ds/ddr.c                        | 1 +
 board/freescale/imx8mm_evk/imx8mm_evk.c                 | 1 +
 board/freescale/imx8mm_evk/spl.c                        | 1 +
 board/freescale/imx8mn_evk/imx8mn_evk.c                 | 1 +
 board/freescale/imx8mn_evk/spl.c                        | 1 +
 board/freescale/imx8mp_evk/imx8mp_evk.c                 | 1 +
 board/freescale/imx8mp_evk/spl.c                        | 1 +
 board/freescale/imx8mq_evk/imx8mq_evk.c                 | 1 +
 board/freescale/imx8mq_evk/spl.c                        | 1 +
 board/freescale/imx8qm_mek/imx8qm_mek.c                 | 1 +
 board/freescale/imx8qm_mek/spl.c                        | 1 +
 board/freescale/imx8qxp_mek/imx8qxp_mek.c               | 1 +
 board/freescale/imx8qxp_mek/spl.c                       | 1 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c           | 1 +
 board/freescale/imxrt1050-evk/imxrt1050-evk.c           | 1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c               | 1 +
 board/freescale/ls1012aqds/ls1012aqds.c                 | 1 +
 board/freescale/ls1012ardb/ls1012ardb.c                 | 1 +
 board/freescale/ls1021aiot/dcu.c                        | 1 +
 board/freescale/ls1021aiot/ls1021aiot.c                 | 1 +
 board/freescale/ls1021aqds/dcu.c                        | 1 +
 board/freescale/ls1021aqds/ddr.c                        | 1 +
 board/freescale/ls1021atsn/ls1021atsn.c                 | 1 +
 board/freescale/ls1021atwr/dcu.c                        | 1 +
 board/freescale/ls1021atwr/ls1021atwr.c                 | 1 +
 board/freescale/ls1028a/ddr.c                           | 1 +
 board/freescale/ls1028a/ls1028a.c                       | 1 +
 board/freescale/ls1043aqds/ddr.c                        | 1 +
 board/freescale/ls1043aqds/ls1043aqds.c                 | 1 +
 board/freescale/ls1043ardb/ddr.c                        | 1 +
 board/freescale/ls1043ardb/ls1043ardb.c                 | 1 +
 board/freescale/ls1046afrwy/ddr.c                       | 1 +
 board/freescale/ls1046afrwy/ls1046afrwy.c               | 1 +
 board/freescale/ls1046aqds/ddr.c                        | 1 +
 board/freescale/ls1046aqds/ls1046aqds.c                 | 1 +
 board/freescale/ls1046ardb/ddr.c                        | 1 +
 board/freescale/ls1046ardb/ls1046ardb.c                 | 1 +
 board/freescale/ls1088a/ddr.c                           | 1 +
 board/freescale/ls1088a/ls1088a.c                       | 1 +
 board/freescale/ls2080a/ddr.c                           | 1 +
 board/freescale/ls2080a/ls2080a.c                       | 1 +
 board/freescale/ls2080aqds/ddr.c                        | 1 +
 board/freescale/ls2080aqds/ls2080aqds.c                 | 1 +
 board/freescale/ls2080ardb/ddr.c                        | 1 +
 board/freescale/ls2080ardb/eth_ls2080rdb.c              | 1 +
 board/freescale/ls2080ardb/ls2080ardb.c                 | 1 +
 board/freescale/lx2160a/ddr.c                           | 1 +
 board/freescale/lx2160a/eth_lx2160aqds.c                | 1 +
 board/freescale/lx2160a/eth_lx2160ardb.c                | 1 +
 board/freescale/lx2160a/lx2160a.c                       | 1 +
 board/freescale/m5208evbe/m5208evbe.c                   | 1 +
 board/freescale/m52277evb/m52277evb.c                   | 1 +
 board/freescale/m5235evb/m5235evb.c                     | 1 +
 board/freescale/m5249evb/m5249evb.c                     | 1 +
 board/freescale/m5253demo/m5253demo.c                   | 1 +
 board/freescale/m5272c3/m5272c3.c                       | 1 +
 board/freescale/m5275evb/m5275evb.c                     | 1 +
 board/freescale/m5282evb/m5282evb.c                     | 1 +
 board/freescale/m53017evb/m53017evb.c                   | 1 +
 board/freescale/m5329evb/m5329evb.c                     | 1 +
 board/freescale/m5373evb/m5373evb.c                     | 1 +
 board/freescale/m54418twr/m54418twr.c                   | 1 +
 board/freescale/m54451evb/m54451evb.c                   | 1 +
 board/freescale/m54455evb/m54455evb.c                   | 1 +
 board/freescale/m547xevb/m547xevb.c                     | 1 +
 board/freescale/m548xevb/m548xevb.c                     | 1 +
 board/freescale/mpc8308rdb/sdram.c                      | 1 +
 board/freescale/mpc8313erdb/mpc8313erdb.c               | 1 +
 board/freescale/mpc8313erdb/sdram.c                     | 1 +
 board/freescale/mpc8315erdb/mpc8315erdb.c               | 1 +
 board/freescale/mpc8315erdb/sdram.c                     | 1 +
 board/freescale/mpc8323erdb/mpc8323erdb.c               | 1 +
 board/freescale/mpc832xemds/mpc832xemds.c               | 1 +
 board/freescale/mpc8349emds/mpc8349emds.c               | 1 +
 board/freescale/mpc8349itx/mpc8349itx.c                 | 1 +
 board/freescale/mpc837xemds/mpc837xemds.c               | 1 +
 board/freescale/mpc837xerdb/mpc837xerdb.c               | 1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c               | 1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c               | 1 +
 board/freescale/mx23evk/mx23evk.c                       | 1 +
 board/freescale/mx25pdk/mx25pdk.c                       | 1 +
 board/freescale/mx28evk/mx28evk.c                       | 1 +
 board/freescale/mx35pdk/mx35pdk.c                       | 1 +
 board/freescale/mx51evk/mx51evk.c                       | 1 +
 board/freescale/mx53ard/mx53ard.c                       | 1 +
 board/freescale/mx53evk/mx53evk.c                       | 1 +
 board/freescale/mx53loco/mx53loco.c                     | 1 +
 board/freescale/mx53smd/mx53smd.c                       | 1 +
 board/freescale/mx6memcal/mx6memcal.c                   | 1 +
 board/freescale/mx6memcal/spl.c                         | 1 +
 board/freescale/mx6qarm2/mx6qarm2.c                     | 1 +
 board/freescale/mx6sabreauto/mx6sabreauto.c             | 1 +
 board/freescale/mx6sabresd/mx6sabresd.c                 | 1 +
 board/freescale/mx6slevk/mx6slevk.c                     | 1 +
 board/freescale/mx6sllevk/mx6sllevk.c                   | 1 +
 board/freescale/mx6sxsabreauto/mx6sxsabreauto.c         | 1 +
 board/freescale/mx6sxsabresd/mx6sxsabresd.c             | 1 +
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c       | 1 +
 board/freescale/mx6ullevk/mx6ullevk.c                   | 1 +
 board/freescale/mx7dsabresd/mx7dsabresd.c               | 1 +
 board/freescale/mx7ulp_evk/mx7ulp_evk.c                 | 1 +
 board/freescale/p1010rdb/ddr.c                          | 1 +
 board/freescale/p1010rdb/p1010rdb.c                     | 1 +
 board/freescale/p1010rdb/spl.c                          | 1 +
 board/freescale/p1023rdb/p1023rdb.c                     | 1 +
 board/freescale/p1_p2_rdb_pc/spl.c                      | 1 +
 board/freescale/p2041rdb/ddr.c                          | 1 +
 board/freescale/p2041rdb/p2041rdb.c                     | 1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c             | 1 +
 board/freescale/s32v234evb/s32v234evb.c                 | 1 +
 board/freescale/t102xrdb/ddr.c                          | 1 +
 board/freescale/t102xrdb/spl.c                          | 1 +
 board/freescale/t102xrdb/t102xrdb.c                     | 1 +
 board/freescale/t104xrdb/ddr.c                          | 1 +
 board/freescale/t104xrdb/spl.c                          | 1 +
 board/freescale/t104xrdb/t104xrdb.c                     | 1 +
 board/freescale/t208xqds/ddr.c                          | 1 +
 board/freescale/t208xqds/spl.c                          | 1 +
 board/freescale/t208xqds/t208xqds.c                     | 1 +
 board/freescale/t208xrdb/ddr.c                          | 1 +
 board/freescale/t208xrdb/spl.c                          | 1 +
 board/freescale/t208xrdb/t208xrdb.c                     | 1 +
 board/freescale/t4rdb/ddr.c                             | 1 +
 board/freescale/t4rdb/spl.c                             | 1 +
 board/freescale/t4rdb/t4240rdb.c                        | 1 +
 board/freescale/vf610twr/vf610twr.c                     | 1 +
 board/friendlyarm/nanopi2/board.c                       | 1 +
 board/gardena/smart-gateway-at91sam/board.c             | 1 +
 board/gateworks/gw_ventana/gw_ventana.c                 | 1 +
 board/gdsys/a38x/controlcenterdc.c                      | 1 +
 board/gdsys/a38x/hydra.c                                | 1 +
 board/gdsys/mpc8308/gazerbeam.c                         | 1 +
 board/gdsys/mpc8308/sdram.c                             | 1 +
 board/ge/bx50v3/bx50v3.c                                | 1 +
 board/ge/mx53ppd/mx53ppd.c                              | 1 +
 board/google/imx8mq_phanbell/imx8mq_phanbell.c          | 1 +
 board/google/imx8mq_phanbell/spl.c                      | 1 +
 board/google/veyron/veyron.c                            | 1 +
 board/grinn/chiliboard/board.c                          | 1 +
 board/grinn/liteboard/board.c                           | 1 +
 board/highbank/highbank.c                               | 1 +
 board/hisilicon/hikey/hikey.c                           | 1 +
 board/hisilicon/hikey960/hikey960.c                     | 1 +
 board/hisilicon/poplar/poplar.c                         | 1 +
 board/ids/ids8313/ids8313.c                             | 1 +
 board/imgtec/boston/ddr.c                               | 1 +
 board/imgtec/boston/dt.c                                | 1 +
 board/imgtec/ci20/ci20.c                                | 1 +
 board/imgtec/malta/malta.c                              | 1 +
 board/imgtec/xilfpga/xilfpga.c                          | 1 +
 board/inversepath/usbarmory/usbarmory.c                 | 1 +
 board/iomega/iconnect/iconnect.c                        | 1 +
 board/isee/igep003x/board.c                             | 1 +
 board/isee/igep00x0/common.c                            | 1 +
 board/k+p/kp_imx53/kp_imx53.c                           | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c                   | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c               | 1 +
 board/keymile/common/common.c                           | 1 +
 board/keymile/km83xx/km83xx.c                           | 1 +
 board/keymile/km_arm/km_arm.c                           | 1 +
 board/keymile/kmp204x/ddr.c                             | 1 +
 board/kmc/kzm9g/kzm9g.c                                 | 1 +
 board/kobol/helios4/helios4.c                           | 1 +
 board/kosagi/novena/novena.c                            | 1 +
 board/l+g/vinco/vinco.c                                 | 1 +
 board/laird/wb45n/wb45n.c                               | 1 +
 board/laird/wb50n/wb50n.c                               | 1 +
 board/lego/ev3/legoev3.c                                | 1 +
 board/lg/sniper/sniper.c                                | 1 +
 board/liebherr/display5/display5.c                      | 1 +
 board/liebherr/display5/spl.c                           | 1 +
 board/liebherr/mccmon6/mccmon6.c                        | 1 +
 board/liebherr/xea/xea.c                                | 1 +
 board/logicpd/am3517evm/am3517evm.c                     | 1 +
 board/logicpd/imx6/imx6logic.c                          | 1 +
 board/logicpd/omap3som/omap3logic.c                     | 1 +
 board/maxbcm/maxbcm.c                                   | 1 +
 board/mediatek/mt7622/mt7622_rfb.c                      | 1 +
 board/mediatek/mt7623/mt7623_rfb.c                      | 1 +
 board/mediatek/mt7629/mt7629_rfb.c                      | 1 +
 board/mediatek/mt8512/mt8512.c                          | 1 +
 board/mediatek/mt8518/mt8518_ap1.c                      | 1 +
 board/menlo/m53menlo/m53menlo.c                         | 1 +
 board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c        | 1 +
 board/mini-box/picosam9g45/picosam9g45.c                | 1 +
 board/mpc8308_p1m/sdram.c                               | 1 +
 board/mscc/jr2/jr2.c                                    | 1 +
 board/mscc/luton/luton.c                                | 1 +
 board/mscc/ocelot/ocelot.c                              | 1 +
 board/mscc/serval/serval.c                              | 1 +
 board/mscc/servalt/servalt.c                            | 1 +
 board/nokia/rx51/rx51.c                                 | 1 +
 board/novtech/meerkat96/meerkat96.c                     | 1 +
 board/olimex/mx23_olinuxino/mx23_olinuxino.c            | 1 +
 board/phytec/pcl063/pcl063.c                            | 1 +
 board/phytec/pcm052/pcm052.c                            | 1 +
 board/phytec/pcm058/pcm058.c                            | 1 +
 board/phytec/pfla02/pfla02.c                            | 1 +
 board/phytec/phycore_am335x_r2/board.c                  | 1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c            | 1 +
 board/phytium/durian/durian.c                           | 1 +
 board/ppcag/bg0900/bg0900.c                             | 1 +
 board/qemu-mips/qemu-mips.c                             | 1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c        | 1 +
 board/qualcomm/dragonboard820c/dragonboard820c.c        | 1 +
 board/raidsonic/ib62x0/ib62x0.c                         | 1 +
 board/renesas/alt/alt.c                                 | 1 +
 board/renesas/blanche/blanche.c                         | 1 +
 board/renesas/condor/condor.c                           | 1 +
 board/renesas/draak/draak.c                             | 1 +
 board/renesas/eagle/eagle.c                             | 1 +
 board/renesas/ebisu/ebisu.c                             | 1 +
 board/renesas/gose/gose.c                               | 1 +
 board/renesas/grpeach/grpeach.c                         | 1 +
 board/renesas/koelsch/koelsch.c                         | 1 +
 board/renesas/lager/lager.c                             | 1 +
 board/renesas/porter/porter.c                           | 1 +
 board/renesas/rcar-common/common.c                      | 1 +
 board/renesas/salvator-x/salvator-x.c                   | 1 +
 board/renesas/silk/silk.c                               | 1 +
 board/renesas/stout/stout.c                             | 1 +
 board/renesas/ulcb/ulcb.c                               | 1 +
 board/rockchip/evb_rk3308/evb_rk3308.c                  | 1 +
 board/rockchip/evb_rv1108/evb_rv1108.c                  | 1 +
 board/ronetix/pm9261/pm9261.c                           | 1 +
 board/ronetix/pm9263/pm9263.c                           | 1 +
 board/ronetix/pm9g45/pm9g45.c                           | 1 +
 board/samsung/arndale/arndale.c                         | 1 +
 board/samsung/common/board.c                            | 1 +
 board/samsung/common/exynos5-dt-types.c                 | 1 +
 board/samsung/common/exynos5-dt.c                       | 1 +
 board/samsung/common/misc.c                             | 1 +
 board/samsung/goni/goni.c                               | 1 +
 board/samsung/odroid/odroid.c                           | 1 +
 board/samsung/smdkc100/smdkc100.c                       | 1 +
 board/samsung/smdkv310/smdkv310.c                       | 1 +
 board/samsung/universal_c210/universal.c                | 1 +
 board/sandbox/sandbox.c                                 | 1 +
 board/sandisk/sansa_fuze_plus/sfp.c                     | 1 +
 board/sbc8349/sbc8349.c                                 | 1 +
 board/sbc8641d/sbc8641d.c                               | 1 +
 board/schulercontrol/sc_sps_1/sc_sps_1.c                | 1 +
 board/seco/mx6quq7/mx6quq7.c                            | 1 +
 board/siemens/capricorn/spl.c                           | 1 +
 board/siemens/common/board.c                            | 1 +
 board/siemens/corvus/board.c                            | 1 +
 board/siemens/smartweb/smartweb.c                       | 1 +
 board/siemens/taurus/taurus.c                           | 1 +
 board/sks-kinkel/sksimx6/sksimx6.c                      | 1 +
 board/socrates/socrates.c                               | 1 +
 board/softing/vining_2000/vining_2000.c                 | 1 +
 board/softing/vining_fpga/socfpga.c                     | 1 +
 board/solidrun/clearfog/clearfog.c                      | 1 +
 board/solidrun/common/tlv_data.c                        | 1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c                    | 1 +
 board/somlabs/visionsom-6ull/visionsom-6ull.c           | 1 +
 board/st/common/stm32mp_mtdparts.c                      | 1 +
 board/st/stih410-b2260/board.c                          | 1 +
 board/st/stm32f429-discovery/stm32f429-discovery.c      | 1 +
 board/st/stm32f429-evaluation/stm32f429-evaluation.c    | 1 +
 board/st/stm32f469-discovery/stm32f469-discovery.c      | 1 +
 board/st/stm32f746-disco/stm32f746-disco.c              | 1 +
 board/st/stm32h743-disco/stm32h743-disco.c              | 1 +
 board/st/stm32h743-eval/stm32h743-eval.c                | 1 +
 board/st/stm32mp1/stm32mp1.c                            | 1 +
 board/st/stv0991/stv0991.c                              | 1 +
 board/ste/stemmy/stemmy.c                               | 1 +
 board/sunxi/board.c                                     | 1 +
 board/synopsys/axs10x/axs10x.c                          | 1 +
 board/synopsys/emsdp/emsdp.c                            | 1 +
 board/synopsys/hsdk/hsdk.c                              | 1 +
 board/synopsys/iot_devkit/iot_devkit.c                  | 1 +
 board/sysam/amcore/amcore.c                             | 1 +
 board/sysam/stmark2/stmark2.c                           | 1 +
 board/syteco/zmx25/zmx25.c                              | 1 +
 board/tbs/tbs2910/tbs2910.c                             | 2 ++
 board/tcl/sl50/board.c                                  | 1 +
 board/technexion/pico-imx6/pico-imx6.c                  | 3 ++-
 board/technexion/pico-imx6ul/pico-imx6ul.c              | 1 +
 board/technexion/pico-imx7d/pico-imx7d.c                | 1 +
 board/technexion/pico-imx8mq/pico-imx8mq.c              | 1 +
 board/technexion/pico-imx8mq/spl.c                      | 1 +
 board/technexion/tao3530/tao3530.c                      | 1 +
 board/technologic/ts4600/ts4600.c                       | 1 +
 board/technologic/ts4800/ts4800.c                       | 1 +
 board/theadorable/theadorable.c                         | 1 +
 board/ti/am335x/board.c                                 | 1 +
 board/ti/am3517crane/am3517crane.c                      | 1 +
 board/ti/am43xx/board.c                                 | 1 +
 board/ti/am57xx/board.c                                 | 1 +
 board/ti/am65x/evm.c                                    | 1 +
 board/ti/beagle/beagle.c                                | 1 +
 board/ti/dra7xx/evm.c                                   | 1 +
 board/ti/evm/evm.c                                      | 1 +
 board/ti/j721e/evm.c                                    | 1 +
 board/ti/ks2_evm/board.c                                | 1 +
 board/ti/omap5_uevm/evm.c                               | 1 +
 board/ti/panda/panda.c                                  | 1 +
 board/ti/sdp4430/sdp.c                                  | 1 +
 board/ti/ti816x/evm.c                                   | 1 +
 board/timll/devkit3250/devkit3250.c                     | 1 +
 board/timll/devkit8000/devkit8000.c                     | 1 +
 board/toradex/apalis-imx8/apalis-imx8.c                 | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c                 | 1 +
 board/toradex/apalis_t30/apalis_t30.c                   | 1 +
 board/toradex/colibri-imx6ull/colibri-imx6ull.c         | 1 +
 board/toradex/colibri-imx8x/colibri-imx8x.c             | 1 +
 board/toradex/colibri_imx6/colibri_imx6.c               | 1 +
 board/toradex/colibri_imx7/colibri_imx7.c               | 1 +
 board/toradex/colibri_pxa270/colibri_pxa270.c           | 1 +
 board/toradex/colibri_t20/colibri_t20.c                 | 1 +
 board/toradex/colibri_vf/colibri_vf.c                   | 1 +
 board/toradex/common/tdx-cfg-block.c                    | 1 +
 board/toradex/verdin-imx8mm/spl.c                       | 1 +
 board/toradex/verdin-imx8mm/verdin-imx8mm.c             | 1 +
 board/tqc/tqm834x/tqm834x.c                             | 1 +
 board/tqc/tqma6/tqma6.c                                 | 1 +
 board/udoo/neo/neo.c                                    | 1 +
 board/udoo/udoo.c                                       | 1 +
 board/variscite/dart_6ul/dart_6ul.c                     | 1 +
 board/varisys/cyrus/ddr.c                               | 1 +
 board/ve8313/ve8313.c                                   | 1 +
 board/vscom/baltos/board.c                              | 1 +
 board/wandboard/wandboard.c                             | 1 +
 board/warp/warp.c                                       | 1 +
 board/warp7/warp7.c                                     | 1 +
 board/work-microwave/work_92105/work_92105.c            | 1 +
 board/xes/xpedite517x/xpedite517x.c                     | 1 +
 board/xilinx/common/board.c                             | 1 +
 board/xilinx/microblaze-generic/microblaze-generic.c    | 1 +
 board/xilinx/versal/board.c                             | 1 +
 board/xilinx/zynq/board.c                               | 1 +
 board/xilinx/zynq/bootimg.c                             | 1 +
 board/xilinx/zynq/cmds.c                                | 1 +
 board/xilinx/zynqmp/zynqmp.c                            | 1 +
 board/zyxel/nsa310s/nsa310s.c                           | 1 +
 cmd/acpi.c                                              | 1 +
 cmd/bdinfo.c                                            | 1 +
 cmd/bedbug.c                                            | 1 +
 cmd/bootefi.c                                           | 1 +
 cmd/booti.c                                             | 1 +
 cmd/bootm.c                                             | 1 +
 cmd/date.c                                              | 1 +
 cmd/efi.c                                               | 1 +
 cmd/load.c                                              | 1 +
 cmd/log.c                                               | 1 +
 cmd/mem.c                                               | 1 +
 cmd/mtdparts.c                                          | 1 +
 cmd/nvedit.c                                            | 1 +
 cmd/pxe_utils.h                                         | 2 ++
 cmd/sb.c                                                | 1 +
 cmd/sound.c                                             | 1 +
 cmd/spl.c                                               | 1 +
 cmd/ti/ddr3.c                                           | 1 +
 cmd/tlv_eeprom.c                                        | 1 +
 cmd/x86/fsp.c                                           | 1 +
 cmd/x86/hob.c                                           | 1 +
 common/autoboot.c                                       | 1 +
 common/bloblist.c                                       | 1 +
 common/board_f.c                                        | 1 +
 common/board_info.c                                     | 1 +
 common/board_r.c                                        | 1 +
 common/bootm.c                                          | 1 +
 common/bootm_os.c                                       | 1 +
 common/bootstage.c                                      | 1 +
 common/cli.c                                            | 1 +
 common/cli_hush.c                                       | 1 +
 common/cli_readline.c                                   | 1 +
 common/command.c                                        | 1 +
 common/console.c                                        | 1 +
 common/dlmalloc.c                                       | 1 +
 common/exports.c                                        | 1 +
 common/hash.c                                           | 1 +
 common/hwconfig.c                                       | 1 +
 common/image-android.c                                  | 1 +
 common/image-cipher.c                                   | 1 +
 common/image-fdt.c                                      | 1 +
 common/image-fit-sig.c                                  | 1 +
 common/image-fit.c                                      | 1 +
 common/image-sig.c                                      | 1 +
 common/image.c                                          | 1 +
 common/init/board_init.c                                | 1 +
 common/init/handoff.c                                   | 1 +
 common/iotrace.c                                        | 1 +
 common/lcd.c                                            | 1 +
 common/lcd_simplefb.c                                   | 1 +
 common/log.c                                            | 1 +
 common/log_console.c                                    | 1 +
 common/log_syslog.c                                     | 1 +
 common/malloc_simple.c                                  | 1 +
 common/memsize.c                                        | 1 +
 common/spl/spl.c                                        | 1 +
 common/spl/spl_fit.c                                    | 1 +
 common/spl/spl_opensbi.c                                | 1 +
 common/spl/spl_spi.c                                    | 1 +
 common/splash_source.c                                  | 1 +
 common/stdio.c                                          | 1 +
 disk/part_efi.c                                         | 1 +
 drivers/ata/libata.c                                    | 2 ++
 drivers/ata/sata_mv.c                                   | 1 +
 drivers/bios_emulator/atibios.c                         | 1 +
 drivers/block/sandbox.c                                 | 1 +
 drivers/bootcount/bootcount_ram.c                       | 1 +
 drivers/cache/cache-v5l2.c                              | 1 +
 drivers/cache/sandbox_cache.c                           | 1 +
 drivers/clk/altera/clk-agilex.c                         | 1 +
 drivers/clk/altera/clk-arria10.c                        | 1 +
 drivers/clk/aspeed/clk_ast2500.c                        | 1 +
 drivers/clk/at91/clk-generated.c                        | 1 +
 drivers/clk/at91/clk-h32mx.c                            | 1 +
 drivers/clk/at91/clk-main.c                             | 1 +
 drivers/clk/at91/clk-master.c                           | 1 +
 drivers/clk/at91/clk-plla.c                             | 1 +
 drivers/clk/at91/clk-usb.c                              | 1 +
 drivers/clk/at91/pmc.c                                  | 1 +
 drivers/clk/clk-uclass.c                                | 1 +
 drivers/clk/clk_pic32.c                                 | 1 +
 drivers/clk/clk_stm32mp1.c                              | 1 +
 drivers/clk/clk_zynq.c                                  | 1 +
 drivers/clk/mpc83xx_clk.c                               | 1 +
 drivers/clk/renesas/clk-rcar-gen2.c                     | 1 +
 drivers/clk/renesas/clk-rcar-gen3.c                     | 1 +
 drivers/clk/rockchip/clk_px30.c                         | 1 +
 drivers/clk/rockchip/clk_rk3288.c                       | 1 +
 drivers/clk/rockchip/clk_rk3308.c                       | 1 +
 drivers/clk/rockchip/clk_rv1108.c                       | 1 +
 drivers/core/device-remove.c                            | 1 +
 drivers/core/device.c                                   | 1 +
 drivers/core/fdtaddr.c                                  | 1 +
 drivers/core/of_access.c                                | 1 +
 drivers/core/ofnode.c                                   | 1 +
 drivers/core/read.c                                     | 1 +
 drivers/core/regmap.c                                   | 1 +
 drivers/core/root.c                                     | 1 +
 drivers/core/uclass.c                                   | 1 +
 drivers/cpu/imx8_cpu.c                                  | 1 +
 drivers/cpu/riscv_cpu.c                                 | 1 +
 drivers/crypto/rsa_mod_exp/mod_exp_uclass.c             | 1 +
 drivers/ddr/altera/sdram_agilex.c                       | 1 +
 drivers/ddr/altera/sdram_arria10.c                      | 1 +
 drivers/ddr/altera/sdram_s10.c                          | 1 +
 drivers/ddr/altera/sdram_soc64.c                        | 1 +
 drivers/ddr/imx/imx8m/helper.c                          | 1 +
 drivers/demo/demo-shape.c                               | 1 +
 drivers/demo/demo-uclass.c                              | 1 +
 drivers/fpga/socfpga_arria10.c                          | 1 +
 drivers/fpga/zynqmppl.c                                 | 1 +
 drivers/gpio/74x164_gpio.c                              | 1 +
 drivers/gpio/altera_pio.c                               | 1 +
 drivers/gpio/atmel_pio4.c                               | 1 +
 drivers/gpio/da8xx_gpio.c                               | 1 +
 drivers/gpio/gpio-rcar.c                                | 1 +
 drivers/gpio/gpio-rza1.c                                | 1 +
 drivers/gpio/gpio-uclass.c                              | 1 +
 drivers/gpio/intel_broadwell_gpio.c                     | 1 +
 drivers/gpio/intel_ich6_gpio.c                          | 1 +
 drivers/gpio/msm_gpio.c                                 | 1 +
 drivers/gpio/mxs_gpio.c                                 | 1 +
 drivers/gpio/omap_gpio.c                                | 1 +
 drivers/gpio/pcf8575_gpio.c                             | 1 +
 drivers/gpio/pic32_gpio.c                               | 1 +
 drivers/gpio/s5p_gpio.c                                 | 1 +
 drivers/gpio/vybrid_gpio.c                              | 1 +
 drivers/hwspinlock/hwspinlock-uclass.c                  | 1 +
 drivers/i2c/at91_i2c.c                                  | 1 +
 drivers/i2c/cros_ec_tunnel.c                            | 1 +
 drivers/i2c/exynos_hs_i2c.c                             | 1 +
 drivers/i2c/fsl_i2c.c                                   | 1 +
 drivers/i2c/i2c-gpio.c                                  | 1 +
 drivers/i2c/i2c_core.c                                  | 1 +
 drivers/i2c/ihs_i2c.c                                   | 1 +
 drivers/i2c/iproc_i2c.c                                 | 1 +
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c              | 1 +
 drivers/i2c/muxes/i2c-mux-gpio.c                        | 1 +
 drivers/i2c/muxes/pca954x.c                             | 1 +
 drivers/i2c/mvtwsi.c                                    | 1 +
 drivers/i2c/mxc_i2c.c                                   | 1 +
 drivers/i2c/s3c24x0_i2c.c                               | 1 +
 drivers/i2c/sh_i2c.c                                    | 1 +
 drivers/i2c/soft_i2c.c                                  | 1 +
 drivers/i2c/tegra186_bpmp_i2c.c                         | 1 +
 drivers/input/i8042.c                                   | 1 +
 drivers/mailbox/k3-sec-proxy.c                          | 1 +
 drivers/misc/atsha204a-i2c.c                            | 1 +
 drivers/misc/fs_loader.c                                | 1 +
 drivers/misc/imx8/fuse.c                                | 1 +
 drivers/misc/imx8/scu.c                                 | 1 +
 drivers/misc/imx8/scu_api.c                             | 1 +
 drivers/misc/tegra186_bpmp.c                            | 1 +
 drivers/mmc/atmel_sdhci.c                               | 1 +
 drivers/mmc/ca_dw_mmc.c                                 | 1 +
 drivers/mmc/exynos_dw_mmc.c                             | 1 +
 drivers/mmc/fsl_esdhc.c                                 | 1 +
 drivers/mmc/fsl_esdhc_imx.c                             | 1 +
 drivers/mmc/ftsdc010_mci.c                              | 1 +
 drivers/mmc/hi6220_dw_mmc.c                             | 1 +
 drivers/mmc/iproc_sdhci.c                               | 1 +
 drivers/mmc/jz_mmc.c                                    | 1 +
 drivers/mmc/msm_sdhci.c                                 | 1 +
 drivers/mmc/mv_sdhci.c                                  | 1 +
 drivers/mmc/mvebu_mmc.c                                 | 1 +
 drivers/mmc/omap_hsmmc.c                                | 1 +
 drivers/mmc/pic32_sdhci.c                               | 1 +
 drivers/mmc/renesas-sdhi.c                              | 1 +
 drivers/mmc/s5p_sdhci.c                                 | 1 +
 drivers/mmc/sdhci-cadence.c                             | 1 +
 drivers/mmc/sh_mmcif.c                                  | 1 +
 drivers/mmc/sh_sdhi.c                                   | 1 +
 drivers/mmc/socfpga_dw_mmc.c                            | 1 +
 drivers/mmc/sti_sdhci.c                                 | 1 +
 drivers/mmc/tmio-common.c                               | 1 +
 drivers/mmc/xenon_sdhci.c                               | 1 +
 drivers/mtd/altera_qspi.c                               | 1 +
 drivers/mtd/cfi_flash.c                                 | 1 +
 drivers/mtd/mtd_uboot.c                                 | 1 +
 drivers/mtd/nand/raw/nand_base.c                        | 1 +
 drivers/mtd/nand/raw/pxa3xx_nand.c                      | 1 +
 drivers/mtd/nand/raw/sunxi_nand.c                       | 1 +
 drivers/mtd/nand/raw/tegra_nand.c                       | 1 +
 drivers/mtd/pic32_flash.c                               | 1 +
 drivers/mtd/renesas_rpc_hf.c                            | 1 +
 drivers/mtd/spi/sf-uclass.c                             | 1 +
 drivers/net/ag7xxx.c                                    | 1 +
 drivers/net/altera_tse.c                                | 1 +
 drivers/net/dwc_eth_qos.c                               | 1 +
 drivers/net/dwmac_s700.c                                | 1 +
 drivers/net/fec_mxc.c                                   | 1 +
 drivers/net/fsl-mc/mc.c                                 | 1 +
 drivers/net/fsl_mcdmafec.c                              | 1 +
 drivers/net/ftmac100.c                                  | 1 +
 drivers/net/gmac_rockchip.c                             | 1 +
 drivers/net/ldpaa_eth/ldpaa_eth.c                       | 1 +
 drivers/net/macb.c                                      | 1 +
 drivers/net/mcffec.c                                    | 1 +
 drivers/net/mcfmii.c                                    | 1 +
 drivers/net/mpc8xx_fec.c                                | 1 +
 drivers/net/mvgbe.c                                     | 1 +
 drivers/net/mvneta.c                                    | 1 +
 drivers/net/mvpp2.c                                     | 1 +
 drivers/net/phy/fixed.c                                 | 1 +
 drivers/net/phy/miiphybb.c                              | 1 +
 drivers/net/phy/phy.c                                   | 1 +
 drivers/net/phy/xilinx_gmii2rgmii.c                     | 4 ++--
 drivers/net/pic32_eth.c                                 | 1 +
 drivers/net/ravb.c                                      | 1 +
 drivers/net/sandbox-raw.c                               | 1 +
 drivers/net/sandbox.c                                   | 1 +
 drivers/net/sh_eth.c                                    | 1 +
 drivers/net/sni_ave.c                                   | 1 +
 drivers/net/sun8i_emac.c                                | 1 +
 drivers/net/ti/cpsw-common.c                            | 1 +
 drivers/net/ti/keystone_net.c                           | 1 +
 drivers/net/xilinx_axi_emac.c                           | 1 +
 drivers/net/xilinx_emaclite.c                           | 1 +
 drivers/pci/fsl_pci_init.c                              | 1 +
 drivers/pci/pci-uclass.c                                | 1 +
 drivers/pci/pci.c                                       | 1 +
 drivers/pci/pci_mvebu.c                                 | 1 +
 drivers/pci/pci_rom.c                                   | 1 +
 drivers/pci/pcie_dw_mvebu.c                             | 1 +
 drivers/pci/pcie_dw_ti.c                                | 1 +
 drivers/pci/pcie_ecam_generic.c                         | 1 +
 drivers/pci/pcie_fsl.c                                  | 1 +
 drivers/pci/pcie_intel_fpga.c                           | 1 +
 drivers/pci/pcie_layerscape.c                           | 1 +
 drivers/pci/pcie_layerscape_ep.c                        | 1 +
 drivers/pci/pcie_layerscape_fixup_common.c              | 1 +
 drivers/pci/pcie_layerscape_gen4.c                      | 1 +
 drivers/pci/pcie_layerscape_rc.c                        | 1 +
 drivers/pci/pcie_phytium.c                              | 1 +
 drivers/pci/pcie_rockchip.c                             | 1 +
 drivers/pci/pcie_xilinx.c                               | 1 +
 drivers/pci_endpoint/pci_ep-uclass.c                    | 1 +
 drivers/pci_endpoint/pcie-cadence-ep.c                  | 1 +
 drivers/phy/marvell/comphy_a3700.c                      | 1 +
 drivers/phy/marvell/comphy_core.c                       | 1 +
 drivers/phy/marvell/comphy_cp110.c                      | 1 +
 drivers/phy/omap-usb2-phy.c                             | 1 +
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c           | 1 +
 drivers/phy/rockchip/phy-rockchip-pcie.c                | 1 +
 drivers/phy/rockchip/phy-rockchip-typec.c               | 1 +
 drivers/phy/sti_usb_phy.c                               | 1 +
 drivers/phy/ti-pipe3-phy.c                              | 1 +
 drivers/pinctrl/ath79/pinctrl_ar933x.c                  | 1 +
 drivers/pinctrl/ath79/pinctrl_qca953x.c                 | 1 +
 drivers/pinctrl/exynos/pinctrl-exynos.c                 | 1 +
 drivers/pinctrl/meson/pinctrl-meson.c                   | 1 +
 drivers/pinctrl/mtmips/pinctrl-mt7628.c                 | 1 +
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c             | 1 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c                   | 1 +
 drivers/pinctrl/nxp/pinctrl-imx.c                       | 1 +
 drivers/pinctrl/nxp/pinctrl-imx8.c                      | 1 +
 drivers/pinctrl/nxp/pinctrl-mxs.c                       | 1 +
 drivers/pinctrl/pinctrl-at91-pio4.c                     | 1 +
 drivers/pinctrl/pinctrl-at91.c                          | 1 +
 drivers/pinctrl/pinctrl-sti.c                           | 1 +
 drivers/pinctrl/pinctrl-uclass.c                        | 1 +
 drivers/pinctrl/pinctrl_pic32.c                         | 1 +
 drivers/pinctrl/pinctrl_stm32.c                         | 1 +
 drivers/pinctrl/renesas/pfc-r7s72100.c                  | 1 +
 drivers/pinctrl/rockchip/pinctrl-rockchip-core.c        | 1 +
 drivers/power/domain/imx8-power-domain-legacy.c         | 1 +
 drivers/power/domain/imx8m-power-domain.c               | 1 +
 drivers/power/pmic/bd71837.c                            | 1 +
 drivers/power/pmic/mc34708.c                            | 1 +
 drivers/power/pmic/pca9450.c                            | 1 +
 drivers/power/regulator/pwm_regulator.c                 | 1 +
 drivers/pwm/pwm-sifive.c                                | 1 +
 drivers/pwm/rk_pwm.c                                    | 1 +
 drivers/pwm/sunxi_pwm.c                                 | 1 +
 drivers/qe/fdt.c                                        | 1 +
 drivers/qe/qe.c                                         | 1 +
 drivers/ram/mpc83xx_sdram.c                             | 1 +
 drivers/ram/rockchip/sdram_rk322x.c                     | 1 +
 drivers/ram/sandbox_ram.c                               | 1 +
 drivers/ram/sifive/fu540_ddr.c                          | 1 +
 drivers/ram/stm32mp1/stm32mp1_interactive.c             | 1 +
 drivers/ram/stm32mp1/stm32mp1_tests.c                   | 1 +
 drivers/remoteproc/rproc-uclass.c                       | 1 +
 drivers/remoteproc/ti_power_proc.c                      | 1 +
 drivers/reset/sti-reset.c                               | 1 +
 drivers/serial/atmel_usart.c                            | 1 +
 drivers/serial/ns16550.c                                | 1 +
 drivers/serial/sandbox.c                                | 1 +
 drivers/serial/serial-uclass.c                          | 1 +
 drivers/serial/serial.c                                 | 1 +
 drivers/serial/serial_arc.c                             | 1 +
 drivers/serial/serial_linflexuart.c                     | 1 +
 drivers/serial/serial_lpuart.c                          | 1 +
 drivers/serial/serial_mcf.c                             | 1 +
 drivers/serial/serial_mpc8xx.c                          | 1 +
 drivers/serial/serial_msm.c                             | 1 +
 drivers/serial/serial_mtk.c                             | 1 +
 drivers/serial/serial_mxc.c                             | 1 +
 drivers/serial/serial_ns16550.c                         | 1 +
 drivers/serial/serial_pic32.c                           | 1 +
 drivers/serial/serial_pl01x.c                           | 1 +
 drivers/serial/serial_pxa.c                             | 1 +
 drivers/serial/serial_s5p.c                             | 1 +
 drivers/serial/serial_sh.c                              | 1 +
 drivers/serial/serial_sifive.c                          | 1 +
 drivers/serial/serial_sti_asc.c                         | 1 +
 drivers/smem/msm_smem.c                                 | 1 +
 drivers/sound/ivybridge_sound.c                         | 1 +
 drivers/spi/atcspi200_spi.c                             | 1 +
 drivers/spi/bcmstb_spi.c                                | 1 +
 drivers/spi/cf_spi.c                                    | 1 +
 drivers/spi/davinci_spi.c                               | 1 +
 drivers/spi/exynos_spi.c                                | 1 +
 drivers/spi/fsl_dspi.c                                  | 1 +
 drivers/spi/fsl_espi.c                                  | 1 +
 drivers/spi/fsl_qspi.c                                  | 1 +
 drivers/spi/mvebu_a3700_spi.c                           | 1 +
 drivers/spi/mxc_spi.c                                   | 1 +
 drivers/spi/omap3_spi.c                                 | 1 +
 drivers/spi/pic32_spi.c                                 | 1 +
 drivers/spi/pl022_spi.c                                 | 1 +
 drivers/spi/renesas_rpc_spi.c                           | 1 +
 drivers/spi/soft_spi.c                                  | 1 +
 drivers/spi/spi-sunxi.c                                 | 1 +
 drivers/spi/spi-uclass.c                                | 1 +
 drivers/spi/tegra20_sflash.c                            | 1 +
 drivers/spi/tegra20_slink.c                             | 1 +
 drivers/spi/tegra210_qspi.c                             | 1 +
 drivers/spi/ti_qspi.c                                   | 1 +
 drivers/spi/uniphier_spi.c                              | 1 +
 drivers/spi/zynq_qspi.c                                 | 1 +
 drivers/spi/zynq_spi.c                                  | 1 +
 drivers/spi/zynqmp_gqspi.c                              | 1 +
 drivers/spmi/spmi-msm.c                                 | 1 +
 drivers/sysreset/sysreset-uclass.c                      | 1 +
 drivers/sysreset/sysreset_mpc83xx.c                     | 1 +
 drivers/sysreset/sysreset_sti.c                         | 1 +
 drivers/thermal/imx_scu_thermal.c                       | 1 +
 drivers/thermal/imx_tmu.c                               | 1 +
 drivers/timer/arc_timer.c                               | 1 +
 drivers/timer/cadence-ttc.c                             | 1 +
 drivers/timer/mpc83xx_timer.c                           | 1 +
 drivers/timer/ostm_timer.c                              | 1 +
 drivers/timer/rockchip_timer.c                          | 1 +
 drivers/timer/timer-uclass.c                            | 1 +
 drivers/timer/tsc_timer.c                               | 1 +
 drivers/tpm/tpm2_tis_spi.c                              | 1 +
 drivers/usb/common/common.c                             | 1 +
 drivers/usb/host/dwc3-sti-glue.c                        | 1 +
 drivers/usb/host/ehci-exynos.c                          | 1 +
 drivers/usb/host/ehci-fsl.c                             | 1 +
 drivers/usb/host/ehci-marvell.c                         | 1 +
 drivers/usb/host/ehci-mx5.c                             | 1 +
 drivers/usb/host/ehci-mx6.c                             | 1 +
 drivers/usb/host/ehci-vf.c                              | 1 +
 drivers/usb/host/xhci-exynos5.c                         | 1 +
 drivers/usb/musb-new/da8xx.c                            | 1 +
 drivers/usb/musb-new/omap2430.c                         | 1 +
 drivers/usb/musb-new/pic32.c                            | 1 +
 drivers/usb/musb-new/ti-musb.c                          | 1 +
 drivers/usb/phy/rockchip_usb2_phy.c                     | 1 +
 drivers/video/am335x-fb.c                               | 1 +
 drivers/video/atmel_hlcdfb.c                            | 1 +
 drivers/video/atmel_lcdfb.c                             | 1 +
 drivers/video/bridge/ps862x.c                           | 1 +
 drivers/video/broadwell_igd.c                           | 1 +
 drivers/video/cfb_console.c                             | 1 +
 drivers/video/da8xx-fb.c                                | 1 +
 drivers/video/exynos/exynos_dp.c                        | 1 +
 drivers/video/exynos/exynos_fb.c                        | 1 +
 drivers/video/exynos/exynos_mipi_dsi.c                  | 1 +
 drivers/video/fsl_dcu_fb.c                              | 1 +
 drivers/video/ivybridge_igd.c                           | 1 +
 drivers/video/mali_dp.c                                 | 1 +
 drivers/video/meson/meson_vpu.c                         | 1 +
 drivers/video/mxsfb.c                                   | 1 +
 drivers/video/rockchip/rk3288_vop.c                     | 1 +
 drivers/video/rockchip/rk3399_vop.c                     | 1 +
 drivers/video/rockchip/rk_lvds.c                        | 1 +
 drivers/video/rockchip/rk_mipi.c                        | 1 +
 drivers/video/rockchip/rk_vop.c                         | 1 +
 drivers/video/sandbox_sdl.c                             | 1 +
 drivers/video/simplefb.c                                | 1 +
 drivers/video/stm32/stm32_dsi.c                         | 1 +
 drivers/video/stm32/stm32_ltdc.c                        | 1 +
 drivers/video/sunxi/sunxi_lcd.c                         | 1 +
 drivers/video/tegra.c                                   | 1 +
 drivers/video/video-uclass.c                            | 1 +
 drivers/video/videomodes.c                              | 1 +
 drivers/watchdog/armada-37xx-wdt.c                      | 1 +
 drivers/watchdog/at91sam9_wdt.c                         | 1 +
 drivers/watchdog/mt7621_wdt.c                           | 1 +
 drivers/watchdog/orion_wdt.c                            | 1 +
 drivers/watchdog/sbsa_gwdt.c                            | 1 +
 drivers/watchdog/sp805_wdt.c                            | 1 +
 drivers/watchdog/wdt-uclass.c                           | 1 +
 drivers/xen/gnttab.c                                    | 1 +
 env/callback.c                                          | 1 +
 env/common.c                                            | 1 +
 env/eeprom.c                                            | 1 +
 env/env.c                                               | 1 +
 env/ext4.c                                              | 1 +
 env/flash.c                                             | 1 +
 env/mmc.c                                               | 1 +
 env/nand.c                                              | 1 +
 env/nowhere.c                                           | 1 +
 env/nvram.c                                             | 1 +
 env/onenand.c                                           | 1 +
 env/remote.c                                            | 1 +
 env/sf.c                                                | 1 +
 env/ubi.c                                               | 1 +
 examples/standalone/stubs.c                             | 1 +
 fs/ext4/ext4_journal.c                                  | 1 +
 fs/ext4/ext4_journal.h                                  | 1 +
 fs/ext4/ext4fs.c                                        | 2 +-
 fs/fs.c                                                 | 1 +
 fs/reiserfs/reiserfs_private.h                          | 2 ++
 fs/ubifs/ubifs.c                                        | 1 +
 include/audio_codec.h                                   | 2 ++
 include/axi.h                                           | 2 ++
 include/backlight.h                                     | 2 ++
 include/board.h                                         | 3 +++
 include/bootcount.h                                     | 1 +
 include/cache.h                                         | 2 ++
 include/common.h                                        | 1 -
 include/cpu.h                                           | 2 ++
 include/dm/device-internal.h                            | 1 +
 include/dma.h                                           | 2 ++
 include/exports.h                                       | 1 +
 include/ext_common.h                                    | 2 ++
 include/image-sparse.h                                  | 1 +
 include/init.h                                          | 7 +++----
 include/led.h                                           | 2 ++
 include/libata.h                                        | 2 --
 include/misc.h                                          | 2 ++
 include/netdev.h                                        | 2 ++
 include/pci.h                                           | 2 --
 include/power/as3722.h                                  | 2 ++
 include/power/regulator.h                               | 2 ++
 include/pwm.h                                           | 2 ++
 include/ram.h                                           | 2 ++
 include/scsi.h                                          | 2 ++
 include/soc.h                                           | 2 ++
 include/sysreset.h                                      | 2 ++
 include/tee.h                                           | 2 ++
 include/tlv_eeprom.h                                    | 2 ++
 include/tpm-common.h                                    | 2 ++
 include/tpm-v1.h                                        | 2 ++
 include/tpm-v2.h                                        | 2 ++
 include/tps6586x.h                                      | 2 ++
 include/ufs.h                                           | 3 +++
 lib/acpi/acpi_table.c                                   | 1 +
 lib/asm-offsets.c                                       | 1 +
 lib/efi/efi_app.c                                       | 1 +
 lib/efi/efi_info.c                                      | 1 +
 lib/efi_loader/efi_boottime.c                           | 1 +
 lib/efi_loader/efi_gop.c                                | 1 +
 lib/efi_loader/efi_memory.c                             | 1 +
 lib/efi_loader/efi_rng.c                                | 1 +
 lib/efi_loader/efi_runtime.c                            | 1 +
 lib/fdtdec.c                                            | 1 +
 lib/optee/optee.c                                       | 1 +
 lib/time.c                                              | 1 +
 lib/trace.c                                             | 1 +
 lib/zlib/zlib.c                                         | 1 +
 net/eth-uclass.c                                        | 1 +
 net/eth_legacy.c                                        | 1 +
 net/tftp.c                                              | 1 +
 post/drivers/memory.c                                   | 1 +
 post/post.c                                             | 1 +
 test/bloblist.c                                         | 1 +
 test/dm/acpi.c                                          | 1 +
 test/dm/blk.c                                           | 1 +
 test/dm/bus.c                                           | 1 +
 test/dm/core.c                                          | 1 +
 test/dm/fdtdec.c                                        | 1 +
 test/dm/ram.c                                           | 1 +
 test/dm/test-fdt.c                                      | 1 +
 test/dm/test-main.c                                     | 1 +
 test/log/nolog_test.c                                   | 1 +
 test/log/syslog_test.c                                  | 1 +
 test/ut.c                                               | 1 +
 1298 files changed, 1340 insertions(+), 23 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 63d6207c0477..8a8d394a5f0c 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 85651b219cf8..f807cd83d6b5 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -6,6 +6,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index d66a8c867acd..07f57878ef14 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -9,6 +9,7 @@
 #include <vsprintf.h>
 #include <asm/arcregs.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 6882ebec6d88..7f531c95eec6 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -7,6 +7,7 @@
 #include <elf.h>
 #include <log.h>
 #include <asm-generic/sections.h>
+#include <asm/global_data.h>
 
 extern ulong __image_copy_start;
 extern ulong __ivt_start;
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index 10f9ce42708e..cbf76ab4feec 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -12,6 +12,7 @@
 #include <div64.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/dram.c b/arch/arm/cpu/arm926ejs/armada100/dram.c
index da0615faf159..c97b5b1940a5 100644
--- a/arch/arm/cpu/arm926ejs/armada100/dram.c
+++ b/arch/arm/cpu/arm926ejs/armada100/dram.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/armada100.h>
 
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index 0f1e68c8355f..ec73393d0fc7 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 /*
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index a4528cbaf529..9cd60abcccbd 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-imx/cpu.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index 408e88aa129e..4fd6a8059685 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -19,6 +19,7 @@
 #include <div64.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/ptrace.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 8243aeb2c0f6..c9362136fbf9 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -15,6 +15,7 @@
 #include <hang.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 1501d7df0dc6..a16a15e79d83 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <log.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 5ab4ed0c5a3d..3dff3d768d1c 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index 998423b6525c..044052b32f93 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/mtd/st_smi.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index dd0f15c0ceee..b42baa71506f 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_gpt.h>
diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index 871629c2333b..d96406f7626f 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <bootstage.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/clock.c b/arch/arm/cpu/armv7/ls102xa/clock.c
index f3bdb14c0722..940995ef5af1 100644
--- a/arch/arm/cpu/armv7/ls102xa/clock.c
+++ b/arch/arm/cpu/armv7/ls102xa/clock.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index ce472aa9bd54..cbc8254b42a0 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -9,6 +9,7 @@
 #include <net.h>
 #include <vsprintf.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/cache.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index d8cb78ecc675..d1d09f936500 100644
--- a/arch/arm/cpu/armv7/ls102xa/fdt.c
+++ b/arch/arm/cpu/armv7/ls102xa/fdt.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index 2a32b30999fe..d79bf105f13a 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <asm/arch/immap_ls102xa.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
index 7790f087a09d..d910282e2b29 100644
--- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
+++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index 3064fd25d4d0..8141f40d5c09 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/armv7/s5p4418/cpu.c b/arch/arm/cpu/armv7/s5p4418/cpu.c
index 8add9474ad23..3c71a37a74bf 100644
--- a/arch/arm/cpu/armv7/s5p4418/cpu.c
+++ b/arch/arm/cpu/armv7/s5p4418/cpu.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/arch/nexell.h>
diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
index 919529aa1b03..07033acb5c18 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-stv0991/hardware.h>
 #include <asm/arch-stv0991/stv0991_cgu.h>
diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
index 65b64b5ac75b..b7585996369f 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 #include <linux/delay.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 743bfced6438..c23ddc12b456 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index fa8f8fae10a0..a9c1a8fcebc1 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
index d2672fd40cdb..556eaf8c74ad 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 7c31d98a6f03..15cecb5e0b34 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -12,6 +12,7 @@
 #include <hang.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 8a2f4048ecb4..3654cbf3b497 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/ptrace.h>
 #include <linux/errno.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
index c56689086de6..63d34e1ec039 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 #include <asm/processor.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
index 7f8178f72ebd..767359fa5bd6 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <fsl_ifc.h>
 #include <asm/processor.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index bd85351705a7..5ac545f9df81 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -8,6 +8,7 @@
 #include <image.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/arch/mp.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 1ddb267093cb..f26be5a25b02 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <errno.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/types.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 77724336d62c..7d594a9f7490 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <spl.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <fsl_ifc.h>
 #include <i2c.h>
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index e23629ab0bc3..f27a74b9d09b 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -8,6 +8,7 @@
 #include <bootstage.h>
 #include <command.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <linux/bitops.h>
 
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index de5a098adb8f..0fc98852228a 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index bfc0fac3eff2..c6c4fcc7e073 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/arch/arm/include/asm/arch-rockchip/clock.h b/arch/arm/include/asm/arch-rockchip/clock.h
index 22de0aef8dc0..5108180ea77f 100644
--- a/arch/arm/include/asm/arch-rockchip/clock.h
+++ b/arch/arm/include/asm/arch-rockchip/clock.h
@@ -6,6 +6,8 @@
 #ifndef _ASM_ARCH_CLOCK_H
 #define _ASM_ARCH_CLOCK_H
 
+struct udevice;
+
 /* define pll mode */
 #define RKCLK_PLL_MODE_SLOW		0
 #define RKCLK_PLL_MODE_NORMAL		1
diff --git a/arch/arm/include/asm/arch-tegra/clock.h b/arch/arm/include/asm/arch-tegra/clock.h
index 8aa90d5c0c56..1d80d9e94617 100644
--- a/arch/arm/include/asm/arch-tegra/clock.h
+++ b/arch/arm/include/asm/arch-tegra/clock.h
@@ -8,6 +8,8 @@
 #ifndef _TEGRA_CLOCK_H_
 #define _TEGRA_CLOCK_H_
 
+struct udevice;
+
 /* Set of oscillator frequencies supported in the internal API. */
 enum clock_osc_freq {
 	/* All in MHz, so 13_0 is 13.0MHz */
diff --git a/arch/arm/include/asm/arch-tegra/tegra_i2c.h b/arch/arm/include/asm/arch-tegra/tegra_i2c.h
index 5316bc47e4b3..e57b9ef9c474 100644
--- a/arch/arm/include/asm/arch-tegra/tegra_i2c.h
+++ b/arch/arm/include/asm/arch-tegra/tegra_i2c.h
@@ -10,6 +10,8 @@
 
 #include <asm/types.h>
 
+struct udevice;
+
 enum {
 	I2C_TIMEOUT_USEC = 10000,	/* Wait time for completion */
 	I2C_FIFO_DEPTH = 8,		/* I2C fifo depth */
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 2aafc6d2062e..5a935d34e20e 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -7,6 +7,9 @@
 #ifndef	__ASM_GBL_DATA_H
 #define __ASM_GBL_DATA_H
 
+#include <asm/types.h>
+#include <linux/types.h>
+
 /* Architecture-specific global data */
 struct arch_global_data {
 #if defined(CONFIG_FSL_ESDHC) || defined(CONFIG_FSL_ESDHC_IMX)
diff --git a/arch/arm/include/asm/mach-imx/video.h b/arch/arm/include/asm/mach-imx/video.h
index d1a14ad7d348..1fdc2de662a3 100644
--- a/arch/arm/include/asm/mach-imx/video.h
+++ b/arch/arm/include/asm/mach-imx/video.h
@@ -16,9 +16,7 @@ struct display_info_t {
 	struct	fb_videomode mode;
 };
 
-#ifdef CONFIG_IMX_HDMI
-extern int detect_hdmi(struct display_info_t const *dev);
-#endif
+int detect_hdmi(struct display_info_t const *dev);
 
 #ifdef CONFIG_IMX_VIDEO_SKIP
 extern struct display_info_t const displays[];
diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h
index 50582c972b7a..64e5582c1f2a 100644
--- a/arch/arm/include/asm/secure.h
+++ b/arch/arm/include/asm/secure.h
@@ -2,6 +2,7 @@
 #define __ASM_SECURE_H
 
 #include <config.h>
+#include <asm/global_data.h>
 
 #define __secure __attribute__ ((section ("._secure.text")))
 #define __secure_data __attribute__ ((section ("._secure.data")))
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h
index 11eaa34fab8c..cefeddd73f12 100644
--- a/arch/arm/include/asm/string.h
+++ b/arch/arm/include/asm/string.h
@@ -1,8 +1,6 @@
 #ifndef __ASM_ARM_STRING_H
 #define __ASM_ARM_STRING_H
 
-#include <config.h>
-
 /*
  * We don't do inline string functions, since the
  * optimised inline asm versions are not small.
diff --git a/arch/arm/include/asm/ti-common/sys_proto.h b/arch/arm/include/asm/ti-common/sys_proto.h
index db042a1aef2d..a96a8382fb6e 100644
--- a/arch/arm/include/asm/ti-common/sys_proto.h
+++ b/arch/arm/include/asm/ti-common/sys_proto.h
@@ -6,6 +6,8 @@
 #ifndef _TI_COMMON_SYS_PROTO_H_
 #define _TI_COMMON_SYS_PROTO_H_
 
+#include <asm/global_data.h>
+
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_ARCH_OMAP2PLUS
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 25bc6e80f476..572f7fb2429f 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index 02a49a8e10f9..e1970ea9f148 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -19,6 +19,7 @@
 #ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/psci.h>
 #include <asm/spin_table.h>
 
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1206e306db65..70c181e45b7e 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -19,6 +19,7 @@
 #include <hang.h>
 #include <lmb.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/root.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index abd81d21c73c..24050e5bdd30 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index ee7d14b2d31d..b494611d6e8d 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 94590d3049ad..e394c1ad9093 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <image.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/sizes.h>
 
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index 703be5a3209c..05bb1a38b35e 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -22,6 +22,7 @@
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <irq_func.h>
+#include <asm/global_data.h>
 #include <asm/proc-armv/ptrace.h>
 #include <asm/ptrace.h>
 #include <asm/u-boot-arm.h>
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index 529948901376..c653e67db286 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <irq_func.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index af0c9ad6bd6c..b2b54f28fc4b 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -14,6 +14,7 @@
 #include <spl.h>
 #include <image.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mach-types.h>
 
diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c
index 96a248c0a907..b03e1cfc80c9 100644
--- a/arch/arm/lib/stack.c
+++ b/arch/arm/lib/stack.c
@@ -12,6 +12,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-aspeed/ast2500/board_common.c b/arch/arm/mach-aspeed/ast2500/board_common.c
index 3482ee91efd8..aca200223129 100644
--- a/arch/arm/mach-aspeed/ast2500/board_common.c
+++ b/arch/arm/mach-aspeed/ast2500/board_common.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <ram.h>
 #include <timer.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 #include <asm/arch/wdt.h>
diff --git a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
index a3adaa8a999c..cfb0374d60c8 100644
--- a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
@@ -13,6 +13,7 @@
 #include <ram.h>
 #include <regmap.h>
 #include <reset.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <asm/arch/sdram_ast2500.h>
diff --git a/arch/arm/mach-at91/arm920t/clock.c b/arch/arm/mach-at91/arm920t/clock.c
index 9a57dd40891b..c7440278d8f8 100644
--- a/arch/arm/mach-at91/arm920t/clock.c
+++ b/arch/arm/mach-at91/arm920t/clock.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
  */
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index dca2d2c70c77..c400e8781356 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/arch/arm/mach-at91/arm926ejs/clock.c b/arch/arm/mach-at91/arm926ejs/clock.c
index 7156185a46fa..c68e0c0c3c44 100644
--- a/arch/arm/mach-at91/arm926ejs/clock.c
+++ b/arch/arm/mach-at91/arm926ejs/clock.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
diff --git a/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c
index 42ef349966b0..a8cf0e4bd799 100644
--- a/arch/arm/mach-at91/arm926ejs/timer.c
+++ b/arch/arm/mach-at91/arm926ejs/timer.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-at91/armv7/clock.c b/arch/arm/mach-at91/armv7/clock.c
index 39268969580b..aa6bb6bf31e0 100644
--- a/arch/arm/mach-at91/armv7/clock.c
+++ b/arch/arm/mach-at91/armv7/clock.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c
index a6346c01b285..1f54c5dcad98 100644
--- a/arch/arm/mach-at91/armv7/timer.c
+++ b/arch/arm/mach-at91/armv7/timer.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index 35a3d5185d3f..d0c732539248 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -12,6 +12,7 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91sam9_matrix.h>
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index f2a541162370..b2708e4876ed 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <fdt_support.h>
 
diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c
index 40dd44af67eb..aefd21dc458a 100644
--- a/arch/arm/mach-davinci/cpu.c
+++ b/arch/arm/mach-davinci/cpu.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index 5bfc47dae457..90b38b7e020e 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
 
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index a6681821f6dd..43e0574901ee 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -23,6 +23,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/timer_defs.h>
 #include <div64.h>
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 9c7ca49519b9..27f0dac182d3 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -7,6 +7,7 @@
 #include <config.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #include <asm/cache.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index fe8d5947ccea..f2e95ffac7bd 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -6,8 +6,8 @@
  * (C) Copyright 2009 Freescale Semiconductor, Inc.
  */
 
-#include <bootm.h>
 #include <common.h>
+#include <bootm.h>
 #include <dm.h>
 #include <init.h>
 #include <log.h>
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 5dbe1d56e02f..bbcefc8e9b61 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/mach-imx/sys_proto.h>
diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c
index d747e1332f04..9941b57b4be5 100644
--- a/arch/arm/mach-imx/imx8/clock.c
+++ b/arch/arm/mach-imx/imx8/clock.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/arch/clock.h>
 
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 38b2c0926f58..293c931b2ffa 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass.h>
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 3e05b972a450..a132ce2e6a3a 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <dm/ofnode.h>
 #include <fdt_support.h>
 #include <linux/libfdt.h>
diff --git a/arch/arm/mach-imx/imx8/iomux.c b/arch/arm/mach-imx/imx8/iomux.c
index b8e6f48a5f77..9c3cfbf0068c 100644
--- a/arch/arm/mach-imx/imx8/iomux.c
+++ b/arch/arm/mach-imx/imx8/iomux.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sci/sci.h>
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 564d1bfdfb20..6f9b1c99fcd2 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -18,6 +18,7 @@
 #include <asm/arch/sci/sci.h>
 #include <asm/arch-imx8/imx8-pins.h>
 #include <asm/arch-imx8/snvs_security_sc.h>
+#include <asm/global_data.h>
 
 /* Access to gd */
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 3610f5b2fca5..7f99c5c4b916 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -9,6 +9,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <errno.h>
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 8dfc8645fc0a..3ad1352f03f2 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 818f38e17ddb..d82efa7f8f0a 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -7,6 +7,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/mx5/mx53_dram.c b/arch/arm/mach-imx/mx5/mx53_dram.c
index a7f033f3f44d..f74414419470 100644
--- a/arch/arm/mach-imx/mx5/mx53_dram.c
+++ b/arch/arm/mach-imx/mx5/mx53_dram.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/mx6/litesom.c b/arch/arm/mach-imx/mx6/litesom.c
index 92176dc86158..699a3dc317f0 100644
--- a/arch/arm/mach-imx/mx6/litesom.c
+++ b/arch/arm/mach-imx/mx6/litesom.c
@@ -12,6 +12,7 @@
 #include <asm/arch/mx6ul_pins.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c
index 4b3c59f7eef4..e9d78740a157 100644
--- a/arch/arm/mach-imx/mx6/opos6ul.c
+++ b/arch/arm/mach-imx/mx6/opos6ul.c
@@ -8,6 +8,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <env.h>
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index aba9461d9204..b1d7290704a4 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <div64.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index a987ff22dfd5..467832074afb 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -7,6 +7,7 @@
 #include <clock_legacy.h>
 #include <command.h>
 #include <div64.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/speed.c b/arch/arm/mach-imx/speed.c
index e78b1fd71b6e..b729187ec817 100644
--- a/arch/arm/mach-imx/speed.c
+++ b/arch/arm/mach-imx/speed.c
@@ -11,6 +11,7 @@
 #include <clock_legacy.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 
 #ifdef CONFIG_FSL_ESDHC_IMX
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 76a5f7aca613..982fb47bc89d 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index f588a5f52160..9f4d95982e59 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <image.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <spl.h>
 
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 7da43c32e0db..6dfed365d295 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 8c903f14ff87..f01aeb40c9d5 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include "common.h"
 #include <dm.h>
 #include <remoteproc.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 78c158c63f71..91182d04b227 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <remoteproc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <g_dnl.h>
 #include <usb.h>
diff --git a/arch/arm/mach-mediatek/mt7623/init.c b/arch/arm/mach-mediatek/mt7623/init.c
index 2778e260e024..5d837e059719 100644
--- a/arch/arm/mach-mediatek/mt7623/init.c
+++ b/arch/arm/mach-mediatek/mt7623/init.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 #include <asm/arch/misc.h>
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index c260413a57a1..617a77e98003 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <ram.h>
 #include <asm/arch/misc.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <linux/bitops.h>
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index aa779f437663..c14e7d22e6fc 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -17,6 +17,7 @@
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8512-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 13be39122115..0eb65aa76b5f 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -15,6 +15,7 @@
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8516-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index 531a403da1b0..28b00c3dec89 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -16,6 +16,7 @@
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8518-clk.h>
diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c
index 5e0b3f6cb5e1..9ec63141ab15 100644
--- a/arch/arm/mach-meson/board-axg.c
+++ b/arch/arm/mach-meson/board-axg.c
@@ -11,6 +11,7 @@
 #include <asm/arch/eth.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index 0f21ec8e5375..2e1dcf0e0109 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -10,6 +10,7 @@
 #include <asm/arch/boot.h>
 #include <env.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index 14127ca737c1..bb75d4f8ad37 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -13,6 +13,7 @@
 #include <asm/arch/g12a.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/meson-vpu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
index c4cc11f1de31..6824b846d4d4 100644
--- a/arch/arm/mach-meson/board-gx.c
+++ b/arch/arm/mach-meson/board-gx.c
@@ -12,6 +12,7 @@
 #include <asm/arch/gx.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/meson-vpu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv8/mmu.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
index 3abb27e03b45..28385488995a 100644
--- a/arch/arm/mach-meson/board-info.c
+++ b/arch/arm/mach-meson/board-info.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <linux/bitfield.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index ebbb880b71ea..1a8f23cb1faa 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index c8c065e93c3b..fa687d8abbbd 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -8,6 +8,7 @@
 #include <fdtdec.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index e438b4922e14..70f76c7d7074 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-mvebu/armada8k/dram.c b/arch/arm/mach-mvebu/armada8k/dram.c
index 3da9fa589d27..bab375e18acc 100644
--- a/arch/arm/mach-mvebu/armada8k/dram.c
+++ b/arch/arm/mach-mvebu/armada8k/dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c
index 6c6f8d8c5c57..349e0cc4c180 100644
--- a/arch/arm/mach-mvebu/dram.c
+++ b/arch/arm/mach-mvebu/dram.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index f645befb2c04..16ebb7a59e55 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index a7b56b6bb3de..3b17446cd5d3 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -25,6 +25,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index cb9d7fdb1563..05efe04dc359 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -11,6 +11,7 @@
 #include <ahci.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/omap_common.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index 7a7086776ee0..3da50f974dc0 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/emif.h>
 #include <asm/omap_common.h>
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index 502ea6987ab7..1b246f844a84 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -15,6 +15,7 @@
 #include <cpu_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-omap2/omap3/am35x_musb.c b/arch/arm/mach-omap2/omap3/am35x_musb.c
index 026e5d2d130b..95e15c1a51bc 100644
--- a/arch/arm/mach-omap2/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index 4cfa13238810..df6e9ce1d6ce 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 1d65ed622704..4d85b1dee991 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index bcfba16a08e5..82b10f6b2487 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-orion5x/dram.c b/arch/arm/mach-orion5x/dram.c
index 33f65db48ea4..c9a3750e48de 100644
--- a/arch/arm/mach-orion5x/dram.c
+++ b/arch/arm/mach-orion5x/dram.c
@@ -12,6 +12,7 @@
 #include <config.h>
 #include <init.h>
 #include <asm/arch/cpu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index 4926bb777960..0adf3dcc6483 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
index fd6ee7c1c0f2..4d2b9d0b0ebc 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
 #include <common.h>
diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c
index 578cb9bfd3f8..a68eb806b353 100644
--- a/arch/arm/mach-rmobile/memmap-gen3.c
+++ b/arch/arm/mach-rmobile/memmap-gen3.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
 
 #define GEN3_NR_REGIONS 16
 
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 430c0cbf41e4..eed8f589d23e 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -11,6 +11,7 @@
 #include <ram.h>
 #include <syscon.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/boot_mode.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
index 6eb89e15b818..964e981b8637 100644
--- a/arch/arm/mach-rockchip/rk3036-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/sdram_rk3036.h>
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
index e9e020ff3f58..0a072cf03a88 100644
--- a/arch/arm/mach-rockchip/rk3036/rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/grf_rk3036.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/arch/arm/mach-rockchip/rk3128/rk3128.c b/arch/arm/mach-rockchip/rk3128/rk3128.c
index 740bd2ba0770..01dbfa75cb2b 100644
--- a/arch/arm/mach-rockchip/rk3128/rk3128.c
+++ b/arch/arm/mach-rockchip/rk3128/rk3128.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 1b2f4a475719..85dcce90330b 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 1a4ecdf62546..bc20bc5ab909 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <asm/armv7.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index 8e8214cf7ecb..70fe0d0ac350 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/grf_rk3308.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
index 7c85b2663c88..ec3336cb49af 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -10,6 +10,7 @@
 #include <asm/arch-rockchip/grf_rk3328.h>
 #include <asm/arch-rockchip/uart.h>
 #include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 1c6d65a58870..9b7132d471c3 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <syscon.h>
 #include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index c6434839719d..869d2159bea6 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -11,6 +11,7 @@
 #include <spl_gpio.h>
 #include <syscon.h>
 #include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 4c637b776735..ed07ece15a4d 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <ram.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 94673f34c9b8..e05c12e0cd33 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <mmc.h>
 #include <spl.h>
+#include <asm/global_data.h>
 
 #if CONFIG_IS_ENABLED(OF_LIBFDT)
 /**
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index f148d48b6a35..4b5c22dc1382 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -13,6 +13,7 @@
 #include <ram.h>
 #include <spl.h>
 #include <asm/arch-rockchip/bootrom.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.h b/arch/arm/mach-snapdragon/pinctrl-snapdragon.h
index 24f8863f59b5..61d466f4d84b 100644
--- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.h
+++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.h
@@ -8,7 +8,7 @@
 #ifndef _PINCTRL_SNAPDRAGON_H
 #define _PINCTRL_SNAPDRAGON_H
 
-#include <common.h>
+struct udevice;
 
 struct msm_pinctrl_data {
 	int pin_count;
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 340abf9305c4..bdd5b863c459 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -12,6 +12,7 @@
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/misc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include <usb.h>
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index a4a97b6a0fcf..f0b15f770cc5 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <init.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
 
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 6188a8c3d2db..4bf01f3c8ae4 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/system_manager.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/agilex-clock.h>
 
diff --git a/arch/arm/mach-socfpga/clock_manager_s10.c b/arch/arm/mach-socfpga/clock_manager_s10.c
index 05e42127b57b..642dcbb0ac04 100644
--- a/arch/arm/mach-socfpga/clock_manager_s10.c
+++ b/arch/arm/mach-socfpga/clock_manager_s10.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/handoff_s10.h>
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index f30e7f80a294..82dfcd124ca8 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hang.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mailbox_s10.h>
 #include <asm/arch/system_manager.h>
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index ac2b891fadea..64a7c9d652c7 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <asm/cache.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 7209e8d6db78..4edf4f9b5c16 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <env.h>
 #include <errno.h>
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index 670bfa1a31fd..733856c33c16 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
diff --git a/arch/arm/mach-socfpga/mmu-arm64_s10.c b/arch/arm/mach-socfpga/mmu-arm64_s10.c
index 670ceb92ae3d..a55b7b7cf3b5 100644
--- a/arch/arm/mach-socfpga/mmu-arm64_s10.c
+++ b/arch/arm/mach-socfpga/mmu-arm64_s10.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/reset_manager_arria10.c b/arch/arm/mach-socfpga/reset_manager_arria10.c
index aa5299415a74..27c030801134 100644
--- a/arch/arm/mach-socfpga/reset_manager_arria10.c
+++ b/arch/arm/mach-socfpga/reset_manager_arria10.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2016-2017 Intel Corporation
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/misc.h>
diff --git a/arch/arm/mach-socfpga/reset_manager_s10.c b/arch/arm/mach-socfpga/reset_manager_s10.c
index c7430777b28e..81e4c67fba61 100644
--- a/arch/arm/mach-socfpga/reset_manager_s10.c
+++ b/arch/arm/mach-socfpga/reset_manager_s10.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index 45aea4ab6cc3..92231b5ba3c6 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/pl310.h>
 #include <asm/u-boot.h>
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index bd971ecbd1dc..9871d1b6c8bc 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -6,6 +6,7 @@
 
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index 5a7c5ef76d5d..7c716117685c 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index b3c6f6afc442..cbffa6699368 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/system_manager_s10.c b/arch/arm/mach-socfpga/system_manager_s10.c
index cdda881efd71..c123cc96445d 100644
--- a/arch/arm/mach-socfpga/system_manager_s10.c
+++ b/arch/arm/mach-socfpga/system_manager_s10.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/system_manager.h>
 
diff --git a/arch/arm/mach-stm32mp/boot_params.c b/arch/arm/mach-stm32mp/boot_params.c
index 37ee9e1612c2..c4fba9e33af3 100644
--- a/arch/arm/mach-stm32mp/boot_params.c
+++ b/arch/arm/mach-stm32mp/boot_params.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <asm/sections.h>
 #include <asm/system.h>
+#include <linux/libfdt.h>
 
 /*
  * Force data-section, as .bss will not be valid
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index ec3355d81605..74711c0c756d 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -11,6 +11,7 @@
 #include <mmc.h>
 #include <part.h>
 #include <asm/arch/stm32mp1_smc.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <jffs2/load_kernel.h>
 #include <linux/list.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 8aad4be467e7..0150d2d5412b 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <serial.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index b7fcee2b3679..469c5b704e4a 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <misc.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/bsec.h>
 #include <asm/arch/stm32.h>
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 0e8ce63f4a29..611e0ff0eb70 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -10,6 +10,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <ram.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c
index 0de1d8229122..9dbc595cc4f8 100644
--- a/arch/arm/mach-stm32mp/fdt.c
+++ b/arch/arm/mach-stm32mp/fdt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdtdec.h>
 #include <fdt_support.h>
 #include <log.h>
 #include <tee.h>
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index e84bdad7bfc0..ab467de231ab 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <spl.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/libfdt.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 03faacbd5772..ecdfcdde921a 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -12,6 +12,7 @@
 #include <ns16550.h>
 #include <spl.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #if IS_ENABLED(CONFIG_TEGRA_CLKRST)
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 48c4f32d6f98..66376dd39a2e 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <ns16550.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/board.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 16c4cf306ec8..bb46fb23ff79 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <stdlib.h>
 #include <string.h>
+#include <asm/global_data.h>
 
 #include <linux/ctype.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-tegra/emc.c b/arch/arm/mach-tegra/emc.c
index 66628933b653..2eea14b5a744 100644
--- a/arch/arm/mach-tegra/emc.c
+++ b/arch/arm/mach-tegra/emc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include "emc.h"
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index cdc8493efd8e..93db63e104a1 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #include <linux/arm-smccc.h>
 
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index 38afc3cbe6de..c95ca048d5e1 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-tegra/tegra20/warmboot.c b/arch/arm/mach-tegra/tegra20/warmboot.c
index ddde4a667726..3d3758f6e6f4 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index d160ce4c999e..c414dfd3b86f 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 8c5e5bb58f65..b33c4b19389b 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <init.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <stdio.h>
 #include <linux/printk.h>
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index b1e34796d0d1..249e050cc8d6 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 61c0b663fcfe..a35aac2c02c2 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-versal/mp.c b/arch/arm/mach-versal/mp.c
index 4b434b0ac3f7..c97c311d3130 100644
--- a/arch/arm/mach-versal/mp.c
+++ b/arch/arm/mach-versal/mp.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 1ace117fc8e5..9bab393e2112 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <asm/arch/clk.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index cc0e24cbfede..08cb4406cc35 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -34,6 +34,7 @@
 #include <init.h>
 #include <time.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
index b3402d718950..b95749978595 100644
--- a/arch/arm/mach-zynqmp-r5/cpu.c
+++ b/arch/arm/mach-zynqmp-r5/cpu.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/armv7_mpu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index 5067b339c218..1e6e726e8792 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -10,6 +10,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 3eb8e8f44875..29743cae5aab 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -11,6 +11,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
index 5ea6158c8094..a7adf64f0de0 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5227x/speed.c b/arch/m68k/cpu/mcf5227x/speed.c
index 207f4534807e..fa9d5cb7887c 100644
--- a/arch/m68k/cpu/mcf5227x/speed.c
+++ b/arch/m68k/cpu/mcf5227x/speed.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 8664231b5a14..8d3ab6f3fb25 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf523x/speed.c b/arch/m68k/cpu/mcf523x/speed.c
index 2f65ac23182c..f41f977d7f5f 100644
--- a/arch/m68k/cpu/mcf523x/speed.c
+++ b/arch/m68k/cpu/mcf523x/speed.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 8898a7562adf..0676e3914105 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -19,6 +19,7 @@
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/arch/m68k/cpu/mcf52x2/speed.c b/arch/m68k/cpu/mcf52x2/speed.c
index 751c83a4fc08..045908a13d40 100644
--- a/arch/m68k/cpu/mcf52x2/speed.c
+++ b/arch/m68k/cpu/mcf52x2/speed.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf530x/speed.c b/arch/m68k/cpu/mcf530x/speed.c
index cf53dfeb150a..03d9abeb182b 100644
--- a/arch/m68k/cpu/mcf530x/speed.c
+++ b/arch/m68k/cpu/mcf530x/speed.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap.h>
 
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index f1e6f734eb44..d37dd3defb73 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf532x/speed.c b/arch/m68k/cpu/mcf532x/speed.c
index 0f54ea4b6a8b..e2985792d96f 100644
--- a/arch/m68k/cpu/mcf532x/speed.c
+++ b/arch/m68k/cpu/mcf532x/speed.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index ebe15ca518c4..ac1e59168161 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5445x/speed.c b/arch/m68k/cpu/mcf5445x/speed.c
index eaa3b39bec69..a0b9af8866b3 100644
--- a/arch/m68k/cpu/mcf5445x/speed.c
+++ b/arch/m68k/cpu/mcf5445x/speed.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index e53adeb46b55..c1361e705799 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 33b4cff4ec72..dc076fc6e814 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <irq_func.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/timer.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/speed.c b/arch/m68k/cpu/mcf547x_8x/speed.c
index bc22560ed2cf..bbcf601f38fb 100644
--- a/arch/m68k/cpu/mcf547x_8x/speed.c
+++ b/arch/m68k/cpu/mcf547x_8x/speed.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h
index 9e84fb9d260c..9551e047d02a 100644
--- a/arch/m68k/include/asm/immap.h
+++ b/arch/m68k/include/asm/immap.h
@@ -30,6 +30,7 @@
 
 #define CONFIG_SYS_INTR_BASE		(MMAP_INTC0)
 #define CONFIG_SYS_NUM_IRQS		(128)
+#include <asm/global_data.h>
 #endif				/* CONFIG_M520x */
 
 #ifdef CONFIG_M52277
diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c
index 404e5f19ed82..9ec56fd3418f 100644
--- a/arch/m68k/lib/bdinfo.c
+++ b/arch/m68k/lib/bdinfo.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 320451144fd3..51a6f938586d 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <lmb.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
diff --git a/arch/m68k/lib/fec.c b/arch/m68k/lib/fec.c
index dde353ad17fd..eecea7a02354 100644
--- a/arch/m68k/lib/fec.c
+++ b/arch/m68k/lib/fec.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index a3eb6db54be7..cbe29e72a86e 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/timer.h>
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index 829ae26ad274..fe65f3728fdb 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -13,6 +13,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/microblaze_intc.h>
 #include <asm/asm.h>
 
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index 1b4617311c57..647bdcd5ba52 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/microblaze_timer.h>
 #include <asm/microblaze_intc.h>
 #include <linux/delay.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index d2ea1453be04..6695ac63c774 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -18,6 +18,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 7c40e415c74f..d3ad66930131 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -16,6 +16,7 @@
 #include <asm/addrspace.h>
 #include <asm/byteorder.h>
 #include <asm/cpu-features.h>
+#include <asm/global_data.h>
 #include <asm/pgtable-bits.h>
 #include <asm/processor.h>
 #include <asm/string.h>
diff --git a/arch/mips/lib/boot.c b/arch/mips/lib/boot.c
index db862f637925..d5a139ef5ec2 100644
--- a/arch/mips/lib/boot.c
+++ b/arch/mips/lib/boot.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 0a13f6edb755..c28bca1bbb89 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -12,6 +12,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <asm/addrspace.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index cf29994a7ae8..51a8f4334750 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -9,6 +9,7 @@
 #include <asm/cache.h>
 #include <asm/cacheops.h>
 #include <asm/cm.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mipsregs.h>
 #include <asm/system.h>
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 67c8af2f35a5..c1c04bc08e86 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -29,6 +29,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/relocs.h>
 #include <asm/sections.h>
 #include <linux/bitops.h>
diff --git a/arch/mips/lib/stack.c b/arch/mips/lib/stack.c
index 8f523fd6fb75..930d21856d90 100644
--- a/arch/mips/lib/stack.c
+++ b/arch/mips/lib/stack.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index df8b63f383b8..7c2fdf4a1a9d 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <cpu_func.h>
 #include <hang.h>
diff --git a/arch/mips/mach-ath79/ar933x/clk.c b/arch/mips/mach-ath79/ar933x/clk.c
index 3feb25ce71df..68d48939d7d2 100644
--- a/arch/mips/mach-ath79/ar933x/clk.c
+++ b/arch/mips/mach-ath79/ar933x/clk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 9fa2225ed2be..6ed4057353a8 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -7,6 +7,7 @@
 #include <clock_legacy.h>
 #include <command.h>
 #include <hang.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 218f60a96cce..9df48b97ef46 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/cpu.c b/arch/mips/mach-ath79/cpu.c
index 31e87d620603..ed190e8f9b02 100644
--- a/arch/mips/mach-ath79/cpu.c
+++ b/arch/mips/mach-ath79/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/dram.c b/arch/mips/mach-ath79/dram.c
index 1abe2a49e661..545b1199e106 100644
--- a/arch/mips/mach-ath79/dram.c
+++ b/arch/mips/mach-ath79/dram.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/addrspace.h>
 #include <mach/ddr.h>
diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
index 0fde5079b167..2eda38885e36 100644
--- a/arch/mips/mach-ath79/include/mach/ath79.h
+++ b/arch/mips/mach-ath79/include/mach/ath79.h
@@ -11,6 +11,7 @@
 #ifndef __ASM_MACH_ATH79_H
 #define __ASM_MACH_ATH79_H
 
+#include <asm/global_data.h>
 #include <linux/types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/mach-ath79/qca953x/clk.c b/arch/mips/mach-ath79/qca953x/clk.c
index d450ad865233..f5438ef1c8d9 100644
--- a/arch/mips/mach-ath79/qca953x/clk.c
+++ b/arch/mips/mach-ath79/qca953x/clk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c
index 5adf6cd8159b..6a58dba91f3f 100644
--- a/arch/mips/mach-ath79/qca956x/clk.c
+++ b/arch/mips/mach-ath79/qca956x/clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca956x/ddr.c b/arch/mips/mach-ath79/qca956x/ddr.c
index e61a368141ba..f9cf8daa2242 100644
--- a/arch/mips/mach-ath79/qca956x/ddr.c
+++ b/arch/mips/mach-ath79/qca956x/ddr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
index a772a655d921..bba6cd6f4aaf 100644
--- a/arch/mips/mach-bmips/dram.c
+++ b/arch/mips/mach-bmips/dram.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <ram.h>
 #include <dm.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index 26fcfc842c28..43f5651f8326 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -12,6 +12,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/sections.h>
 #include <mach/jz4780.h>
diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
index b4ffd44ea441..5bc31006aa15 100644
--- a/arch/mips/mach-mscc/cpu.c
+++ b/arch/mips/mach-mscc/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 #include <asm/io.h>
diff --git a/arch/mips/mach-mscc/dram.c b/arch/mips/mach-mscc/dram.c
index b12bac63c27d..c53a4202e0d9 100644
--- a/arch/mips/mach-mscc/dram.c
+++ b/arch/mips/mach-mscc/dram.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
index 2ddf8cb0967e..76ad4f632058 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/arch/mips/mach-mtmips/ddr_cal.c b/arch/mips/mach-mtmips/ddr_cal.c
index 71a53c3c9cbf..762619a960f3 100644
--- a/arch/mips/mach-mtmips/ddr_cal.c
+++ b/arch/mips/mach-mtmips/ddr_cal.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/addrspace.h>
 #include <asm/cacheops.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <mach/mc.h>
diff --git a/arch/mips/mach-mtmips/mt7628/ddr.c b/arch/mips/mach-mtmips/mt7628/ddr.c
index 3df85cd144a3..b091f2ecffc7 100644
--- a/arch/mips/mach-mtmips/mt7628/ddr.c
+++ b/arch/mips/mach-mtmips/mt7628/ddr.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/addrspace.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
diff --git a/arch/mips/mach-mtmips/mt7628/init.c b/arch/mips/mach-mtmips/mt7628/init.c
index 77d1f2ea0dc5..27241050aaf5 100644
--- a/arch/mips/mach-mtmips/mt7628/init.c
+++ b/arch/mips/mach-mtmips/mt7628/init.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt7628-clk.h>
 #include <linux/io.h>
diff --git a/arch/mips/mach-mtmips/spl.c b/arch/mips/mach-mtmips/spl.c
index 38d9e9160d2e..95201b8d7ab2 100644
--- a/arch/mips/mach-mtmips/spl.c
+++ b/arch/mips/mach-mtmips/spl.c
@@ -6,10 +6,10 @@
  */
 
 #include <common.h>
-#include <fdt.h>
 #include <init.h>
 #include <spl.h>
 #include <asm/sections.h>
+#include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <mach/serial.h>
 
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 1d8c39714411..eac2fe5f8c94 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <mach/pic32.h>
 #include <mach/ddr.h>
 #include <dt-bindings/clock/microchip,clock.h>
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index e552a3423005..b3b8bc290378 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -12,6 +12,7 @@
 #include <hang.h>
 #include <image.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/bootm.h>
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index e7ca9882fc58..b55c8fbc5841 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 41e6bd4ee104..817cd72e00bd 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -7,6 +7,8 @@
 #ifndef __ASM_NIOS2_IO_H_
 #define __ASM_NIOS2_IO_H_
 
+#include <asm/global_data.h>
+
 static inline void sync(void)
 {
 	__asm__ __volatile__ ("sync" : : : "memory");
@@ -170,5 +172,6 @@ static inline void outsl (unsigned long port, const void *src, unsigned long cou
 #define memcpy_toio(a, b, c)		memcpy((void *)(a), (b), (c))
 
 #include <asm-generic/io.h>
+#include <asm/global_data.h>
 
 #endif /* __ASM_NIOS2_IO_H_ */
diff --git a/arch/nios2/lib/cache.c b/arch/nios2/lib/cache.c
index 0b961ac67620..5864d8f0f473 100644
--- a/arch/nios2/lib/cache.c
+++ b/arch/nios2/lib/cache.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 843f2df649ec..8d531898bd89 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -18,6 +18,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 438b14b162eb..8793639e20e8 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -7,6 +7,7 @@
 #include <asm-offsets.h>
 #include <mpc83xx.h>
 #include <ioports.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #ifdef CONFIG_USB_EHCI_FSL
diff --git a/arch/powerpc/cpu/mpc83xx/fdt.c b/arch/powerpc/cpu/mpc83xx/fdt.c
index ebdedb28889c..707838ac9abb 100644
--- a/arch/powerpc/cpu/mpc83xx/fdt.c
+++ b/arch/powerpc/cpu/mpc83xx/fdt.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 05380674dc74..f9486678af33 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <irq_func.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index d057cd6351c1..5c289d002260 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <pci.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_OF_LIBFDT)
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c
index 785d4805a469..84797c871c95 100644
--- a/arch/powerpc/cpu/mpc83xx/pcie.c
+++ b/arch/powerpc/cpu/mpc83xx/pcie.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <pci.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index aeff007fb063..a861e8dd2ddc 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -24,6 +24,7 @@
 #include <asm/mmu.h>
 #include <spd_sdram.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index 5c14aa1f32e7..58e197f12082 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -13,6 +13,7 @@
 #include <mpc83xx.h>
 #include <command.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index 2c61f2b81dbf..00cb2bd044ef 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -8,6 +8,7 @@
 #include <clock_legacy.h>
 #include <mpc83xx.h>
 #include <time.h>
+#include <asm/global_data.h>
 
 #include "lblaw/lblaw.h"
 #include "elbc/elbc.h"
diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index c3cc119d6542..74781126e947 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <command.h>
 #include <kgdb.h>
diff --git a/arch/powerpc/cpu/mpc85xx/commproc.c b/arch/powerpc/cpu/mpc85xx/commproc.c
index 95215a0b8292..8e8427a08bbe 100644
--- a/arch/powerpc/cpu/mpc85xx/commproc.c
+++ b/arch/powerpc/cpu/mpc85xx/commproc.c
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <asm-offsets.h>
 #include <asm/cpm_85xx.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 3ff1ef45658b..5170610f0413 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -20,6 +20,7 @@
 #include <command.h>
 #include <fsl_esdhc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <fsl_ifc.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index c519e8bd4b03..4195ecc5c98f 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm-offsets.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 9569c1a64b81..08331f4c6494 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 8822cf29fefd..653efe09f935 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <env.h>
 #include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc85xx/serial_scc.c b/arch/powerpc/cpu/mpc85xx/serial_scc.c
index a5c418570fa2..a2505d1ffc1d 100644
--- a/arch/powerpc/cpu/mpc85xx/serial_scc.c
+++ b/arch/powerpc/cpu/mpc85xx/serial_scc.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <asm/cpm_85xx.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 773ae08dd3b7..09653c70125f 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <ppc_asm.tmpl>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 4465ae7565a4..973b6fbe4b74 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #ifdef CONFIG_ADDR_MAP
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index f37a45e2694e..080451ec567c 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <command.h>
 #include <init.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index 9f5bce3992b8..98b42bff7a3b 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -13,6 +13,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <mpc86xx.h>
 #include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c
index a17091d2ff8c..73779f862c2a 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <init.h>
 #include <mpc86xx.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index 08d11ad4f2e5..e6795e06c98b 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc86xx/speed.c b/arch/powerpc/cpu/mpc86xx/speed.c
index 500144586229..86c1709c4ca2 100644
--- a/arch/powerpc/cpu/mpc86xx/speed.c
+++ b/arch/powerpc/cpu/mpc86xx/speed.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <mpc86xx.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index c0161e3379cc..0d258b3a97f8 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <command.h>
 #include <init.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 7c93e35003ff..893aecef21c2 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -27,6 +27,7 @@
 #include <netdev.h>
 #include <asm/cache.h>
 #include <asm/cpm_8xx.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 
diff --git a/arch/powerpc/cpu/mpc8xx/fdt.c b/arch/powerpc/cpu/mpc8xx/fdt.c
index 4d952a3882f0..75aef758f06f 100644
--- a/arch/powerpc/cpu/mpc8xx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xx/fdt.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index e5b62e9f4acf..40793c26e120 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <asm/global_data.h>
 
 #include <asm/immap_8xx.h>
 #include <asm/cpm_8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 77d4f8e47f74..ad3d3f9101cc 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <mpc8xx.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index 2b24e755faa4..560488be22e7 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -17,6 +17,7 @@
 #include <fm_eth.h>
 #include <netdev.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <vsc9953.h>
 
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index e388386ad42e..cf03f4101906 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index 7dd71d2e0c4a..d917e9dfb62f 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/fsl_pamu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/lib/bat_rw.c b/arch/powerpc/lib/bat_rw.c
index ac56e3aeddba..24dd30615bd3 100644
--- a/arch/powerpc/lib/bat_rw.c
+++ b/arch/powerpc/lib/bat_rw.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/lib/bdinfo.c b/arch/powerpc/lib/bdinfo.c
index 36c9c99ee6ff..39062804ccfe 100644
--- a/arch/powerpc/lib/bdinfo.c
+++ b/arch/powerpc/lib/bdinfo.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 8c8ed99cd341..cf3e3fd8409d 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <asm/byteorder.h>
diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
index 5840fe63490f..f2a4652e081d 100644
--- a/arch/powerpc/lib/stack.c
+++ b/arch/powerpc/lib/stack.c
@@ -12,6 +12,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/cpu/fu540/cache.c b/arch/riscv/cpu/fu540/cache.c
index 54de14238cc6..714b405e843e 100644
--- a/arch/riscv/cpu/fu540/cache.c
+++ b/arch/riscv/cpu/fu540/cache.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/arch/riscv/cpu/fu540/dram.c b/arch/riscv/cpu/fu540/dram.c
index 1dc77efeca55..cec130ec8dc6 100644
--- a/arch/riscv/cpu/fu540/dram.c
+++ b/arch/riscv/cpu/fu540/dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c
index 1dc77efeca55..cec130ec8dc6 100644
--- a/arch/riscv/cpu/generic/dram.c
+++ b/arch/riscv/cpu/generic/dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index c2a8fe4d9e9b..5d310d137b71 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/riscv/lib/andes_plmt.c b/arch/riscv/lib/andes_plmt.c
index a7e90ca992c6..c453d9042c8f 100644
--- a/arch/riscv/lib/andes_plmt.c
+++ b/arch/riscv/lib/andes_plmt.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/syscon.h>
 #include <linux/err.h>
diff --git a/arch/riscv/lib/asm-offsets.c b/arch/riscv/lib/asm-offsets.c
index 7301c1b98e23..f1fe089b3d8f 100644
--- a/arch/riscv/lib/asm-offsets.c
+++ b/arch/riscv/lib/asm-offsets.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/kbuild.h>
 
 int main(void)
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index c4137ded834b..8dd18205403c 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <hang.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/root.h>
 #include <image.h>
 #include <asm/byteorder.h>
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
index 5b2420243fcc..8c11b8a99e38 100644
--- a/arch/riscv/lib/fdt_fixup.c
+++ b/arch/riscv/lib/fdt_fixup.c
@@ -10,6 +10,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 91b7f1624e9f..47f2edcf7fc2 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <mapmem.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <linux/stddef.h>
 
diff --git a/arch/riscv/lib/sifive_clint.c b/arch/riscv/lib/sifive_clint.c
index b9a2c649cc45..97b7169a02cf 100644
--- a/arch/riscv/lib/sifive_clint.c
+++ b/arch/riscv/lib/sifive_clint.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/syscon.h>
 #include <linux/err.h>
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index ac22136314f6..c79d2a28d04d 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <asm/barrier.h>
+#include <asm/global_data.h>
 #include <asm/smp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index e24ec5a46c08..448d4da6a80a 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/smp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index fb857e53d592..edd48e2c1b74 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <os.h>
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 7ab8919eb909..17a3507406cd 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <os.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/spl.h>
 #include <asm/state.h>
 
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index c6a2bbe46899..c50d14eaf229 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -11,6 +11,7 @@
 #include <cli.h>
 #include <sort.h>
 #include <asm/getopt.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/malloc.h>
 #include <asm/sections.h>
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
index a6a8f07e6f26..3fa093a02ea3 100644
--- a/arch/sh/lib/board.c
+++ b/arch/sh/lib/board.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index 9f32f2e27e12..a52bc288617d 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -18,6 +18,7 @@
 #include <asm/cpu_common.h>
 #include <asm/cpu_x86.h>
 #include <asm/fast_spi.h>
+#include <asm/global_data.h>
 #include <asm/intel_pinctrl.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index e54b0ac10471..a4e1c511614a 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <p2sb.h>
 #include <acpi/acpi_s3.h>
+#include <asm/global_data.h>
 #include <asm/intel_pinctrl.h>
 #include <asm/io.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index 21816ce5b883..fb3f946c45f9 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 9e710a940cad..243298fd5718 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -7,6 +7,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index b77301118cdf..3832a97f2c73 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/lpc_common.h>
 #include <asm/msr.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index 6567d506533f..6cede74a8299 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -11,6 +11,7 @@
 #include <handoff.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mtrr.h>
 
 int misc_init_r(void)
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 706f68f63d65..4debddce8ada 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -13,6 +13,7 @@
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/msr.h>
 #include <asm/post.h>
diff --git a/arch/x86/cpu/broadwell/lpc.c b/arch/x86/cpu/broadwell/lpc.c
index 5669a028cf34..d2638a4e7a6b 100644
--- a/arch/x86/cpu/broadwell/lpc.c
+++ b/arch/x86/cpu/broadwell/lpc.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <pch.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/broadwell/northbridge.c b/arch/x86/cpu/broadwell/northbridge.c
index 4bcab785560f..141babc51c3a 100644
--- a/arch/x86/cpu/broadwell/northbridge.c
+++ b/arch/x86/cpu/broadwell/northbridge.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mrc_common.h>
 #include <asm/arch/iomap.h>
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index 9bcf211af99c..f012db9debe8 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <pch.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/i8259.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index 0ead13af62aa..85bd37101ba2 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -11,6 +11,7 @@
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index 641da515c8f3..27d6bf706e2f 100644
--- a/arch/x86/cpu/broadwell/sata.c
+++ b/arch/x86/cpu/broadwell/sata.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index 72f59a0a5734..c104a849a545 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -12,6 +12,7 @@
 #include <pci.h>
 #include <syscon.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/lpc_common.h>
 #include <asm/mrccache.h>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 22a93254a939..15c3ad879a00 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <init.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/msr.h>
 #include <asm/mtrr.h>
diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c
index 27e859885e8c..a2e47d196a2e 100644
--- a/arch/x86/cpu/coreboot/sdram.c
+++ b/arch/x86/cpu/coreboot/sdram.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <asm/e820.h>
 #include <asm/arch/sysinfo.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
index 1594b4a8b2ab..c52741ac9da6 100644
--- a/arch/x86/cpu/coreboot/tables.c
+++ b/arch/x86/cpu/coreboot/tables.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <net.h>
 #include <asm/arch/sysinfo.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 69c14189d1f2..078607a435c1 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -35,6 +35,7 @@
 #include <asm/control_regs.h>
 #include <asm/coreboot_tables.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/lapic.h>
 #include <asm/microcode.h>
 #include <asm/mp.h>
diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c
index 7e83051646cc..dc7c8116d040 100644
--- a/arch/x86/cpu/cpu_x86.c
+++ b/arch/x86/cpu/cpu_x86.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 71619f6f01b5..9a73b768e9b8 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -13,6 +13,7 @@
 #include <usb.h>
 #include <asm/bootparam.h>
 #include <asm/e820.h>
+#include <asm/global_data.h>
 #include <asm/post.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c
index 3143c079adbd..af65982fd0c0 100644
--- a/arch/x86/cpu/efi/sdram.c
+++ b/arch/x86/cpu/efi/sdram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <efi.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/u-boot-x86.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 8f342dd06e25..7f6b1a93e1bb 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -27,6 +27,7 @@
 #include <asm/control_regs.h>
 #include <asm/coreboot_tables.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/mp.h>
 #include <asm/msr.h>
 #include <asm/mtrr.h>
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index c0c4bc95fd9a..67a72146de8a 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -18,6 +18,7 @@
 #include <irq.h>
 #include <irq_func.h>
 #include <asm/control_regs.h>
+#include <asm/global_data.h>
 #include <asm/i8259.h>
 #include <asm/interrupt.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index 509730aea965..3a4fd35cff17 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/lapic.h>
 #include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index e4157c5734c5..1c0dcedb5824 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -9,6 +9,7 @@
 #include <handoff.h>
 #include <init.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/lapic.h>
 #include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index fe84ebe29f78..2f47bfe20e71 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <p2sb.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/itss.h>
 
 struct itss_platdata {
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 3420f03ccaa2..23befbef15ff 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <pch.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/lpc_common.h>
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index 0355d3c1da69..4d8e1d210838 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <asm/cpu.h>
 #include <asm/microcode.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 73bfd123321f..a97b0b7ceb41 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <syscon.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/intel_regs.h>
 #include <asm/mrc_common.h>
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 836a0e8b86e5..001c8913fadb 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -10,6 +10,7 @@
 #include <irq.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 5448f064fcbf..0540b021618f 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <pch.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index cb6eded9c98d..bddba3eddecd 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -20,6 +20,7 @@
 #include <pch.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/cpu/ivybridge/fsp_configs.c b/arch/x86/cpu/ivybridge/fsp_configs.c
index 41d7d2a2b420..3c4ea6c267f8 100644
--- a/arch/x86/cpu/ivybridge/fsp_configs.c
+++ b/arch/x86/cpu/ivybridge/fsp_configs.c
@@ -7,6 +7,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/fsp1/fsp_support.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index 85fd2a965abd..f931d2be1b52 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/interrupt.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 55f7cc2b2ecc..788e589b26d7 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -15,6 +15,7 @@
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
 #include <asm/cpu_x86.h>
+#include <asm/global_data.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/mtrr.h>
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index b713fcb1cfe7..994f8a4ff6a5 100644
--- a/arch/x86/cpu/ivybridge/northbridge.c
+++ b/arch/x86/cpu/ivybridge/northbridge.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/msr.h>
 #include <asm/cpu.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/ivybridge/sata.c b/arch/x86/cpu/ivybridge/sata.c
index 025b20be31bd..f47ecdffae76 100644
--- a/arch/x86/cpu/ivybridge/sata.c
+++ b/arch/x86/cpu/ivybridge/sata.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/pch_common.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
index 54e6acf26211..51dfe23f94d0 100644
--- a/arch/x86/cpu/ivybridge/sdram_nop.c
+++ b/arch/x86/cpu/ivybridge/sdram_nop.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index d2f1ee38cf02..03bd71c261ab 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -14,6 +14,7 @@
 #include <qfw.h>
 #include <asm/atomic.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/interrupt.h>
 #include <asm/io.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 2468d88a80ab..44a6f5c8124e 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -20,6 +20,7 @@
 #include <cpu_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mp.h>
 #include <asm/msr.h>
diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c
index 19d92f27d80c..c1745501294c 100644
--- a/arch/x86/cpu/qemu/dram.c
+++ b/arch/x86/cpu/qemu/dram.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/post.h>
 #include <asm/arch/qemu.h>
 
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c
index 0da36bddeaec..19e54c5202a9 100644
--- a/arch/x86/cpu/qemu/e820.c
+++ b/arch/x86/cpu/qemu/e820.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <asm/e820.h>
 #include <asm/arch/qemu.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/quark/acpi.c b/arch/x86/cpu/quark/acpi.c
index b0406a04e92b..82b776ff65f6 100644
--- a/arch/x86/cpu/quark/acpi.c
+++ b/arch/x86/cpu/quark/acpi.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <acpi/acpi_table.h>
+#include <asm/processor.h>
 #include <asm/tables.h>
 #include <asm/arch/global_nvs.h>
 #include <asm/arch/iomap.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 72937139ed73..2287dce12b52 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/mrccache.h>
 #include <asm/mtrr.h>
 #include <asm/post.h>
diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c
index 33e91fb6366b..36d0d4da5531 100644
--- a/arch/x86/cpu/slimbootloader/sdram.c
+++ b/arch/x86/cpu/slimbootloader/sdram.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/e820.h>
 #include <asm/arch/slimbootloader.h>
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index 9813f7977b53..8b84565ce62f 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -9,6 +9,7 @@
 #include <ns16550.h>
 #include <serial.h>
 #include <asm/arch/slimbootloader.h>
+#include <asm/global_data.h>
 
 /**
  * The serial port info hob is generated by Slim Bootloader, so eligible for
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index f61fe814e94a..ec5b87cfd63f 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/arch/slimbootloader.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/turbo.c b/arch/x86/cpu/turbo.c
index f8d85d5a339b..cbb10a003201 100644
--- a/arch/x86/cpu/turbo.c
+++ b/arch/x86/cpu/turbo.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/turbo.h>
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 1b4d3971b043..740851f24f3c 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 /*
  * Global declaration of gd.
diff --git a/arch/x86/include/asm/cpu_common.h b/arch/x86/include/asm/cpu_common.h
index cdd99a90b768..4a782a22956d 100644
--- a/arch/x86/include/asm/cpu_common.h
+++ b/arch/x86/include/asm/cpu_common.h
@@ -14,6 +14,7 @@ enum {
 };
 
 struct cpu_info;
+struct udevice;
 
 /**
  * cpu_common_init() - Set up common CPU init
diff --git a/arch/x86/include/asm/fast_spi.h b/arch/x86/include/asm/fast_spi.h
index 7a81d4f05c66..82e3d8f63ef1 100644
--- a/arch/x86/include/asm/fast_spi.h
+++ b/arch/x86/include/asm/fast_spi.h
@@ -6,8 +6,10 @@
 #ifndef ASM_FAST_SPI_H
 #define ASM_FAST_SPI_H
 
-/* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
+#include <pci.h>
 #include <linux/bitops.h>
+
+/* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
 struct fast_spi_regs {
 	u32 bfp;
 	u32 hsfsts_ctl;
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index cf6c33cbe3af..83dc09757e0c 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -7,7 +7,7 @@
 #ifndef _ASM_IO_H
 #define _ASM_IO_H
 
-#include <linux/compiler.h>
+#include <compiler.h>
 
 /*
  * This file contains the definitions for the x86 IO instructions
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index 5f9b8c656432..25edabbdd399 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -11,6 +11,8 @@
 #include <asm/atomic.h>
 #include <asm/cache.h>
 
+struct udevice;
+
 enum {
 	/* Indicates that the function should run on all CPUs */
 	MP_SELECT_ALL	= -1,
diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
index 52410a515dfa..2c70acbe7b0b 100644
--- a/arch/x86/lib/acpi_s3.c
+++ b/arch/x86/lib/acpi_s3.c
@@ -7,6 +7,7 @@
 #include <acpi/acpi_s3.h>
 #include <acpi/acpi_table.h>
 #include <asm/acpi.h>
+#include <asm/global_data.h>
 #include <asm/post.h>
 #include <linux/linkage.h>
 
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 3a93fedfc3e9..c574f0c62304 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -10,6 +10,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/uclass-internal.h>
 #include <mapmem.h>
 #include <serial.h>
diff --git a/arch/x86/lib/asm-offsets.c b/arch/x86/lib/asm-offsets.c
index 47b38cd9e782..8df67db65c39 100644
--- a/arch/x86/lib/asm-offsets.c
+++ b/arch/x86/lib/asm-offsets.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/kbuild.h>
 
 int main(void)
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 3ab432e2623c..fbdc3b04e361 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -6,6 +6,7 @@
  * Copyright (C) 2009-2010 coresystems GmbH
  */
 #include <common.h>
+#include <compiler.h>
 #include <bios_emul.h>
 #include <irq_func.h>
 #include <log.h>
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 1198a52ecac3..b255144318cd 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <hang.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/root.h>
 #include <errno.h>
diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c
index baaf3d13ad4b..4facbe5f32fb 100644
--- a/arch/x86/lib/cmd_boot.c
+++ b/arch/x86/lib/cmd_boot.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/u-boot-x86.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index 6cd324430121..6eab0452fda6 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -10,6 +10,7 @@
 #include <acpi/acpi_s3.h>
 #include <asm/coreboot_tables.h>
 #include <asm/e820.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c
index 1f20c5c8c6bb..12fcff123805 100644
--- a/arch/x86/lib/e820.c
+++ b/arch/x86/lib/e820.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <asm/e820.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index ea5295472546..82f7d3ab5f0d 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -13,6 +13,7 @@
 #include <acpi/acpi_s3.h>
 #include <asm/cmos_layout.h>
 #include <asm/early_cmos.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mrccache.h>
 #include <asm/post.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index faa819fab4b7..9b796ba4f4ea 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/e820.h>
+#include <asm/global_data.h>
 #include <asm/mrccache.h>
 #include <asm/mtrr.h>
 #include <asm/post.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index e8c1e07af1cb..32995e2df60e 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -10,6 +10,7 @@
 #include <vbe.h>
 #include <video.h>
 #include <asm/fsp/fsp_support.h>
+#include <asm/global_data.h>
 #include <asm/mtrr.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index da351cf097c0..20926171822d 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -13,6 +13,7 @@
 #include <acpi/acpi_s3.h>
 #include <asm/cmos_layout.h>
 #include <asm/early_cmos.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mrccache.h>
 #include <asm/post.h>
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index e3f9e30f6a63..cfd9b9f48c34 100644
--- a/arch/x86/lib/fsp1/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/fsp/fsp_support.h>
+#include <asm/global_data.h>
 
 int dram_init(void)
 {
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index c9f6402e6a4c..c31e2a11b7a2 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -14,6 +14,7 @@
 #include <asm/fsp/fsp_support.h>
 #include <asm/fsp2/fsp_api.h>
 #include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 
 int dram_init(void)
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index ce0b0aff76be..022e2cb64e5a 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -11,6 +11,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mrccache.h>
 #include <asm/fsp/fsp_infoheader.h>
 #include <asm/fsp2/fsp_api.h>
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index 0f221a864fb4..f86dbfa6c63c 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -17,6 +17,7 @@
 #include <asm/arch/fsp/fsp_s_upd.h>
 #include <asm/fsp/fsp_infoheader.h>
 #include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
 
 int fsp_silicon_init(bool s3wake, bool use_spi_flash)
 {
diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index 3f2ca840dc95..bcdf429f06ae 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -10,6 +10,7 @@
 #include <spi_flash.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/fsp2/fsp_internal.h>
+#include <asm/global_data.h>
 
 /* The amount of the FSP header to probe to obtain what we need */
 #define PROBE_BUF_SIZE 0x180
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index d906b528b35b..066dc404a2d8 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/mtrr.h>
 
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 1c49c41b310e..8021d8f75a4a 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/irq.h>
 #include <asm/ioapic.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index f181e8100cb7..b52691568012 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include <asm/mrccache.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index 4578046169a7..c11101b44ece 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <physmem.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index 482599478b80..fd5e311b2916 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.c
@@ -11,6 +11,7 @@
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c
index eb6a7d96de10..caeaec9287fe 100644
--- a/arch/x86/lib/pirq_routing.c
+++ b/arch/x86/lib/pirq_routing.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/pci.h>
 #include <asm/pirq_routing.h>
 
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index ecbd0927e07c..6fe515164773 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <log.h>
 #include <relocate.h>
+#include <asm/global_data.h>
 #include <asm/u-boot-x86.h>
 #include <asm/sections.h>
 #include <elf.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index cf22fa2d7b5f..a220c71b5768 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -17,6 +17,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
+#include <asm/global_data.h>
 #include <asm/mrccache.h>
 #include <asm/mtrr.h>
 #include <asm/pci.h>
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index 7bad5dd30327..730552a0ea55 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <smbios.h>
 #include <acpi/acpi_table.h>
+#include <asm/global_data.h>
 #include <asm/sfi.h>
 #include <asm/mpspec.h>
 #include <asm/tables.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 6f7eb43a1724..789472bc9a2a 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <spl.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/mtrr.h>
 #include <asm/processor.h>
 #include <asm-generic/sections.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 458eaf95c044..b51d329c670b 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/addrspace.h>
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index b52cbd4d8615..3c4a27d63f6a 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -7,6 +7,7 @@
 
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <common.h>
 #include <flash.h>
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index 3dd880f3d6c4..8848b7f97386 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -12,6 +12,7 @@
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index 59a43e4dcc4d..d781038de285 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -12,6 +12,7 @@
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <faraday/ftsmc020.h>
 #include <fdtdec.h>
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index 5416a5b663c1..34660e59f44e 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -20,6 +20,7 @@
 #include <i2c.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index 8aa03eac2838..7df37e4e66ac 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -23,6 +23,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c
index f156b552a761..e6eb403fc3d9 100644
--- a/board/BuR/brppt2/board.c
+++ b/board/BuR/brppt2/board.c
@@ -21,6 +21,7 @@
 # include <asm/arch/mx6-ddr.h>
 #endif
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 
diff --git a/board/BuR/brsmarc1/board.c b/board/BuR/brsmarc1/board.c
index 5b9108a89f91..738a5d2ff944 100644
--- a/board/BuR/brsmarc1/board.c
+++ b/board/BuR/brsmarc1/board.c
@@ -19,6 +19,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/emif.h>
diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c
index 5d57e19fde03..ef692b006d51 100644
--- a/board/BuR/brxre1/board.c
+++ b/board/BuR/brxre1/board.c
@@ -21,6 +21,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 0a5104a48f93..d2d4ea5835bb 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -15,6 +15,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <lcd.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include "bur_common.h"
 
diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index 1d05e40c209b..03a02ffd29c5 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include "asm/m5282.h"
 #include <bmp_layout.h>
 #include <env.h>
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 679f3eb7014c..486680a49e88 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -7,6 +7,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <clk.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 2da878d3648b..0353d58a361b 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -15,6 +15,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index 11fcecb94e57..12c5ac331f97 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <env.h>
 #include <linux/delay.h>
diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index b5ffe8162f32..9c066a283c99 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -11,6 +11,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/orion5x.h>
+#include <asm/global_data.h>
 #include "../common/common.h"
 #include <spl.h>
 #include <ns16550.h>
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index e94c9a6dce96..695d6f6ed470 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -14,6 +14,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index 33246b201528..730eab7e7031 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
index c1406d7489cf..1f9389c0a7ab 100644
--- a/board/Marvell/aspenite/aspenite.c
+++ b/board/Marvell/aspenite/aspenite.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <mvmfp.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
index 62027bd6385e..08f79d4b5320 100644
--- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <miiphy.h>
diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c
index 271535b76376..26c30647fbb0 100644
--- a/board/Marvell/db-88f6720/db-88f6720.c
+++ b/board/Marvell/db-88f6720/db-88f6720.c
@@ -8,6 +8,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
index 9cd9ea2c0689..163a1b3de9d2 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -9,6 +9,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index 2bdd55329d05..06307e582cec 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -9,6 +9,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
index 8d1dbebdb7a6..9e1fdecfca4d 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -8,6 +8,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
index 5f12a27002f0..0abdca1cd210 100644
--- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
+++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/mbus.h>
diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
index 7d188c327955..e1c64b52246b 100644
--- a/board/Marvell/dreamplug/dreamplug.c
+++ b/board/Marvell/dreamplug/dreamplug.c
@@ -15,6 +15,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/global_data.h>
 #include "dreamplug.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index 58e433fd3472..c6376cdf6a94 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -18,6 +18,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
 #include <asm/arch/armada100.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <miiphy.h>
 #include <asm/mach-types.h>
diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index f3981c66d20b..8e7dbb3f3f60 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 9bea1986d4d1..73e2c3723a36 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <phy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c
index 60b002463078..fa27a3521422 100644
--- a/board/Marvell/mvebu_armada-8k/board.c
+++ b/board/Marvell/mvebu_armada-8k/board.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index d9b5b213feab..f44ac3315ebc 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -14,6 +14,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index 6311ed3b2e59..0cc7f2b39243 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 85dd10e55a2c..380e37be5502 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -16,6 +16,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include "dockstar.h"
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index de1ec544667c..4c19fa7195e8 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
index 3a027d083a7b..cd2bbdad1cd6 100644
--- a/board/Seagate/nas220/nas220.c
+++ b/board/Seagate/nas220/nas220.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index aa2987d924f2..bf57ffff4385 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/setup.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
index 632205164ebf..9c4ce670ddfb 100644
--- a/board/Synology/ds414/ds414.c
+++ b/board/Synology/ds414/ds414.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <miiphy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c
index 20820fdf0762..07a47e9fbb04 100644
--- a/board/advantech/dms-ba16/dms-ba16.c
+++ b/board/advantech/dms-ba16/dms-ba16.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index ea057d27cf35..8492e7603b46 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index a2386c9ef005..8493bb01588d 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <spl.h>
 #include <fsl_esdhc.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index 668484b71b6a..d8b9fdfe356f 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
index e4bf507cc3f0..52b8eba92fc1 100644
--- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
+++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
@@ -10,6 +10,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <led.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/alliedtelesis/common/gpio_hog.c b/board/alliedtelesis/common/gpio_hog.c
index 1f87b3ac1b72..4aecf7e2cef7 100644
--- a/board/alliedtelesis/common/gpio_hog.c
+++ b/board/alliedtelesis/common/gpio_hog.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index c7438aeaf148..d602092d7329 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/mbus.h>
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index 7d62a1d5a863..94e396134406 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
 #include <asm/omap_musb.h>
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 14931120f6f6..a28f67a0b13a 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -16,6 +16,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c
index 29e0bf388d07..5e3fdd36fa21 100644
--- a/board/armadeus/apf27/apf27.c
+++ b/board/armadeus/apf27/apf27.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <jffs2/jffs2.h>
 #include <nand.h>
 #include <netdev.h>
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 19871bee1460..a730f15c7a32 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -24,6 +24,7 @@
 #include <init.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include "arm-ebi.h"
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 70f6cd80d5ac..d34c03bf9dd5 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/arch/systimer.h>
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 52ada0f6bce7..6bf2ed23190b 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <dm/platform_data/serial_pl01x.h>
diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c
index e7c2b909300d..3e2f79a1cf4c 100644
--- a/board/astro/mcf5373l/mcf5373l.c
+++ b/board/astro/mcf5373l/mcf5373l.c
@@ -10,6 +10,7 @@
 #include <serial.h>
 #include <watchdog.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include <asm/m5329.h>
 #include <asm/immap_5329.h>
 #include <asm/io.h>
diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
index a18fb275d9f5..1bae2832522f 100644
--- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
+++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
@@ -24,6 +24,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c
index 8844bc754193..a314ced5e4a5 100644
--- a/board/atmel/at91rm9200ek/at91rm9200ek.c
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pio.h>
diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index 42fa7627724e..38f97bce2042 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -9,6 +9,7 @@
 #include <debug_uart.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
index f467a4f566c9..0318eeaa94e9 100644
--- a/board/atmel/at91sam9261ek/at91sam9261ek.c
+++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
@@ -9,6 +9,7 @@
 #include <debug_uart.h>
 #include <init.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9261.h>
 #include <asm/arch/at91sam9261_matrix.h>
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index be132bc185fb..3218e14e860a 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/arch/at91sam9263.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index 8aabc5595196..8cb2808e058a 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/at91sam9g45_matrix.h>
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index d7ff2e13352f..a3fc55bbc34b 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <net.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9x5_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c
index f81dccc9cccb..f427ee658bff 100644
--- a/board/atmel/at91sam9rlek/at91sam9rlek.c
+++ b/board/atmel/at91sam9rlek/at91sam9rlek.c
@@ -9,6 +9,7 @@
 #include <debug_uart.h>
 #include <init.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/arch/at91sam9rl.h>
diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
index 2c071075bac5..e0abe4aeb08b 100644
--- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9x5_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
index 2666b0b3cd5d..a5049f4aad41 100644
--- a/board/atmel/common/video_display.c
+++ b/board/atmel/common/video_display.c
@@ -13,6 +13,7 @@
 #include <video.h>
 #include <video_console.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 
diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c
index fbd05c78a948..32e5a2bf23af 100644
--- a/board/atmel/sam9x60ek/sam9x60ek.c
+++ b/board/atmel/sam9x60ek/sam9x60ek.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
index 376562cd0e7d..1b7d946b50c3 100644
--- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
+++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
index c8c2e9581679..32d51bba7d96 100644
--- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
+++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c
index 7c34df48b871..3f33fcfc4665 100644
--- a/board/atmel/sama5d2_icp/sama5d2_icp.c
+++ b/board/atmel/sama5d2_icp/sama5d2_icp.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
index b0a23b02db2b..a6937e7d5243 100644
--- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
+++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <nand.h>
 #include <version.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 01636fb73d01..5110ec89697f 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
index 84c561be6fc3..db9603f58477 100644
--- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
+++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c
index 7f6a31985920..b6f8dcd91dc0 100644
--- a/board/atmel/sama5d3xek/sama5d3xek.c
+++ b/board/atmel/sama5d3xek/sama5d3xek.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
index 93cc183a5b47..2088b48b7ee2 100644
--- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
+++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c
index 4b3883e20f85..46ec1eb32467 100644
--- a/board/atmel/sama5d4ek/sama5d4ek.c
+++ b/board/atmel/sama5d4ek/sama5d4ek.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index d3af634e3aba..69d1b106b072 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/barco/platinum/platinum.c b/board/barco/platinum/platinum.c
index f96106cb75ed..ec8d55288876 100644
--- a/board/barco/platinum/platinum.c
+++ b/board/barco/platinum/platinum.c
@@ -11,6 +11,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/barco/titanium/titanium.c b/board/barco/titanium/titanium.c
index 7a52e94c7eeb..efd1dc35ef4c 100644
--- a/board/barco/titanium/titanium.c
+++ b/board/barco/titanium/titanium.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
index 86a24dd0658f..c343de510232 100644
--- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c
+++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/rcar-mstp.h>
 
diff --git a/board/beacon/imx8mm/imx8mm_beacon.c b/board/beacon/imx8mm/imx8mm_beacon.c
index c61d25fbead7..87ffebb5713d 100644
--- a/board/beacon/imx8mm/imx8mm_beacon.c
+++ b/board/beacon/imx8mm/imx8mm_beacon.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index 4ee10cf8555e..12266b22a42f 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -6,6 +6,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/arch/clock.h>
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c
index 617b545232a2..a3657db8266c 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/mx5_video.h>
 #include <ACEX1K.h>
 #include <asm/gpio.h>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 739f71f5c4d1..ed0885f724c4 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/setup.h>
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index dc9871d44692..c5c8bcc598e6 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -19,6 +19,7 @@
 #ifndef CONFIG_DM_ETH
 #include <netdev.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c
index 9b0a75ac5dfd..87fb967ea058 100644
--- a/board/bluewater/snapper9260/snapper9260.c
+++ b/board/bluewater/snapper9260/snapper9260.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/mach-types.h>
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 1d8fa781545d..113838f8b723 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -19,6 +19,7 @@
 #include <led.h>
 #include <miiphy.h>
 #include <panel.h>
+#include <asm/global_data.h>
 #include <power/tps65217.h>
 #include <power/tps65910.h>
 #include <spl.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index b8f1b56502e6..bfce291691a0 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -29,6 +29,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 5b2d675a557e..84e14d1124fc 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
index a1e3b25c2e00..90685c072a3b 100644
--- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
+++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <env.h>
diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c
index 79ce54993dd0..43726f79bde3 100644
--- a/board/broadcom/bcm28155_ap/bcm28155_ap.c
+++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <env.h>
diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c
index ad9af92b5591..6064eb43db11 100644
--- a/board/broadcom/bcm_ep/board.c
+++ b/board/broadcom/bcm_ep/board.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <config.h>
 #include <netdev.h>
diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c
index 91f489aad3f2..494e457ff65b 100644
--- a/board/broadcom/bcmns2/northstar2.c
+++ b/board/broadcom/bcmns2/northstar2.c
@@ -6,6 +6,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 
diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c
index 0357cd0e327a..40eda6d465df 100644
--- a/board/broadcom/bcmns3/ns3.c
+++ b/board/broadcom/bcmns3/ns3.c
@@ -8,6 +8,7 @@
 #include <fdt_support.h>
 #include <asm/io.h>
 #include <asm/gic-v3.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 #include <asm/arch-bcmns3/bl33_info.h>
diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c
index add4285db31d..f6bdf1f5f400 100644
--- a/board/broadcom/bcmstb/bcmstb.c
+++ b/board/broadcom/bcmstb/bcmstb.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/types.h>
 #include <common.h>
 #include <env.h>
diff --git a/board/bticino/mamoj/mamoj.c b/board/bticino/mamoj/mamoj.c
index b7d37b700447..c9da42b43bf5 100644
--- a/board/bticino/mamoj/mamoj.c
+++ b/board/bticino/mamoj/mamoj.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
index a9bb2a55e5de..883b7f4133b9 100644
--- a/board/bticino/mamoj/spl.c
+++ b/board/bticino/mamoj/spl.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <serial.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 64daa456b3c7..34be601fdde6 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -24,6 +24,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/gpio.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include "lsxl.h"
diff --git a/board/calao/usb_a9263/usb_a9263.c b/board/calao/usb_a9263/usb_a9263.c
index 1fcaff604558..c0a5c518ca8b 100644
--- a/board/calao/usb_a9263/usb_a9263.c
+++ b/board/calao/usb_a9263/usb_a9263.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm-generic/gpio.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index f8c2913eace0..ccb6b26c91b4 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 #include <cavium/atf.h>
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index 27beaeb101af..9f5e78ce6804 100644
--- a/board/ccv/xpress/xpress.c
+++ b/board/ccv/xpress/xpress.c
@@ -12,6 +12,7 @@
 #include <asm/arch/mx6ul_pins.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index cbed98b0e368..7a7f62fe88e4 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -21,6 +21,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <status_led.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/arch/ep93xx.h>
diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
index 8df039168c99..039fd6e3dd67 100644
--- a/board/cloudengines/pogo_e02/pogo_e02.c
+++ b/board/cloudengines/pogo_e02/pogo_e02.c
@@ -17,6 +17,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/global_data.h>
 #include "pogo_e02.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/cobra5272/cobra5272.c b/board/cobra5272/cobra5272.c
index a79884cb506f..3e2418866c73 100644
--- a/board/cobra5272/cobra5272.c
+++ b/board/cobra5272/cobra5272.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 1eef1d550761..454c93a572f8 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -15,6 +15,7 @@
 #include <phy.h>
 #include <netdev.h>
 #include <fsl_esdhc_imx.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index e2712680f954..2b11b7ee189b 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -27,6 +27,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mxc_hdmi.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/sata.h>
 #include <asm/mach-imx/video.h>
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index a9ba2b7e0023..1d4a3aceef54 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <status_led.h>
 #include <cpsw.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/arch/sys_proto.h>
diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c
index 4b097c8f8f7c..efdade155b57 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -8,6 +8,7 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 9316b2c37720..6ae4a1af8921 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index 41675677de2a..3f4a40fd6593 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <twl4030.h>
 #include <status_led.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
index 3c132f127179..5c7352226373 100644
--- a/board/cortina/presidio-asic/presidio.c
+++ b/board/cortina/presidio-asic/presidio.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index b5f0d3130745..2aa2435e49c2 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c
index 55e955c36bbf..c20e87149493 100644
--- a/board/cssi/MCR3000/MCR3000.c
+++ b/board/cssi/MCR3000/MCR3000.c
@@ -14,6 +14,7 @@
 #include <mpc8xx.h>
 #include <fdt_support.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/uclass.h>
 #include <wdt.h>
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
index 0ae2e7d88c10..055783f63ada 100644
--- a/board/d-link/dns325/dns325.c
+++ b/board/d-link/dns325/dns325.c
@@ -19,6 +19,7 @@
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/gpio.h>
+#include <asm/global_data.h>
 #include "dns325.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 683e8b452ada..383a86173849 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -17,6 +17,7 @@
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/arch/pinmux_defs.h>
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 6bab7b18d44e..7607e313b752 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -14,6 +14,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
 #include <ns16550.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 9937d6b0106a..2969e90a707d 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index c9abe3cc6df1..33486edb4f42 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -9,6 +9,7 @@
 #include <net.h>
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <bootm.h>
diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c
index a9b8a3210828..5b2d444366c7 100644
--- a/board/ea/mx7ulp_com/mx7ulp_com.c
+++ b/board/ea/mx7ulp_com/mx7ulp_com.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mx7ulp-pins.h>
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index a602b623adb0..f806d1e7672a 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -18,6 +18,7 @@
 #include <i2c.h>
 #include <watchdog.h>
 #include <debug_uart.h>
+#include <asm/global_data.h>
 #include <dm/ofnode.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c
index 0674b3001096..559fdd2f646d 100644
--- a/board/egnite/ethernut5/ethernut5.c
+++ b/board/egnite/ethernut5/ethernut5.c
@@ -60,6 +60,7 @@
 #include <i2c.h>
 #include <mmc.h>
 #include <atmel_mci.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91sam9260_matrix.h>
diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c
index bdc0558eda21..ddac58f73d28 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -13,6 +13,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <env.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
index 5d8f62244b03..e0057ce1e6ee 100644
--- a/board/elgin/elgin_rv1108/elgin_rv1108.c
+++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/grf_rv1108.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index 752242bd54c4..65b3942e3991 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -20,6 +20,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index 5a2003d50988..df9149e0d6d8 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -16,6 +16,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 
 #include "board.h"
 
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index deed3a9b84ec..eaa525eb0049 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <serial.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/mach-types.h>
diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c
index 8d3d26e3c703..d388fc6d4901 100644
--- a/board/esd/vme8349/vme8349.c
+++ b/board/esd/vme8349/vme8349.c
@@ -17,6 +17,7 @@
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mpc8349_pci.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c
index 1965985a0f4e..410a3f9d9e3b 100644
--- a/board/firefly/firefly-rk3288/firefly-rk3288.c
+++ b/board/firefly/firefly-rk3288/firefly-rk3288.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <hang.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #ifdef CONFIG_SPL_BUILD
 static int setup_led(void)
diff --git a/board/freescale/common/arm_sleep.c b/board/freescale/common/arm_sleep.c
index bb1ef9979279..733940860f55 100644
--- a/board/freescale/common/arm_sleep.c
+++ b/board/freescale/common/arm_sleep.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #ifndef CONFIG_ARMV7_NONSEC
 #error " Deep sleep needs non-secure mode support. "
diff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c
index b1ca051db23b..07b2ec06bbcb 100644
--- a/board/freescale/common/emc2305.c
+++ b/board/freescale/common/emc2305.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <i2c.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include "emc2305.h"
diff --git a/board/freescale/common/mpc85xx_sleep.c b/board/freescale/common/mpc85xx_sleep.c
index 6f6f4d40fcb8..d2bb173c1833 100644
--- a/board/freescale/common/mpc85xx_sleep.c
+++ b/board/freescale/common/mpc85xx_sleep.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/immap_85xx.h>
 #include "sleep.h"
 #ifdef CONFIG_U_QE
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index 15d11ed81abf..3a83e65f2fe5 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <init.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 19f6e8700d5f..2c440673e7c3 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index 6af71006966c..ab55135a9720 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 19c8a5aa2354..64bc60651d3e 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index e5ca54f9ae75..9a0a0488bf4f 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index dd38c1015cf4..6d5c7a5b4676 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index 034a349236e8..56da4d4c6a31 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -7,6 +7,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm-generic/gpio.h>
 #include <asm/arch/imx8mp_pins.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index 3214718e62b2..ebfd94dc1fa0 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c
index 1ad670b8ccf0..93da67d77983 100644
--- a/board/freescale/imx8mq_evk/imx8mq_evk.c
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 42183ed5aa0a..82753585f2f0 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c
index fba3baa1267e..c6772206244c 100644
--- a/board/freescale/imx8qm_mek/imx8qm_mek.c
+++ b/board/freescale/imx8qm_mek/imx8qm_mek.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index 9dee12a2c6a2..944ba745c09f 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index da55933e21b2..7179823a2235 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index 881d297cf17f..ae6b64ff6ea1 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 0cef6071feba..35241acd224c 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <ram.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index edc7fb176bbc..b8d852f097b0 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <ram.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index 4770eadabd79..2cd651b943fb 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <asm/cache.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 7bea45c8ae53..b77808ea57b7 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -8,6 +8,7 @@
 #include <fdt_support.h>
 #include <asm/cache.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 30b43ea135ad..ed6dc9ff712f 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <asm/cache.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1021aiot/dcu.c b/board/freescale/ls1021aiot/dcu.c
index 77732a6ab158..e4fbcbcaad35 100644
--- a/board/freescale/ls1021aiot/dcu.c
+++ b/board/freescale/ls1021aiot/dcu.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fsl_dcu_fb.h>
+#include <asm/global_data.h>
 #include "div64.h"
 #include "../common/dcu_sii9022a.h"
 
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index 2e5cc5906665..bfe613760427 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/ls102xa_stream_id.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/arch/ls102xa_devdis.h>
diff --git a/board/freescale/ls1021aqds/dcu.c b/board/freescale/ls1021aqds/dcu.c
index b648a7872bcc..f66961ca5907 100644
--- a/board/freescale/ls1021aqds/dcu.c
+++ b/board/freescale/ls1021aqds/dcu.c
@@ -6,6 +6,7 @@
  * FSL DCU Framebuffer driver
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <fsl_dcu_fb.h>
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index f84bce95a845..66fe1519cc6d 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -8,6 +8,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <linux/delay.h>
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 878306b2d0fc..c1acd3040c42 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -11,6 +11,7 @@
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/ls102xa_soc.h>
 #include <asm/arch/fsl_serdes.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include "../common/sleep.h"
 #include <fsl_validate.h>
diff --git a/board/freescale/ls1021atwr/dcu.c b/board/freescale/ls1021atwr/dcu.c
index bdf7f7645c2f..7bf283e3d66c 100644
--- a/board/freescale/ls1021atwr/dcu.c
+++ b/board/freescale/ls1021atwr/dcu.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fsl_dcu_fb.h>
+#include <asm/global_data.h>
 #include "div64.h"
 #include "../common/dcu_sii9022a.h"
 
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index 2889bd8deddb..0cd38a14b830 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/ls1028a/ddr.c b/board/freescale/ls1028a/ddr.c
index 74d3af5c359d..3e976da6b305 100644
--- a/board/freescale/ls1028a/ddr.c
+++ b/board/freescale/ls1028a/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index e37e3a3c16d4..f3c1d958b72a 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <fsl_ddr.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <hwconfig.h>
 #include <fdt_support.h>
diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index c0fc9aadf041..23947bdb84c9 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -11,6 +11,7 @@
 #endif
 #include <log.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index ef0f2e612242..44e4c61eab27 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -10,6 +10,7 @@
 #include <fsl_ddr_sdram.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c
index f16e036d0e8c..08b43ff5e4c5 100644
--- a/board/freescale/ls1043ardb/ddr.c
+++ b/board/freescale/ls1043ardb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 #include <log.h>
 #include <vsprintf.h>
diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c
index dc32c030ecac..beef26b084bf 100644
--- a/board/freescale/ls1043ardb/ls1043ardb.c
+++ b/board/freescale/ls1043ardb/ls1043ardb.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046afrwy/ddr.c b/board/freescale/ls1046afrwy/ddr.c
index daf17e016934..256397b52b65 100644
--- a/board/freescale/ls1046afrwy/ddr.c
+++ b/board/freescale/ls1046afrwy/ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
index 4ebf77b1ad1f..9813a36ca07e 100644
--- a/board/freescale/ls1046afrwy/ls1046afrwy.c
+++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index f3cfbc4c39be..9a96de271786 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -11,6 +11,7 @@
 #endif
 #include <log.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
index 33b10277af7c..3c96c900c320 100644
--- a/board/freescale/ls1046aqds/ls1046aqds.c
+++ b/board/freescale/ls1046aqds/ls1046aqds.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index 0e07df521190..befb556bd30b 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index e107c8471b30..93ef903f2998 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c
index fd9549bfbc8c..995c42960178 100644
--- a/board/freescale/ls1088a/ddr.c
+++ b/board/freescale/ls1088a/ddr.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 5d19702a05cf..2ba6a3990d90 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -13,6 +13,7 @@
 #include <fsl_ifc.h>
 #include <fsl_ddr.h>
 #include <fsl_sec.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <fdt_support.h>
 #include <linux/delay.h>
diff --git a/board/freescale/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
index 229fc9cc30ea..29d7bd1c5ee6 100644
--- a/board/freescale/ls2080a/ddr.c
+++ b/board/freescale/ls2080a/ddr.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
index 62da2a7af11a..48437a52e401 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -10,6 +10,7 @@
 #include <netdev.h>
 #include <fsl_ifc.h>
 #include <fsl_ddr.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <fdt_support.h>
 #include <linux/libfdt.h>
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index 3fb2c4448c24..2767d058cc96 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 3eb40f5e2a21..a6f6897eb09d 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -10,6 +10,7 @@
 #include <netdev.h>
 #include <fsl_ifc.h>
 #include <fsl_ddr.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <fdt_support.h>
 #include <linux/libfdt.h>
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index 4571a228c59e..07fa84733324 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c b/board/freescale/ls2080ardb/eth_ls2080rdb.c
index 018d1dc6720c..21b4c16ff27c 100644
--- a/board/freescale/ls2080ardb/eth_ls2080rdb.c
+++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c
@@ -13,6 +13,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <fm_eth.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index c7e9c1dacf43..26ce5a80edf7 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -11,6 +11,7 @@
 #include <netdev.h>
 #include <fsl_ifc.h>
 #include <fsl_ddr.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <hwconfig.h>
 #include <fdt_support.h>
diff --git a/board/freescale/lx2160a/ddr.c b/board/freescale/lx2160a/ddr.c
index cd422bf2bc5c..7ab7a9e6ca83 100644
--- a/board/freescale/lx2160a/ddr.c
+++ b/board/freescale/lx2160a/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index fcace0293605..437f0bc4cf68 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <fm_eth.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index b448883ee143..02f36f4f5f55 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -14,6 +14,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <fm_eth.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index ace2a1927df0..efd2a5c40e17 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -7,6 +7,7 @@
 #include <clock_legacy.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <i2c.h>
 #include <malloc.h>
diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c
index a950030eb397..7bfb4557dd5b 100644
--- a/board/freescale/m5208evbe/m5208evbe.c
+++ b/board/freescale/m5208evbe/m5208evbe.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c
index 144e490479ed..510af33e4c3c 100644
--- a/board/freescale/m52277evb/m52277evb.c
+++ b/board/freescale/m52277evb/m52277evb.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c
index 5d4039375530..e7c7a94036b5 100644
--- a/board/freescale/m5235evb/m5235evb.c
+++ b/board/freescale/m5235evb/m5235evb.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c
index a89d5100586f..48c00791114d 100644
--- a/board/freescale/m5249evb/m5249evb.c
+++ b/board/freescale/m5249evb/m5249evb.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <linux/delay.h>
 
diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c
index 9a157db60142..2a4703579dab 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/freescale/m5272c3/m5272c3.c b/board/freescale/m5272c3/m5272c3.c
index 1017ef0c2a53..9580cf2a0390 100644
--- a/board/freescale/m5272c3/m5272c3.c
+++ b/board/freescale/m5272c3/m5272c3.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
diff --git a/board/freescale/m5275evb/m5275evb.c b/board/freescale/m5275evb/m5275evb.c
index e65e6d0af585..1c4fb7232afb 100644
--- a/board/freescale/m5275evb/m5275evb.c
+++ b/board/freescale/m5275evb/m5275evb.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c
index 251be667d46b..e1ea9b3a58f8 100644
--- a/board/freescale/m5282evb/m5282evb.c
+++ b/board/freescale/m5282evb/m5282evb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c
index f13b6931ea25..c9f89353ce4b 100644
--- a/board/freescale/m53017evb/m53017evb.c
+++ b/board/freescale/m53017evb/m53017evb.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c
index 531894f65161..7a75b04dd0d2 100644
--- a/board/freescale/m5329evb/m5329evb.c
+++ b/board/freescale/m5329evb/m5329evb.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c
index 29ff55f15966..cfa5ca4a477c 100644
--- a/board/freescale/m5373evb/m5373evb.c
+++ b/board/freescale/m5373evb/m5373evb.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c
index a418fba1401b..ca8993197e3e 100644
--- a/board/freescale/m54418twr/m54418twr.c
+++ b/board/freescale/m54418twr/m54418twr.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/immap.h>
 #include <mmc.h>
diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c
index 1298bd324e9f..a4ddc69166b3 100644
--- a/board/freescale/m54451evb/m54451evb.c
+++ b/board/freescale/m54451evb/m54451evb.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c
index 286300645b4a..c749ee407e77 100644
--- a/board/freescale/m54455evb/m54455evb.c
+++ b/board/freescale/m54455evb/m54455evb.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c
index 908a500f4b9f..1568f455e927 100644
--- a/board/freescale/m547xevb/m547xevb.c
+++ b/board/freescale/m547xevb/m547xevb.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <init.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c
index 796b808e6f90..b62355a7ae7b 100644
--- a/board/freescale/m548xevb/m548xevb.c
+++ b/board/freescale/m548xevb/m548xevb.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <init.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/board/freescale/mpc8308rdb/sdram.c b/board/freescale/mpc8308rdb/sdram.c
index 6e0922cd53c9..6340fd16ea9b 100644
--- a/board/freescale/mpc8308rdb/sdram.c
+++ b/board/freescale/mpc8308rdb/sdram.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <init.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c
index 65a10c345aec..f309961dca87 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -20,6 +20,7 @@
 #if defined(CONFIG_MPC83XX_GPIO) && !defined(CONFIG_SPL_BUILD)
 #include <asm/gpio.h>
 #endif
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
index 99f6bcd5a933..f146ae5d43c4 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/bitops.h>
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index f8e4599f13f7..795162b3c0c6 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
index 8a828207f935..ffbb79aaec14 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/bitops.h>
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c
index 3cde715e96b7..cef3216a6fe5 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -19,6 +19,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <u-boot/crc.h>
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index 6139cbd04091..f34758a9470a 100644
--- a/board/freescale/mpc832xemds/mpc832xemds.c
+++ b/board/freescale/mpc832xemds/mpc832xemds.c
@@ -16,6 +16,7 @@
 #if defined(CONFIG_PCI)
 #include <pci.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 46be5ccd92cf..5f38639afd42 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -10,6 +10,7 @@
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
 #include <spi.h>
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index a265a8380fef..5b4c290df149 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -18,6 +18,7 @@
 #endif
 #include <spd_sdram.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index f515299bc9a8..71875cf8f8ec 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 39673ad076a3..81d31f19c4c1 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <fdt_support.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index 52bf4da98eaa..74b0e45b4f82 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <net.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 0f9aea469b11..b30b86364d5d 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <net.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
diff --git a/board/freescale/mx23evk/mx23evk.c b/board/freescale/mx23evk/mx23evk.c
index 3fbac6b5cc31..605cdec218a3 100644
--- a/board/freescale/mx23evk/mx23evk.c
+++ b/board/freescale/mx23evk/mx23evk.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 1cffdd933172..3b445a46dd7b 100644
--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index a6b66d99ccb1..21c9cb112836 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index fc024c47dbdd..4039d9f049a6 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 4250efddde77..ac48e7668c0e 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index d265d3adaa64..f9ec5ca6ef35 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c
index ef6c6ec1ed6e..b006638e2c12 100644
--- a/board/freescale/mx53evk/mx53evk.c
+++ b/board/freescale/mx53evk/mx53evk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 1da263bb5d5f..ee54a61d874e 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c
index 7c0f98a13216..2f91a0525c4b 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx6memcal/mx6memcal.c b/board/freescale/mx6memcal/mx6memcal.c
index ea7a56369d6e..1cc744fa9ba0 100644
--- a/board/freescale/mx6memcal/mx6memcal.c
+++ b/board/freescale/mx6memcal/mx6memcal.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c
index c11eee51b612..c82b532f6d53 100644
--- a/board/freescale/mx6memcal/spl.c
+++ b/board/freescale/mx6memcal/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index ddde245869af..c06fd643677d 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index c031cf8538e7..e92ef26d0ad0 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -9,6 +9,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 0d343da519fd..bc28173668e2 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/spi.h>
 #include <env.h>
 #include <linux/errno.h>
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 5d2f815d2348..2c90a35e2c95 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -14,6 +14,7 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c
index 0a36b46e9e8b..b4fddafe6402 100644
--- a/board/freescale/mx6sllevk/mx6sllevk.c
+++ b/board/freescale/mx6sllevk/mx6sllevk.c
@@ -10,6 +10,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index 1640f465bad3..7340a3440231 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 7fb8de177bcd..57fab2386415 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 9cb17594013e..b916ea010290 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -12,6 +12,7 @@
 #include <asm/arch/mx6ul_pins.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c
index 3f1ecce10f88..86c11c7bd3a5 100644
--- a/board/freescale/mx6ullevk/mx6ullevk.c
+++ b/board/freescale/mx6ullevk/mx6ullevk.c
@@ -10,6 +10,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index f12e9d4cfefe..2777ae13bce0 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -9,6 +9,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
index fd21591ad6fc..01e32136532d 100644
--- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c
+++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mx7ulp-pins.h>
diff --git a/board/freescale/p1010rdb/ddr.c b/board/freescale/p1010rdb/ddr.c
index 71f6259b60e4..2625195f81b1 100644
--- a/board/freescale/p1010rdb/ddr.c
+++ b/board/freescale/p1010rdb/ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index accf2f24e510..4f87f03965c6 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -9,6 +9,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index 4ee4573d2b52..91be63c2cf40 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index b70ff6899a22..bb4a39a3fa6c 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <net.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/cache.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index e76c3e82c3a9..101c748838e5 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -16,6 +16,7 @@
 #include <i2c.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index 7a06c7af3dce..910058cefe16 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c
index 720d304fe428..4ece1e6ea0a4 100644
--- a/board/freescale/p2041rdb/p2041rdb.c
+++ b/board/freescale/p2041rdb/p2041rdb.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <init.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 3395377b4feb..aa5774fd7974 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -12,6 +12,7 @@
 #include <net.h>
 #include <pci.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/fsl_pci.h>
diff --git a/board/freescale/s32v234evb/s32v234evb.c b/board/freescale/s32v234evb/s32v234evb.c
index f381cfc2ad08..304f5acf3be7 100644
--- a/board/freescale/s32v234evb/s32v234evb.c
+++ b/board/freescale/s32v234evb/s32v234evb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/siul.h>
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index 3640a4795740..818c20cf1b5e 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index da442fcc1802..7ed42ed246ff 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -14,6 +14,7 @@
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/sleep.h"
 #include "../common/spl.h"
 
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index bb775eb2d325..2770e104ee61 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index e313bf99cf22..8351f7ce9db2 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c
index f83d69ba152d..033a1054ff3c 100644
--- a/board/freescale/t104xrdb/spl.c
+++ b/board/freescale/t104xrdb/spl.c
@@ -14,6 +14,7 @@
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/sleep.h"
 #include "../common/spl.h"
 
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index c7290e5a3426..780043483dff 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <log.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c
index 3317f99c81fb..56471b3988b9 100644
--- a/board/freescale/t208xqds/ddr.c
+++ b/board/freescale/t208xqds/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c
index c197884421b7..6863243b3dd6 100644
--- a/board/freescale/t208xqds/spl.c
+++ b/board/freescale/t208xqds/spl.c
@@ -14,6 +14,7 @@
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/qixis.h"
 #include "t208xqds_qixis.h"
 #include "../common/spl.h"
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index f3af8d52925e..dedf722c6957 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <log.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
index 6a09d1cd221b..1fbab36e1a20 100644
--- a/board/freescale/t208xrdb/ddr.c
+++ b/board/freescale/t208xrdb/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index 07aab6349cfc..cfa6789d2df0 100644
--- a/board/freescale/t208xrdb/spl.c
+++ b/board/freescale/t208xrdb/spl.c
@@ -14,6 +14,7 @@
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include "../common/spl.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index d37abb7ef3bb..a18459841c62 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <init.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index 5b7d10c9798b..57cbde154f0e 100644
--- a/board/freescale/t4rdb/ddr.c
+++ b/board/freescale/t4rdb/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c
index 64d2753da81c..42db384a15d6 100644
--- a/board/freescale/t4rdb/spl.c
+++ b/board/freescale/t4rdb/spl.c
@@ -10,6 +10,7 @@
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/spl.h>
 #include <malloc.h>
 #include <ns16550.h>
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 5c2a75b905e6..6ab35ca9185b 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <init.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/vf610twr/vf610twr.c b/board/freescale/vf610twr/vf610twr.c
index bd125bc17e05..98cb0140ad02 100644
--- a/board/freescale/vf610twr/vf610twr.c
+++ b/board/freescale/vf610twr/vf610twr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-vf610.h>
diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c
index 68980536abe9..c0fe2d546f63 100644
--- a/board/friendlyarm/nanopi2/board.c
+++ b/board/friendlyarm/nanopi2/board.c
@@ -12,6 +12,7 @@
 #ifdef CONFIG_PWM_NX
 #include <pwm.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include <asm/arch/nexell.h>
diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c
index 45c947fcbb47..3f402cfeee8c 100644
--- a/board/gardena/smart-gateway-at91sam/board.c
+++ b/board/gardena/smart-gateway-at91sam/board.c
@@ -11,6 +11,7 @@
 #include <led.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/clk.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 9f043d815abf..bf4d6913067d 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/sata.h>
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index a2287f9deb13..ba57a272187e 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -11,6 +11,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <tpm-v1.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm-generic/gpio.h>
diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c
index daade6da0af4..495a97691881 100644
--- a/board/gdsys/a38x/hydra.c
+++ b/board/gdsys/a38x/hydra.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h> /* ctrlc */
+#include <pci.h>
 #include <asm/io.h>
 
 #include "hydra.h"
diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c
index c317260251e6..68a9595511c9 100644
--- a/board/gdsys/mpc8308/gazerbeam.c
+++ b/board/gdsys/mpc8308/gazerbeam.c
@@ -17,6 +17,7 @@
 #include <misc.h>
 #include <tpm-v1.h>
 #include <video_osd.h>
+#include <asm/global_data.h>
 
 #include "../common/ihs_mdio.h"
 #include "../../../drivers/board/gazerbeam.h"
diff --git a/board/gdsys/mpc8308/sdram.c b/board/gdsys/mpc8308/sdram.c
index 9695fb0a10df..bfd55f54e4e1 100644
--- a/board/gdsys/mpc8308/sdram.c
+++ b/board/gdsys/mpc8308/sdram.c
@@ -19,6 +19,7 @@
 #include <spd_sdram.h>
 
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include <asm/processor.h>
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index cf76cf7a3387..be5fb0e49cc1 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -12,6 +12,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <env.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index 7627e9c370fb..4de82cd5cd25 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/google/imx8mq_phanbell/imx8mq_phanbell.c b/board/google/imx8mq_phanbell/imx8mq_phanbell.c
index 746071b4150f..d0a740dd3f40 100644
--- a/board/google/imx8mq_phanbell/imx8mq_phanbell.c
+++ b/board/google/imx8mq_phanbell/imx8mq_phanbell.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index 06a3f4c1aa86..eec3f3d931b2 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <init.h>
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 391d973c0b6d..32dbcdc4d10a 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <asm/arch-rockchip/clock.h>
+#include <asm/global_data.h>
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index 8cc9278287b4..12480f5729d6 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -16,6 +16,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <cpsw.h>
 #include <env.h>
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index 578d75aed3d1..48392c48e5cc 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mx6ul_pins.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index e07295c7b5c0..a790d453da04 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -12,6 +12,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <scsi.h>
+#include <asm/global_data.h>
 
 #include <linux/sizes.h>
 #include <asm/io.h>
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index e89ff1a43deb..5a858dec64e4 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
index db485db10a95..a14b9e44fa5d 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <asm/cache.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hi3660.h>
 #include <asm/armv8/mmu.h>
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index 371c3c33fc88..486e37f90a6e 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <asm/arch/hi3798cv200.h>
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index ac35b5b0d0c1..45c77a249a9b 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -17,6 +17,7 @@
 #include <mpc83xx.h>
 #include <spi.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 
diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c
index 241b3846687a..182f79b9182d 100644
--- a/board/imgtec/boston/ddr.c
+++ b/board/imgtec/boston/ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 
diff --git a/board/imgtec/boston/dt.c b/board/imgtec/boston/dt.c
index 44b56416ff91..bf772ff5dec4 100644
--- a/board/imgtec/boston/dt.c
+++ b/board/imgtec/boston/dt.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <asm/global_data.h>
 
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index 038dbdd74f06..7ee175d40a5b 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 252cc813c6ea..c04f727961de 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -13,6 +13,7 @@
 #include <pci_gt64120.h>
 #include <pci_msc01.h>
 #include <rtc.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/addrspace.h>
diff --git a/board/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c
index 0b68bbde50fc..6a836370e36d 100644
--- a/board/imgtec/xilfpga/xilfpga.c
+++ b/board/imgtec/xilfpga/xilfpga.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index 56a2a7c4a6e6..086d0522c78a 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <fs.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index 79c794bfc896..fe4be28b13ce 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -11,6 +11,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/global_data.h>
 #include "iconnect.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index 9b4cb91b3418..02ae7df04db9 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -21,6 +21,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/isee/igep00x0/common.c b/board/isee/igep00x0/common.c
index 58c713f0f322..3fdf83e845c9 100644
--- a/board/isee/igep00x0/common.c
+++ b/board/isee/igep00x0/common.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <twl4030.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/omap_mmc.h>
 #include <asm/arch/mux.h>
diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c
index eb5b67d1e622..a5ee4a8a5192 100644
--- a/board/k+p/kp_imx53/kp_imx53.c
+++ b/board/k+p/kp_imx53/kp_imx53.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
index e60d556b3032..110496d99505 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <env.h>
 #include <errno.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index 75fb6acfb3c3..103c4531a64c 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <spl.h>
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 03c7ce9da7d8..d85a5eac1658 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -15,6 +15,7 @@
 #include <cli_hush.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 0aad452dde67..1e5c33b5fd56 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -22,6 +22,7 @@
 #include <mpc83xx.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 7d191ab860b5..f4235b377fc0 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -20,6 +20,7 @@
 #include <netdev.h>
 #include <miiphy.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/keymile/kmp204x/ddr.c b/board/keymile/kmp204x/ddr.c
index d9c9ddf2bac5..77a00c55c951 100644
--- a/board/keymile/kmp204x/ddr.c
+++ b/board/keymile/kmp204x/ddr.c
@@ -11,6 +11,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index 4b406042180c..02c87a031c30 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index 17d2489415de..adb091ce4fd3 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -10,6 +10,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index b1939f8a56e2..0e1b4a0a46ce 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -10,6 +10,7 @@
 #include <eeprom.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <ahci.h>
 #include <env.h>
diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
index b1593bab5ebd..f221f05261ae 100644
--- a/board/l+g/vinco/vinco.c
+++ b/board/l+g/vinco/vinco.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
diff --git a/board/laird/wb45n/wb45n.c b/board/laird/wb45n/wb45n.c
index df6eeb624347..5e1ef8a49ac4 100644
--- a/board/laird/wb45n/wb45n.c
+++ b/board/laird/wb45n/wb45n.c
@@ -4,6 +4,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9x5_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/laird/wb50n/wb50n.c b/board/laird/wb50n/wb50n.c
index 9cc21b2abd3c..8fa989a2a4ff 100644
--- a/board/laird/wb50n/wb50n.c
+++ b/board/laird/wb50n/wb50n.c
@@ -4,6 +4,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_sfr.h>
 #include <asm/arch/sama5d3_smc.h>
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 51b669a891b6..5e5c8c1198f7 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -19,6 +19,7 @@
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/pinmux_defs.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
 #include <linux/errno.h>
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index b08a267c52c1..15c088d73486 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
 #include <asm/omap_musb.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 5f447143019a..e3a59dbec009 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.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 23959c255731..b8658c8d6174 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <serial.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c
index 71f75d877d2f..1b49526fba4f 100644
--- a/board/liebherr/mccmon6/mccmon6.c
+++ b/board/liebherr/mccmon6/mccmon6.c
@@ -12,6 +12,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 9286f4c755bc..cd11b0ada77c 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -18,6 +18,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index cba51f54d41d..f0141659282a 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -16,6 +16,7 @@
 #include <net.h>
 #include <ns16550.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/omap_musb.h>
 #include <asm/arch/am35x_def.h>
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
index ba69c966869d..0d53548dcb4b 100644
--- a/board/logicpd/imx6/imx6logic.c
+++ b/board/logicpd/imx6/imx6logic.c
@@ -16,6 +16,7 @@
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/sizes.h>
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 496886fea25a..2379b521904a 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -20,6 +20,7 @@
 #include <i2c.h>
 #include <serial.h>
 #include <twl4030.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c
index 3c6422214f77..e92132ad19a1 100644
--- a/board/maxbcm/maxbcm.c
+++ b/board/maxbcm/maxbcm.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <miiphy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c
index 6a5f936635c1..0504d6177fd5 100644
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <env.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mediatek/mt7623/mt7623_rfb.c b/board/mediatek/mt7623/mt7623_rfb.c
index 984e75ccaf26..755e879085c2 100644
--- a/board/mediatek/mt7623/mt7623_rfb.c
+++ b/board/mediatek/mt7623/mt7623_rfb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <mmc.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mediatek/mt7629/mt7629_rfb.c b/board/mediatek/mt7629/mt7629_rfb.c
index 08468b50ea2a..d1bca6d62ef8 100644
--- a/board/mediatek/mt7629/mt7629_rfb.c
+++ b/board/mediatek/mt7629/mt7629_rfb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mediatek/mt8512/mt8512.c b/board/mediatek/mt8512/mt8512.c
index 4ad62b73a6c0..ac3adb801222 100644
--- a/board/mediatek/mt8512/mt8512.c
+++ b/board/mediatek/mt8512/mt8512.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index c9acfcb1a56d..fce5de6767cd 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 893f62559994..c34baca602cd 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c b/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c
index 8b419ef6f7ea..315169ba661d 100644
--- a/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c
+++ b/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/mbus.h>
diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c
index e8e1ac3eb195..5d6cb24966d6 100644
--- a/board/mini-box/picosam9g45/picosam9g45.c
+++ b/board/mini-box/picosam9g45/picosam9g45.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <init.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/at91sam9g45_matrix.h>
diff --git a/board/mpc8308_p1m/sdram.c b/board/mpc8308_p1m/sdram.c
index cbf8781746eb..62a2d8a53afa 100644
--- a/board/mpc8308_p1m/sdram.c
+++ b/board/mpc8308_p1m/sdram.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index 51700f4acffe..1cd720c7d844 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index acc26157c771..038902d08a9d 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index 74e8bfc43147..c462890bb853 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -7,6 +7,7 @@
 #include <image.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c
index ed1aea55cc2f..94c1c42b79b2 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c
index 879f5de50675..252d8e3156d5 100644
--- a/board/mscc/servalt/servalt.c
+++ b/board/mscc/servalt/servalt.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <led.h>
 
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index f624dbfbebc4..65be1719c2ce 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -29,6 +29,7 @@
 #include <twl4030.h>
 #include <i2c.h>
 #include <video_fb.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/bitops.h>
diff --git a/board/novtech/meerkat96/meerkat96.c b/board/novtech/meerkat96/meerkat96.c
index b13e7ce3b18d..1edebe5db9be 100644
--- a/board/novtech/meerkat96/meerkat96.c
+++ b/board/novtech/meerkat96/meerkat96.c
@@ -9,6 +9,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index f13fdb8d47e7..d1e189cbb6eb 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/phytec/pcl063/pcl063.c b/board/phytec/pcl063/pcl063.c
index 9e6940f9c76a..b2e435f6908d 100644
--- a/board/phytec/pcl063/pcl063.c
+++ b/board/phytec/pcl063/pcl063.c
@@ -11,6 +11,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index b0c56a29f1f8..f9cf4abd474b 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-vf610.h>
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c
index 79c666588f4e..5e5b129ef1ff 100644
--- a/board/phytec/pcm058/pcm058.c
+++ b/board/phytec/pcm058/pcm058.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-ddr.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/sys_proto.h>
 #include <dm.h>
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index 3b10cc0f9f11..076ce6711ef0 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/phytec/phycore_am335x_r2/board.c b/board/phytec/phycore_am335x_r2/board.c
index fb5890684714..5ca94152049f 100644
--- a/board/phytec/phycore_am335x_r2/board.c
+++ b/board/phytec/phycore_am335x_r2/board.c
@@ -17,6 +17,7 @@
 #include <asm/arch/ddr_defs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <power/tps65910.h>
 #include <jffs2/load_kernel.h>
 #include <mtd_node.h>
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index ecc73227a023..f588fc3b0c70 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index b80688ae864c..8a82a4591ac2 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <linux/arm-smccc.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index e8168e346824..578f5c73b6cb 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index 7553d0b00de5..f57091739ec9 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/mipsregs.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 4d1dbd696dcf..646013cfc93d 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <usb.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
 #include <asm/arch/dram.h>
diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
index c1ade5ce43a6..877e34c21017 100644
--- a/board/qualcomm/dragonboard820c/dragonboard820c.c
+++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
@@ -10,6 +10,7 @@
 #include <asm/arch/sysmap-apq8096.h>
 #include <env.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
 #include <common.h>
diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index db1b0adc3826..f9bc07649e0a 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <miiphy.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index 279ed4872165..854c47636d3f 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index 2450fca7a58b..9671382f2a3e 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -15,6 +15,7 @@
 #include <asm/arch/rmobile.h>
 #include <asm/arch/sh_sdhi.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c
index 91afcdd85a84..99e7dd6e1e16 100644
--- a/board/renesas/condor/condor.c
+++ b/board/renesas/condor/condor.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index c8f4b214a2d8..bc4ce95a727f 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c
index 6228f22e0103..f9e553feaa70 100644
--- a/board/renesas/eagle/eagle.c
+++ b/board/renesas/eagle/eagle.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c
index d164a36361fc..620d250284a0 100644
--- a/board/renesas/ebisu/ebisu.c
+++ b/board/renesas/ebisu/ebisu.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index c6a93c25e6d2..56cdc73b1a77 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index b92e01ca9847..ac989eb29c2f 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 1b3acc8fd1f1..b0a66ea2669e 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 36a35a9a9cfb..add4eef3d53c 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index 793e02cb440a..b3e4c08d74d3 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 83dd28884705..1d645a82aafb 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/rmobile.h>
 #include <linux/libfdt.h>
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index 947bdaefa807..1d0cab8914fe 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index 171d06f3175c..05af5f4d68b1 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index babcce9aa1c3..3fdf936ddcac 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <env_internal.h>
 #include <asm/processor.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 07bc1ec71998..66aff8e11080 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
diff --git a/board/rockchip/evb_rk3308/evb_rk3308.c b/board/rockchip/evb_rk3308/evb_rk3308.c
index 180f1fe4f00b..e0c96fd70a28 100644
--- a/board/rockchip/evb_rk3308/evb_rk3308.c
+++ b/board/rockchip/evb_rk3308/evb_rk3308.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <adc.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
index c57913828d72..719a64162875 100644
--- a/board/rockchip/evb_rv1108/evb_rv1108.c
+++ b/board/rockchip/evb_rv1108/evb_rv1108.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/grf_rv1108.h>
diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
index 0ce6a6e44e90..5be2c5e192bb 100644
--- a/board/ronetix/pm9261/pm9261.c
+++ b/board/ronetix/pm9261/pm9261.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <init.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index 62dfe6e33d75..95c0dec4db5f 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
index c7d22db0aba8..8d5825c7f131 100644
--- a/board/ronetix/pm9g45/pm9g45.c
+++ b/board/ronetix/pm9g45/pm9g45.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index 91813763cecb..2742a7f32b2a 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <log.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/dwmmc.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 752d84ec05c1..9eea11f755b7 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -16,6 +16,7 @@
 #include <spi.h>
 #include <tmu.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/board.h>
diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
index f1ecb7d2c396..e2d5a7c9ba77 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 69aa2120e126..4463cdcb87b6 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <i2c.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 837463ba78f8..7d3b9846e39f 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <lcd.h>
 #include <libtizen.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <samsung/misc.h>
 #include <errno.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 2f0ef22c4171..b32b82fc2dad 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
 #include <dm.h>
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 7d7e722892e7..90aab62d33b0 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -10,6 +10,7 @@
 #include <asm/arch/power.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/cpu.h>
 #include <dm.h>
diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
index d034f53d68b5..69ed715403fb 100644
--- a/board/samsung/smdkc100/smdkc100.c
+++ b/board/samsung/smdkc100/smdkc100.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/sromc.h>
diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c
index 24273f1214b0..8811cbb9ad0b 100644
--- a/board/samsung/smdkv310/smdkv310.c
+++ b/board/samsung/smdkv310/smdkv310.c
@@ -7,6 +7,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index f50da6be7245..9ef11b8471ca 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <spi.h>
 #include <lcd.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/adc.h>
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 937ce2841114..c78e90accbc5 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <led.h>
 #include <os.h>
+#include <asm/global_data.h>
 #include <asm/test.h>
 #include <asm/u-boot-sandbox.h>
 
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index 42004098b377..f46b02e38e59 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index 824479c099b6..b440a0b17e97 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -13,6 +13,7 @@
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
 #include <spd_sdram.h>
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index 34e46d4ea4c8..a67092daf47f 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <log.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_pci.h>
diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
index 8011871fc8fb..3a04b1a634cc 100644
--- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
+++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index c7e3d425eacd..a061d7d8afbc 100644
--- a/board/seco/mx6quq7/mx6quq7.c
+++ b/board/seco/mx6quq7/mx6quq7.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/siemens/capricorn/spl.c b/board/siemens/capricorn/spl.c
index 8435bd3863bf..8e077d73aef9 100644
--- a/board/siemens/capricorn/spl.c
+++ b/board/siemens/capricorn/spl.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <spl.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index e0bd8590bc9d..1bdf404ac3eb 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -25,6 +25,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index eed055aedb36..2acd3226cf2d 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9g45_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
index c6bdd9708372..d500a6214d56 100644
--- a/board/siemens/smartweb/smartweb.c
+++ b/board/siemens/smartweb/smartweb.c
@@ -19,6 +19,7 @@
 #include <dm.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9_sdramc.h>
 #include <asm/arch/at91sam9260_matrix.h>
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 91e29f06f60f..cad16f906564 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -17,6 +17,7 @@
 #include <env.h>
 #include <flash.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index 9fdbeac82fd3..cec3ade96cfd 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 25bc664328aa..0c9262d35400 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <pci.h>
 #include <uuid.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
 #include <ioports.h>
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index 4e9d351582ff..aaeeee361e54 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -14,6 +14,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c
index 7e311b7a1c38..aaedf0345045 100644
--- a/board/softing/vining_fpga/socfpga.c
+++ b/board/softing/vining_fpga/socfpga.c
@@ -10,6 +10,7 @@
 #include <net.h>
 #include <status_led.h>
 #include <asm/arch/reset_manager.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <i2c.h>
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index d5535ebebecd..3a2f8b817886 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -10,6 +10,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/solidrun/common/tlv_data.c b/board/solidrun/common/tlv_data.c
index f08ac8975a6a..11d6e4a13807 100644
--- a/board/solidrun/common/tlv_data.c
+++ b/board/solidrun/common/tlv_data.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <tlv_eeprom.h>
 #include "tlv_data.h"
 
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index ae1c04df87da..3eadc38f6fd4 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -23,6 +23,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <env.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/somlabs/visionsom-6ull/visionsom-6ull.c b/board/somlabs/visionsom-6ull/visionsom-6ull.c
index bc7257be405b..076c641d8a90 100644
--- a/board/somlabs/visionsom-6ull/visionsom-6ull.c
+++ b/board/somlabs/visionsom-6ull/visionsom-6ull.c
@@ -11,6 +11,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/st/common/stm32mp_mtdparts.c b/board/st/common/stm32mp_mtdparts.c
index 9f5897f8c860..ef32df04fefc 100644
--- a/board/st/common/stm32mp_mtdparts.c
+++ b/board/st/common/stm32mp_mtdparts.c
@@ -13,6 +13,7 @@
 #include <tee.h>
 #include <asm/arch/stm32prog.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 
 #define MTDPARTS_LEN		256
 #define MTDIDS_LEN		128
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index b1147f2e1a70..b87468cca210 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/usb/otg.h>
 #include <dwc3-sti-glue.h>
 #include <dwc3-uboot.h>
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index ee6a90c9fdd0..9d8fc9f5a2e1 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -15,6 +15,7 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 92e3d40a1b62..35e71380b892 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index 85988acb2414..fcc34e7955a6 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index 0f728fd9f9e2..40450ca914be 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -17,6 +17,7 @@
 #include <splash.h>
 #include <st_logo_data.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index 0484c3c25049..53bf09221972 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index 0484c3c25049..53bf09221972 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 3b677d339b72..87fac76af6f4 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -29,6 +29,7 @@
 #include <syscon.h>
 #include <usb.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index 8c827adc2ed7..72399cf5f653 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -15,6 +15,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
 
diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c
index f7834c08fc2c..b9b2a6fddc2a 100644
--- a/board/ste/stemmy/stemmy.c
+++ b/board/ste/stemmy/stemmy.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 71e2b758a3e5..87c231f38f9f 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -28,6 +28,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/spl.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <u-boot/crc.h>
 #ifndef CONFIG_ARM64
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index b4a1d4c5dff6..75e4d037623e 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <asm/arcregs.h>
+#include <asm/global_data.h>
 #include "axs10x.h"
 #include <asm/cache.h>
 
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index 91fa94a638ef..997120ec5e17 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -9,6 +9,7 @@
 #include <dwmmc.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 #include <asm/arcregs.h>
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index cd11f9dac06b..892b94bb0836 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -14,6 +14,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 497ea186d3a8..c6051363c1f9 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dwmmc.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
diff --git a/board/sysam/amcore/amcore.c b/board/sysam/amcore/amcore.c
index 4502005941fb..9e1b8022705e 100644
--- a/board/sysam/amcore/amcore.c
+++ b/board/sysam/amcore/amcore.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <dm.h>
diff --git a/board/sysam/stmark2/stmark2.c b/board/sysam/stmark2/stmark2.c
index ce8b541ccdf7..d48da48b69d6 100644
--- a/board/sysam/stmark2/stmark2.c
+++ b/board/sysam/stmark2/stmark2.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <init.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/immap.h>
 #include <mmc.h>
diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index d5393d705976..2d4c5cce8920 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index d32517f998a8..ac1b8231281d 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -3,11 +3,13 @@
  * Copyright (C) 2014 Soeren Moch <smoch at web.de>
  */
 
+#include <common.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 230481be0de6..4821925c026d 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -23,6 +23,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index da82244b3975..6b9c4f4373cc 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <festevam at gmail.com>
  */
 
+#include <common.h>
 #include <env.h>
 #include <init.h>
 #include <net.h>
@@ -15,6 +16,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/mach-imx/video.h>
@@ -22,7 +24,6 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
-#include <common.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <phy.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 5d6be26faa1c..c9f553bdfd52 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -13,6 +13,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index a6fd49d729c4..2d749dac19a4 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -10,6 +10,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/technexion/pico-imx8mq/pico-imx8mq.c b/board/technexion/pico-imx8mq/pico-imx8mq.c
index 330de7137c3d..951e3e1985bc 100644
--- a/board/technexion/pico-imx8mq/pico-imx8mq.c
+++ b/board/technexion/pico-imx8mq/pico-imx8mq.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/technexion/pico-imx8mq/spl.c b/board/technexion/pico-imx8mq/spl.c
index b181f797a77a..8b853a914e85 100644
--- a/board/technexion/pico-imx8mq/spl.c
+++ b/board/technexion/pico-imx8mq/spl.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mq_pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 84db131de2b8..0c9dca31e67e 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <netdev.h>
 #include <twl4030.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mem.h>
diff --git a/board/technologic/ts4600/ts4600.c b/board/technologic/ts4600/ts4600.c
index 0ef306d58a27..b9cce821d96d 100644
--- a/board/technologic/ts4600/ts4600.c
+++ b/board/technologic/ts4600/ts4600.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index fe36fb7ffab4..a309e58b27fd 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 67bc00b65b03..3c4133083f54 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -13,6 +13,7 @@
 #if !defined(CONFIG_SPL_BUILD)
 #include <bootcount.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 984cc5e3ba52..211a9bf74467 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -27,6 +27,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c
index f32d1757db79..b1017d6c9b76 100644
--- a/board/ti/am3517crane/am3517crane.c
+++ b/board/ti/am3517crane/am3517crane.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mem.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index de4959003151..8f5bf3581f48 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <eeprom.h>
 #include <image.h>
+#include <asm/global_data.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 69dce70a6011..be09d719cbe3 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -19,6 +19,7 @@
 #include <serial.h>
 #include <usb.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/omap_common.h>
 #include <asm/omap_sec_common.h>
 #include <asm/emif.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 36063b11383d..3d44c70fe42d 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/omap_common.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 6bd59eb10c2e..888a95849190 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -24,6 +24,7 @@
 #include <status_led.h>
 #endif
 #include <twl4030.h>
+#include <asm/global_data.h>
 #include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 5ae179f69b98..851471cd1304 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -19,6 +19,7 @@
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <linux/string.h>
 #include <asm/gpio.h>
 #include <usb.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index ecbd843676a7..96434b3ba0f4 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -17,6 +17,7 @@
 #include <net.h>
 #include <ns16550.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index ebaa6faa931e..a6983da5b5cf 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -16,6 +16,7 @@
 #include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <spl.h>
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index c7be54002899..9e5f08e33720 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include "board.h"
 #include <env.h>
 #include <hang.h>
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index 88f56edc54ed..4777622156b8 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -15,6 +15,7 @@
 #include <serial.h>
 #include <tca642x.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/usb/gadget.h>
 #include <dwc3-uboot.h>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index f718e69e85dc..fda8d5f3c838 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <net.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index 3fd973049a87..4895bfafd80a 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -12,6 +12,7 @@
 #include <serial.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
+#include <asm/global_data.h>
 
 #include "sdp4430_mux_data.h"
 
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index becece1c2057..2d42af6b809d 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -12,6 +12,7 @@
 #include <net.h>
 #include <spl.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/cpu.h>
diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c
index f4eaf15970bb..3c744b943f40 100644
--- a/board/timll/devkit3250/devkit3250.c
+++ b/board/timll/devkit3250/devkit3250.c
@@ -12,6 +12,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/emc.h>
 #include <asm/arch/wdt.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 2420c28974c7..5af883180627 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -22,6 +22,7 @@
 #include <malloc.h>
 #include <ns16550.h>
 #include <twl4030.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 9263b0f51fa7..6e8594a64725 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 3961c4df9e24..17f6094687b7 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index f718dc855d4d..0396eea56b55 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -11,6 +11,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/tegra.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
index 89b99a0b7402..818a29f22be2 100644
--- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c
+++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <asm/arch/clock.h>
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index f981c11a37cb..9531ec64a5da 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index a416b5e54b37..64a8406ec77c 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 14df3fc42cfc..75babe1ea5fc 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index 273a17f608d5..bc7a79f0b341 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -15,6 +15,7 @@
 #include <asm/arch/pxa.h>
 #include <asm/arch/regs-mmc.h>
 #include <asm/arch/regs-uart.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/platdata.h>
 #include <dm/platform_data/pxa_mmc_gen.h>
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index f44ca90ce96e..73ef4d2db32c 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -12,6 +12,7 @@
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/board.h>
 #include <asm/arch-tegra/tegra.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <i2c.h>
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 7194ede01cbe..e9c5bc063223 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index bf27b2fa66a0..ab561237e6f7 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include "tdx-cfg-block.h"
 #include "tdx-eeprom.h"
 
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index cc78c5666bba..588da0aeba6b 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -12,6 +12,7 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mm_pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 66950ed218b0..1161b5c31d9c 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -7,6 +7,7 @@
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index c16784324c92..17b4662c167f 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -10,6 +10,7 @@
 #include <ioports.h>
 #include <log.h>
 #include <mpc83xx.h>
+#include <asm/global_data.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
 #include <miiphy.h>
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 2df901a584cb..26d557cece94 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index c6edc724405e..653ca1ca5a62 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -15,6 +15,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <env.h>
diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
index 62b32ae7595c..d83f23dd3581 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
diff --git a/board/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c
index d8e383d323e8..1c52cfd882ec 100644
--- a/board/variscite/dart_6ul/dart_6ul.c
+++ b/board/variscite/dart_6ul/dart_6ul.c
@@ -10,6 +10,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
index 7949eb88c07b..184948094db0 100644
--- a/board/varisys/cyrus/ddr.c
+++ b/board/varisys/cyrus/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c
index 6cdb11047165..78d401e955eb 100644
--- a/board/ve8313/ve8313.c
+++ b/board/ve8313/ve8313.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <pci.h>
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index afe12466df31..4175d414694b 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <net.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index e0e01b1a4a43..53299c87010a 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -17,6 +17,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/warp/warp.c b/board/warp/warp.c
index 85da9c1bd435..0f1d038fabdf 100644
--- a/board/warp/warp.c
+++ b/board/warp/warp.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index aaa7006d3b2d..0f202241dd78 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -10,6 +10,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/hab.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c
index 2e0def5b64f0..bdcecff7308f 100644
--- a/board/work-microwave/work_92105/work_92105.c
+++ b/board/work-microwave/work_92105/work_92105.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
diff --git a/board/xes/xpedite517x/xpedite517x.c b/board/xes/xpedite517x/xpedite517x.c
index 2c9499ab20b3..8a5b52c49527 100644
--- a/board/xes/xpedite517x/xpedite517x.c
+++ b/board/xes/xpedite517x/xpedite517x.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/mmu.h>
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 0469e2e7ac9b..458eef45adfb 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <env.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <i2c.h>
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 4e569e910d90..7729ce915ea3 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -15,6 +15,7 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <fdtdec.h>
 #include <linux/sizes.h>
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 45cf1d2d0cad..55da0df75c43 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <time.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 2164eac8d518..09e4184e1728 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdtdec.h>
diff --git a/board/xilinx/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c
index 481f012c282d..2f55078dd768 100644
--- a/board/xilinx/zynq/bootimg.c
+++ b/board/xilinx/zynq/bootimg.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <part.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 73e2b0eac7e5..6c697caa625b 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ebb71729081d..a64174a915c9 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -22,6 +22,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/psu_init_gpl.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/ptrace.h>
 #include <dm/device.h>
diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c
index 3f71e3da4461..cd4a7723b120 100644
--- a/board/zyxel/nsa310s/nsa310s.c
+++ b/board/zyxel/nsa310s/nsa310s.c
@@ -12,6 +12,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include "nsa310s.h"
 
diff --git a/cmd/acpi.c b/cmd/acpi.c
index 085a3a650d1a..126d6d3bc991 100644
--- a/cmd/acpi.c
+++ b/cmd/acpi.c
@@ -8,6 +8,7 @@
 #include <mapmem.h>
 #include <acpi/acpi_table.h>
 #include <asm/acpi_table.h>
+#include <asm/global_data.h>
 #include <dm/acpi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 9593b345a3d7..a940cac7eafd 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index 81ce2564805d..6dc3bab74da3 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -6,6 +6,7 @@
 #include <cli.h>
 #include <command.h>
 #include <console.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/ctype.h>
 #include <net.h>
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index fbfed54e8571..9808049548db 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -18,6 +18,7 @@
 #include <image.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <linux/libfdt_env.h>
 #include <mapmem.h>
diff --git a/cmd/booti.c b/cmd/booti.c
index 76d1255ec584..3df70ea9caaf 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -12,6 +12,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 
diff --git a/cmd/bootm.c b/cmd/bootm.c
index e6b0e04413cd..7732b97f635d 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <nand.h>
 #include <asm/byteorder.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <linux/err.h>
 #include <u-boot/zlib.h>
diff --git a/cmd/date.c b/cmd/date.c
index 75a032cd2777..0e1189475313 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <rtc.h>
 #include <i2c.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/efi.c b/cmd/efi.c
index b3a3bf828215..1c0e62e4a330 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <sort.h>
+#include <asm/global_data.h>
 
 static const char *const type_name[] = {
 	"reserved",
diff --git a/cmd/load.c b/cmd/load.c
index 63a94145430a..4bd463c3a7cb 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -20,6 +20,7 @@
 #include <serial.h>
 #include <xyzModem.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/log.c b/cmd/log.c
index 6afe6ead251b..ccefb0cbb8cf 100644
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 static char log_fmt_chars[LOGF_COUNT] = "clFLfm";
 
diff --git a/cmd/mem.c b/cmd/mem.c
index 190e2b94a7d4..79757be9b60d 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -22,6 +22,7 @@
 #include <mapmem.h>
 #include <rand.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index 5220142b9ab2..ed373a8c4dad 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -75,6 +75,7 @@
 #include <env.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <jffs2/load_kernel.h>
 #include <linux/list.h>
 #include <linux/ctype.h>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index d188c6aa6b73..91fa73fa322c 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
diff --git a/cmd/pxe_utils.h b/cmd/pxe_utils.h
index 77d25888758f..b5a7d2780116 100644
--- a/cmd/pxe_utils.h
+++ b/cmd/pxe_utils.h
@@ -3,6 +3,8 @@
 #ifndef __PXE_UTILS_H
 #define __PXE_UTILS_H
 
+#include <linux/list.h>
+
 /*
  * A note on the pxe file parser.
  *
diff --git a/cmd/sb.c b/cmd/sb.c
index f7eb921f43e9..0d55818e3c67 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <dm.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/state.h>
 
 static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
diff --git a/cmd/sound.c b/cmd/sound.c
index 7fc19678ea8f..fdcde3653390 100644
--- a/cmd/sound.c
+++ b/cmd/sound.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <sound.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/spl.c b/cmd/spl.c
index 28b40dd31e10..472703f8fe15 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <image.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index 623b63b0f94c..6b43a7386832 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -14,6 +14,7 @@
 #include <asm/emif.h>
 #include <common.h>
 #include <command.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index eab0531c96b9..5099cbdd95ee 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -17,6 +17,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <u-boot/crc.h>
 
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index 8017eda387c2..82e4415b16eb 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/fsp/fsp_support.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 6b1f7bda5b82..1b8dfa99f7b1 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <efi.h>
 #include <uuid.h>
+#include <asm/global_data.h>
 #include <asm/hob.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/autoboot.c b/common/autoboot.c
index 6d78716a266a..4341f5f0bb02 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 99501951e0c0..e3c2b5fa898b 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>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/board_f.c b/common/board_f.c
index 3932e0c69dd1..85e147a60ee3 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 a6db087f9604..b54aa30a9442 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 9b2fec701a55..996cfa75eae6 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 247b600d9c66..157b0cbc7e86 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -18,6 +18,7 @@
 #include <mapmem.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #if defined(CONFIG_CMD_USB)
 #include <usb.h>
diff --git a/common/bootm_os.c b/common/bootm_os.c
index e9aaddf3e615..0b6325db6605 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 5f87358fd854..d5b78b9f4872 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 6635ab2bcf85..048eacb9ef97 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 5b1f11907438..3fbe918ebade 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -87,6 +87,7 @@
 #ifndef CONFIG_SYS_PROMPT_HUSH_PS2
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #endif
+#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 1f1e28c6d857..c89bb136b867 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 2c491e20a743..6a87bb54abf6 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>
 
 /*
diff --git a/common/console.c b/common/console.c
index 8e50af1f9d22..ca23d9bc05ec 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 b29a7cfd93d3..cf0270a9c115 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 6253b55694bf..eea47ededd49 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 05238a8ba91e..fc64002f736a 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 daf3eea5f968..26a561c365b7 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 18f7c8db03ba..d07b0e0f09b4 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 09869f784644..09d8512f8e59 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 f13eefb061ea..cb7b7c3ef2c3 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 cc1967109ead..11fbdb0fb4f3 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 d54eff9033cc..973a37969f68 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -22,6 +22,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 f3c209ae8b72..4abd3c080f78 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 9d7d5c17d122..24dd06bf5530 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 8c8a5eac0571..3f183ee11326 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 e00b43e6a7bc..0e7470ad78e1 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 7225ee440418..63d0cca3a004 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 02f2db3a99e5..ab5614ad0e3d 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 fca600691e9a..6dd7972f7093 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 734d26de4af3..f40513dc5322 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 bb3f8464b986..357dff29168f 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 149ff5af310a..2477a6995d3e 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 34f0b4909387..0267fb6bec87 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 e95c68265ab9..d5d13d51bf1f 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 4840d1d36707..fd050cc63103 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 365104fe0288..6a9f6f57e8af 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <spl.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 14f335f75f02..90c4a5f9704e 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 2744fb5d520c..6a4e03328709 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 f51ca5ddf37c..2737fc6e7ffa 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 2119204b9829..1c6ad6861060 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -18,6 +18,7 @@
 #include <stdio_dev.h>
 #include <serial.h>
 #include <splash.h>
+#include <asm/global_data.h>
 
 #if defined(CONFIG_SYS_I2C)
 #include <i2c.h>
diff --git a/disk/part_efi.c b/disk/part_efi.c
index de3491821f08..933df460c7ba 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -15,6 +15,7 @@
 #include <part.h>
 #include <uuid.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/unaligned.h>
 #include <command.h>
 #include <fdtdec.h>
diff --git a/drivers/ata/libata.c b/drivers/ata/libata.c
index d41200f6c26c..47e2c5c1cc40 100644
--- a/drivers/ata/libata.c
+++ b/drivers/ata/libata.c
@@ -5,6 +5,8 @@
  *		port from the libata of linux kernel
  */
 
+#include <common.h>
+#include <compiler.h>
 #include <libata.h>
 
 u64 ata_id_n_sectors(u16 *id)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index b2b5c699ad14..9021a00cdb6e 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -38,6 +38,7 @@
 #include <dm.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <fis.h>
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index 9c7f14e98f47..6c7cc24cbd92 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -46,6 +46,7 @@
 *		BIOS in u-boot.
 ****************************************************************************/
 #include <common.h>
+#include <compiler.h>
 #include <bios_emul.h>
 #include <errno.h>
 #include <log.h>
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index cca2237136a6..11ebdd52d77e 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -11,6 +11,7 @@
 #include <os.h>
 #include <malloc.h>
 #include <sandboxblockdev.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <dm/device-internal.h>
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index 078c84d5ecab..8cc30cf40eff 100644
--- a/drivers/bootcount/bootcount_ram.c
+++ b/drivers/bootcount/bootcount_ram.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index 51c074bfe233..305a737d3b35 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -9,6 +9,7 @@
 #include <cache.h>
 #include <dm.h>
 #include <hang.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/ofnode.h>
 #include <linux/bitops.h>
diff --git a/drivers/cache/sandbox_cache.c b/drivers/cache/sandbox_cache.c
index 9050c4cf3406..0fb767e43399 100644
--- a/drivers/cache/sandbox_cache.c
+++ b/drivers/cache/sandbox_cache.c
@@ -7,6 +7,7 @@
 #include <cache.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 9927ada201f0..8254ce68e4d5 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
 #include <dm.h>
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index 732ed4d79b9f..a2f105a415f8 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
 #include <dm.h>
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index ccfeded30c56..d83e6590d6c3 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <dm/lists.h>
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index c0610940c3be..a65cadee3729 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <mach/at91_pmc.h>
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
index 86bb71f6128b..b27aeacc7e93 100644
--- a/drivers/clk/at91/clk-h32mx.c
+++ b/drivers/clk/at91/clk-h32mx.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/util.h>
 #include <linux/io.h>
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index b31a1cb68286..c1ca09c21099 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c
index e078fab7b415..87a7d1ea8f28 100644
--- a/drivers/clk/at91/clk-master.c
+++ b/drivers/clk/at91/clk-master.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/at91/clk-plla.c b/drivers/clk/at91/clk-plla.c
index 79d725819fca..4f246afa18ae 100644
--- a/drivers/clk/at91/clk-plla.c
+++ b/drivers/clk/at91/clk-plla.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index af9d72436933..416a5007f685 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index 54ae0d281d0a..11859db32654 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/util.h>
 #include "pmc.h"
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 934cd5787a5c..5d5573962342 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/devres.h>
 #include <dm/read.h>
 #include <linux/bug.h>
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index dc46de2a7cf9..78daf2cbad37 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <time.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index c8840b9e5f11..65ffd32d08e0 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -14,6 +14,7 @@
 #include <syscon.h>
 #include <time.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index a699a3664c33..b00fe1d13b0e 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -11,6 +11,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <errno.h>
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 8d96ec767ac6..9ec41d7705a0 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dt-bindings/clk/mpc83xx-clk.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 16da10c8dd88..b423c9414b2e 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index 30a101fe8621..3223becd753b 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <log.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index 71916dbf3b11..0ef449159d92 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -14,6 +14,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_px30.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/px30-cru.h>
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index a1dd642eefe2..be1f646c070e 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index d3633b69795f..4a72fe293750 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cru_rk3308.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index aa1d98ca2a29..9e6bb9cd88db 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_rv1108.h>
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index efdb0f29058f..360cfa72bc14 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
 #include <dm/uclass.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 355dbd147a9e..c473789edfa9 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <fdtdec.h>
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index dfcb868f6504..0cb78d64c5ee 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
 
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 922e78f99b82..c23763726bba 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/bug.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index c37afa1fe6fc..a49a54c60f98 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -10,6 +10,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 8bb456bc3f01..8a31dc67c9b3 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/of_access.h>
 #include <mapmem.h>
 #include <asm/types.h>
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index a67a237b88fa..e3f2affd1cf0 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 0726be6b795f..b5446b1db02d 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <dm/acpi.h>
 #include <dm/device.h>
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index c3f1b73cd6b4..95c37db5ad0b 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 502c8ebb4331..aca14157ad55 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -7,6 +7,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <thermal.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index 93ce708f652b..3c7395a9f207 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <linux/bitops.h>
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
index e91fe644580b..f5ae35e13254 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <u-boot/rsa-mod-exp.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index d6e7a175d0d5..d554df87ebac 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <ram.h>
 #include <reset.h>
+#include <asm/global_data.h>
 #include "sdram_soc64.h"
 #include <wait_bit.h>
 #include <asm/arch/firewall.h>
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 3c58f59f3ab6..4a8f8dea1c4d 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -13,6 +13,7 @@
 #include <wait_bit.h>
 #include <watchdog.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/misc.h>
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 2945f1e1df54..6235bd959fe9 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <ram.h>
 #include <reset.h>
+#include <asm/global_data.h>
 #include "sdram_s10.h"
 #include <wait_bit.h>
 #include <asm/arch/firewall.h>
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 8cb75fe02a2a..40fcc8d2e0fc 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <ram.h>
 #include <reset.h>
+#include <asm/global_data.h>
 #include "sdram_soc64.h"
 #include <wait_bit.h>
 #include <asm/arch/firewall.h>
diff --git a/drivers/ddr/imx/imx8m/helper.c b/drivers/ddr/imx/imx8m/helper.c
index 5ebf54f5f4af..f23904bf7124 100644
--- a/drivers/ddr/imx/imx8m/helper.c
+++ b/drivers/ddr/imx/imx8m/helper.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index 8686c998457a..d0c0c7365517 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <dm-demo.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/demo/demo-uclass.c b/drivers/demo/demo-uclass.c
index 6c36f03254ff..5856a9891e81 100644
--- a/drivers/demo/demo-uclass.c
+++ b/drivers/demo/demo-uclass.c
@@ -13,6 +13,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/list.h>
 
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 44e1ac54c3f1..4bea7fd900d8 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -4,6 +4,7 @@
  */
 #include <image.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index 5b103cfeaf18..328e275cd374 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -7,6 +7,7 @@
 
 #include <console.h>
 #include <common.h>
+#include <compiler.h>
 #include <cpu_func.h>
 #include <log.h>
 #include <zynqmppl.h>
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c
index 64717a6780e0..045685fcd9c8 100644
--- a/drivers/gpio/74x164_gpio.c
+++ b/drivers/gpio/74x164_gpio.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index 75800d9f31c6..e52124dbd501 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 18f365fa4116..3256469ddc16 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <malloc.h>
 #include <asm/arch/hardware.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <mach/gpio.h>
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index f87588851010..614c489e45df 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <dt-bindings/gpio/gpio.h>
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index a993fd4d7003..2e80196905db 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <errno.h>
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index 86804ac2f5ff..aa600e483a6c 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 9c53299b6a3b..36de7bc7cc68 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c
index 95f8b2ba6cd9..4323f0ba7609 100644
--- a/drivers/gpio/intel_broadwell_gpio.c
+++ b/drivers/gpio/intel_broadwell_gpio.c
@@ -12,6 +12,7 @@
 #include <pci.h>
 #include <syscon.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c
index 73d98fde5549..4a2757d1ac68 100644
--- a/drivers/gpio/intel_ich6_gpio.c
+++ b/drivers/gpio/intel_ich6_gpio.c
@@ -34,6 +34,7 @@
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c
index 416fb56a98d6..710994b4e127 100644
--- a/drivers/gpio/msm_gpio.c
+++ b/drivers/gpio/msm_gpio.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index aaabb0216be0..0340786712ee 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index 6eaa0a08a26a..4200afba1212 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -20,6 +20,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index 1b9a18fe5dc0..8a9214dec3ee 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -28,6 +28,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm-generic/gpio.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/pic32_gpio.c b/drivers/gpio/pic32_gpio.c
index bb1ad256fac0..50c5376e00d1 100644
--- a/drivers/gpio/pic32_gpio.c
+++ b/drivers/gpio/pic32_gpio.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index c78227f4da3b..14f262739d21 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <dm/device-internal.h>
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 4efff5c36438..82ae6d889411 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 9da79455ed3c..fdc90c3f0e0a 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <hwspinlock.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <linux/compat.h>
diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index 9d6c6d80e2a6..ee5dc1db96c1 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -6,6 +6,7 @@
  */
 
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <clk.h>
diff --git a/drivers/i2c/cros_ec_tunnel.c b/drivers/i2c/cros_ec_tunnel.c
index a630817352ec..2853a984fbe3 100644
--- a/drivers/i2c/cros_ec_tunnel.c
+++ b/drivers/i2c/cros_ec_tunnel.c
@@ -9,6 +9,7 @@
 #include <cros_ec.h>
 #include <errno.h>
 #include <i2c.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 5785adedb6d0..34d10abde067 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/pinmux.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include "s3c24x0_i2c.h"
 
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index da933452f515..e7a8dcc82122 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -11,6 +11,7 @@
 #include <i2c.h>		/* Functional interface */
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/fsl_i2c.h>	/* HW definitions */
 #include <clk.h>
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index cfdeadc752cd..6dc89a4e2023 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/delay.h>
 
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index da50d86cc8b4..85cf75ecd922 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <linker_lists.h>
+#include <asm/global_data.h>
 
 struct i2c_adapter *i2c_get_adapter(int index)
 {
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index cec38538da43..1c39b8c9dfc5 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -13,6 +13,7 @@
 #include <gdsys_fpga.h>
 #endif
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/unaligned.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/i2c/iproc_i2c.c b/drivers/i2c/iproc_i2c.c
index b7e9ced89831..b90c0ddba7cd 100644
--- a/drivers/i2c/iproc_i2c.c
+++ b/drivers/i2c/iproc_i2c.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <config.h>
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 584d0a4fef19..4be32a1b38ce 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/delay.h>
 
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 83dcb4021332..52da26ab1823 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -7,6 +7,7 @@
  * Peng Fan <peng.fan at nxp.com>
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <common.h>
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 7360e162eeb5..87e9f9cb21d7 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 
 #include <asm-generic/gpio.h>
 
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index d3cc9b9d8384..21383ecf132f 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index e3d980a9dfb4..c1204815c20e 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -18,6 +18,7 @@
 #include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index cb45d3c100fe..43699fc24108 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -16,6 +16,7 @@
 #else
 #include <asm/arch/s3c24x0_cpu.h>
 #endif
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <i2c.h>
 #include "s3c24x0_i2c.h"
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index f857307e6a4f..26a87006698e 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 1031066b8c41..db69c18cb6de 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -25,6 +25,7 @@
 #endif
 #endif
 #include <i2c.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_SOFT_I2C_GPIO_SCL)
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 37204718ca13..0a507079a2dc 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 7beaccca2c8c..ca2978e79d5e 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -14,6 +14,7 @@
 #include <input.h>
 #include <keyboard.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index 3f9afaed3286..b9337f2db5ce 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/types.h>
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 422ea6f3e5ab..c79c260783e8 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <atsha204a-i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <u-boot/crc.h>
 
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index 56406aa1dd2d..f6383a023985 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -11,6 +11,7 @@
 #include <fs.h>
 #include <fs_loader.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/string.h>
 #include <mapmem.h>
 #include <malloc.h>
diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c
index be181229370e..38111c525485 100644
--- a/drivers/misc/imx8/fuse.c
+++ b/drivers/misc/imx8/fuse.c
@@ -9,6 +9,7 @@
 #include <fuse.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <linux/arm-smccc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index 223aac8518a6..fc9320fa9932 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/lists.h>
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index 20b74fbb18d1..27ecce710fcb 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <hang.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <asm/arch/sci/sci.h>
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index 18da138507c9..1f4437226e7f 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/root.h>
 #include <mailbox.h>
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index 0c53caf448c6..96cbb2a2c51b 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <sdhci.h>
 #include <asm/arch/clk.h>
+#include <asm/global_data.h>
 
 #define ATMEL_SDHC_MIN_FREQ	400000
 #define ATMEL_SDHC_GCK_RATE	240000000
diff --git a/drivers/mmc/ca_dw_mmc.c b/drivers/mmc/ca_dw_mmc.c
index 198c41f451fe..562dcb8ee35e 100644
--- a/drivers/mmc/ca_dw_mmc.c
+++ b/drivers/mmc/ca_dw_mmc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dwmmc.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <errno.h>
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 435ccac59421..94af116d10ce 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dwmmc.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <errno.h>
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index de9fe01bc5c9..0f9109a2c690 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -21,6 +21,7 @@
 #include <fsl_esdhc.h>
 #include <fdt_support.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 788677984bf5..afe4cc69dbe1 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -21,6 +21,7 @@
 #include <mmc.h>
 #include <part.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index bc0d5ffed515..71818f964d37 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/errno.h>
diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index 67d6a05b3b5b..61c209cb0a7f 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index 9f530638e313..7eda1d606fd6 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <sdhci.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index b33f0850738c..eec432a0df65 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <mmc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
 #include <errno.h>
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 56c3e35c9e98..525c1dc90272 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <sdhci.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 9b3dfa13e619..fa7c12837d16 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <sdhci.h>
+#include <asm/global_data.h>
 #include <linux/mbus.h>
 
 #define MVSDH_NAME "mv_sdh"
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 03d5150b207a..8ec1f57a1b70 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 715eee0e3e0d..c5e575286606 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -35,6 +35,7 @@
 #include <palmas.h>
 #endif
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #ifdef CONFIG_OMAP54XX
diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c
index 029e0fbc2bb9..963809fb2aee 100644
--- a/drivers/mmc/pic32_sdhci.c
+++ b/drivers/mmc/pic32_sdhci.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <sdhci.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <mach/pic32.h>
 
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index d80b3fc28f33..83153c5c4c4d 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index 24f599e868aa..240db8a75697 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <sdhci.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index cc99bebc3058..b1e53e8d425a 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index ad386909e904..f7dd2aadc3e1 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -14,6 +14,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 315f95cce829..a279bc69aaf3 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -15,6 +15,7 @@
 #include <mmc.h>
 #include <dm.h>
 #include <part.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 0022f943bd73..16a6e3056dc2 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -12,6 +12,7 @@
 #include <dwmmc.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index 5578feebef72..db0b566a8b73 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -11,6 +11,7 @@
 #include <reset-uclass.h>
 #include <sdhci.h>
 #include <asm/arch/sdhci.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index c65397367662..b56f650f8a76 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <mmc.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <linux/compat.h>
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 356dd9846d6f..c3ea9d7f532a 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index cd4d32959a0d..346244e1110f 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -11,6 +11,7 @@
 #include <flash.h>
 #include <log.h>
 #include <mtd.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index b7289ba5394b..feb46d8cf28f 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -26,6 +26,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 9360d4ed1720..2499cb52d8c0 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -7,6 +7,7 @@
 #include <env.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 698968bc1163..ebb40f933254 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -35,6 +35,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index a30e82166b96..701bfead7731 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <fdtdec.h>
 #include <nand.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 004b6f17a510..6d02d56aeb67 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -29,6 +29,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <nand.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index b9f5bdd95357..dd14c34738ad 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index a58a2c4b6c31..ea0dbe9eeee5 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -12,6 +12,7 @@
 #include <flash.h>
 #include <init.h>
 #include <irq_func.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <mach/pic32.h>
 #include <wait_bit.h>
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index 65320c7ed980..f15228741ffe 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 09c11439b08a..121804e32693 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include "sf_internal.h"
 
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index ccba3947ac56..c7ea60f5acc2 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index 93b26da39261..2097718057bd 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -18,6 +18,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/dma-mapping.h>
 #include <asm/io.h>
 #include "altera_tse.h"
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 810a2b95b19e..1bbb7baeb945 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -41,6 +41,7 @@
 #include <reset.h>
 #include <wait_bit.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <eth_phy.h>
diff --git a/drivers/net/dwmac_s700.c b/drivers/net/dwmac_s700.c
index 9d3f3ac5d93a..2cf36f404940 100644
--- a/drivers/net/dwmac_s700.c
+++ b/drivers/net/dwmac_s700.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <clk.h>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index bb55be9a2679..468be69886ca 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -18,6 +18,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 84db6be624a4..26e9523288e1 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/bug.h>
 #include <asm/io.h>
 #include <linux/delay.h>
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index e27f7e5321ad..f3eea57fb9a8 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -18,6 +18,7 @@
 #include <config.h>
 #include <net.h>
 #include <miiphy.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
 #include <asm/immap.h>
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 292690de9615..d45f17eb8dda 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 8d95ee15ffdd..98d7c39f9fee 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -12,6 +12,7 @@
 #include <net.h>
 #include <phy.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/periph.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 67da549fdbf8..b340c5761087 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/types.h>
 #include <malloc.h>
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index b80a259ff757..cda9b16cc240 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 /*
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index f94a2d8123c3..d881c5eb871b 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -18,6 +18,7 @@
 #include <net.h>
 #include <miiphy.h>
 #include <asm/fec.h>
+#include <asm/global_data.h>
 #include <asm/immap.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
index 393605512d98..da5075172fa2 100644
--- a/drivers/net/mcfmii.c
+++ b/drivers/net/mcfmii.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #ifdef CONFIG_MCF547x_8x
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 12be584638fa..282c2599d3c4 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -11,6 +11,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/cpm_8xx.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 2f9464b961a9..bf5f6f4b6723 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -18,6 +18,7 @@
 #include <malloc.h>
 #include <miiphy.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 4c7d06ca40e5..5fd668b5e42c 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -21,6 +21,7 @@
 #include <config.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index a5747a25abe0..37a8a7849f45 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 9d9f746e1dba..3228672fc4ae 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -11,6 +11,7 @@
 #include <phy.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index ba97a54c0676..bb5aa3513b61 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -16,6 +16,7 @@
 #include <ioports.h>
 #include <ppc_asm.tmpl>
 #include <miiphy.h>
+#include <asm/global_data.h>
 
 #define BB_MII_RELOCATE(v,off) (v += (v?off:0))
 
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 67789897c256..f82547593864 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index e2feb17048cc..74105c0b7d6b 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -5,11 +5,11 @@
  * Copyright (C) 2018 Xilinx, Inc.
  */
 
+#include <common.h>
 #include <dm.h>
 #include <log.h>
 #include <phy.h>
-#include <config.h>
-#include <common.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index 6a2084947b03..bbc305f81dbe 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -14,6 +14,7 @@
 #include <console.h>
 #include <time.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 886f53ee8274..23d5c88a88d3 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 4bd94c31031d..6dddae911b04 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <net.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index 4f7e3d42438c..51d80f549673 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <asm/eth.h>
+#include <asm/global_data.h>
 #include <asm/test.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 4cbffb14c517..49b4a91875ab 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -18,6 +18,7 @@
 #include <netdev.h>
 #include <miiphy.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 0f7ada8c3e2c..c11a1c443eed 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -16,6 +16,7 @@
 #include <reset.h>
 #include <syscon.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 546cc6ccb6ef..a65700020d58 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index ca93edb70e31..3140f2515fbf 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <cpsw.h>
 #include <dm/device_compat.h>
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 50f0d33a83b5..c25902a7032a 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <dm.h>
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 99d4d85c5270..65abc7d1834a 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <net.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 64c18bae74b0..9f2327b92cd8 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <console.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 1d09c5ac4f6b..e72a60c13180 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/fsl_serdes.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 40cc9f1090ef..7e492b42163c 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 664e8379eb55..25a755627c0c 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include <command.h>
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index c9afe7515014..167fe026e8b9 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/of_access.h>
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index fa29d69e859a..39284badf202 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -38,6 +38,7 @@
 #include <video.h>
 #include <video_fb.h>
 #include <acpi/acpi_s3.h>
+#include <asm/global_data.h>
 #include <linux/screen_info.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index c773f8d28d2e..33ecd25f848f 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <log.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <linux/delay.h>
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index 742dd93633e6..16b2a2da7e7d 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -11,6 +11,7 @@
 #include <power-domain.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c
index 890b6a8fb69a..354a1454a9f0 100644
--- a/drivers/pci/pcie_ecam_generic.c
+++ b/drivers/pci/pcie_ecam_generic.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <asm/global_data.h>
 
 #include <asm/io.h>
 
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index ab33459e28e0..e431ef211edd 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <asm/fsl_serdes.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include "pcie_fsl.h"
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 9f102c64c602..2aedbdd0e568 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index 25b5272d4ed7..3c7c4ca18e8b 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index eba230e3a5fc..6de93fac997f 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/devres.h>
 #include <errno.h>
 #include <pci_ep.h>
diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index fef0a75f1158..814650f1e15c 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/soc.h>
+#include <linux/libfdt.h>
 #include "pcie_layerscape_fixup_common.h"
 
 void ft_pci_setup(void *blob, struct bd_info *bd)
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index 428bfcab09f2..96c6527f806e 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/arch/fsl_serdes.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c
index 25c6ddebce07..7ae5b48bb92c 100644
--- a/drivers/pci/pcie_layerscape_rc.c
+++ b/drivers/pci/pcie_layerscape_rc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/arch/fsl_serdes.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c
index 51b2171f9fa0..35ca104300bf 100644
--- a/drivers/pci/pcie_phytium.c
+++ b/drivers/pci/pcie_phytium.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 /**
diff --git a/drivers/pci/pcie_rockchip.c b/drivers/pci/pcie_rockchip.c
index 04609f12962f..7d84be36be98 100644
--- a/drivers/pci/pcie_rockchip.c
+++ b/drivers/pci/pcie_rockchip.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <generic-phy.h>
 #include <pci.h>
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 713ad49d0458..88660a9957a9 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 #include <asm/io.h>
diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c
index 38a5f0837690..71b6bfa63828 100644
--- a/drivers/pci_endpoint/pci_ep-uclass.c
+++ b/drivers/pci_endpoint/pci_ep-uclass.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <linux/log2.h>
 #include <pci_ep.h>
 
diff --git a/drivers/pci_endpoint/pcie-cadence-ep.c b/drivers/pci_endpoint/pcie-cadence-ep.c
index 74dfdde154ee..e392fae338ad 100644
--- a/drivers/pci_endpoint/pcie-cadence-ep.c
+++ b/drivers/pci_endpoint/pcie-cadence-ep.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <pci_ep.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <linux/log2.h>
 #include "pcie-cadence.h"
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index dc188c44e0d6..e9ba4cfec228 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index 27bff27ff7ec..5ef6129f349d 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index 15e80049def6..484b28745e06 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index adc454ddd48b..ae0968ab5b2e 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index c5ea6ca31f1c..29749b4c3fa3 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <generic-phy.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c
index 83928cffe061..c3bec8263f8e 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <generic-phy.h>
 #include <reset.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index c9c8e1c54282..6a5dc7ee44f7 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <generic-phy.h>
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index 2a20f7601c02..c6b1dc297abc 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <bitfield.h>
 #include <dm.h>
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index 3f49851bcaba..41cee0eb740d 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <generic-phy.h>
 #include <asm/io.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index 61e80818743d..b3f9f6a01fd7 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index 2d5a4a3ab238..d27848c1ddd6 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos.c b/drivers/pinctrl/exynos/pinctrl-exynos.c
index 4cdc071d559d..cc7ef7998950 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include "pinctrl-exynos.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index d4539b02d881..664af76d5848 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
index fc9d8b5ad10a..1b51c2292717 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index fb497803b939..1f61a84c29dc 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -20,6 +20,7 @@
 #include <config.h>
 #include <dm.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 2206e958ec70..c2b9c80586bc 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <asm/system.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 48c7bde37526..1596dcc4747e 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-imx8.c b/drivers/pinctrl/nxp/pinctrl-imx8.c
index c1b0ca438aa6..7af9506d5049 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx8.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx8.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index db463fc04b96..1067654e07e1 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index fdb7920b558d..d325422f8547 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index cd7b32ce3460..30f2bebbc78f 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <asm/hardware.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index 8e942a828023..7d6bdc1d2bd1 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <linux/bug.h>
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index aba881047479..79a523330536 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index 911af1297b8a..79c95034985f 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 71fa29a3891f..fedab6605e9e 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -4,6 +4,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/arch/gpio.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 9d7814a5f25d..b368336c887f 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index ec1cb9b652f3..8abad950431c 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 889b65a47ff8..961382f33e1c 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/power-domain.h>
 #include <dm/device-internal.h>
diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index 0ef460df8c2d..f6681c7b0b5c 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/power-domain.h>
 #include <asm/mach-imx/sys_proto.h>
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index 31c9139c646d..cb9238972f27 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/bd71837.h>
diff --git a/drivers/power/pmic/mc34708.c b/drivers/power/pmic/mc34708.c
index 66253a4a43b0..40d732224b6c 100644
--- a/drivers/power/pmic/mc34708.c
+++ b/drivers/power/pmic/mc34708.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <fsl_pmic.h>
 #include <i2c.h>
+#include <asm/global_data.h>
 #include <power/pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index 0c9d9a366e8e..786baa5e2597 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/pca9450.h>
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index f8706227058f..185e38e32a4e 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <log.h>
 #include <pwm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <power/regulator.h>
 
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c
index 77bc659fefeb..0b819cfbf788 100644
--- a/drivers/pwm/pwm-sifive.c
+++ b/drivers/pwm/pwm-sifive.c
@@ -18,6 +18,7 @@
 #include <dm.h>
 #include <pwm.h>
 #include <regmap.h>
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <linux/log2.h>
 #include <linux/bitfield.h>
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 911da1d42614..0fb894804b57 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -12,6 +12,7 @@
 #include <pwm.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/pwm.h>
 #include <linux/bitops.h>
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index e2ae1a800919..ffcf60c55842 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -10,6 +10,7 @@
 #include <pwm.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
 #include <asm/arch/gpio.h>
diff --git a/drivers/qe/fdt.c b/drivers/qe/fdt.c
index fd7f14955adb..6195c7c4442c 100644
--- a/drivers/qe/fdt.c
+++ b/drivers/qe/fdt.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <fsl_qe.h>
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 61ca4760c852..79dcbf049a05 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <command.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/immap_qe.h>
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index a226bac2cc34..2a78291deb5e 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <ram.h>
 #include <asm/bitops.h>
+#include <asm/global_data.h>
 #include <dt-bindings/memory/mpc83xx-sdram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
index 094693ce2474..4a24854a3df8 100644
--- a/drivers/ram/rockchip/sdram_rk322x.c
+++ b/drivers/ram/rockchip/sdram_rk322x.c
@@ -11,6 +11,7 @@
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_rk322x.h>
diff --git a/drivers/ram/sandbox_ram.c b/drivers/ram/sandbox_ram.c
index be4abed0c022..910dce623e90 100644
--- a/drivers/ram/sandbox_ram.c
+++ b/drivers/ram/sandbox_ram.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <ram.h>
+#include <asm/global_data.h>
 #include <asm/test.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/fu540_ddr.c
index 2eef1e756586..7208d350f410 100644
--- a/drivers/ram/sifive/fu540_ddr.c
+++ b/drivers/ram/sifive/fu540_ddr.c
@@ -13,6 +13,7 @@
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <wait_bit.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 38390c0d552c..7b29c368126b 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <ram.h>
 #include <reset.h>
+#include <asm/global_data.h>
 #include "stm32mp1_ddr.h"
 #include "stm32mp1_tests.h"
 
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 952006aa1493..b0c510ad5e99 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <rand.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/log2.h>
 #include "stm32mp1_tests.h"
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index 9640a81e5347..22779d0cb0d3 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <remoteproc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
 #include <dm.h>
diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c
index 350450d1fb44..1a5dddbe0d21 100644
--- a/drivers/remoteproc/ti_power_proc.c
+++ b/drivers/remoteproc/ti_power_proc.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <remoteproc.h>
+#include <asm/global_data.h>
 #include <mach/psc_defs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index ac3a99f9bffd..2fdc069ce16e 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -13,6 +13,7 @@
 #include <reset-uclass.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <dt-bindings/reset/stih407-resets.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f759ea8893d1..f20659358869 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -13,6 +13,7 @@
 #include <watchdog.h>
 #include <serial.h>
 #include <debug_uart.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 702109b23b6a..840d89f16fa5 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -14,6 +14,7 @@
 #include <reset.h>
 #include <serial.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <linux/err.h>
 #include <linux/types.h>
 #include <asm/io.h>
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index f09d291e043c..8a7f171e0416 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -17,6 +17,7 @@
 #include <os.h>
 #include <serial.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/state.h>
 
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 0027625ebfd1..3dbbd2a79380 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -12,6 +12,7 @@
 #include <serial.h>
 #include <stdio_dev.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/of_access.h>
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 53358acb81f2..f428ddb2ed5b 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -10,6 +10,7 @@
 #include <serial.h>
 #include <stdio_dev.h>
 #include <post.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <errno.h>
 #include <linux/delay.h>
diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index 04063fbe3997..c1be34960ecf 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <serial.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index 83dc96c449ca..d8482ba7047c 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <serial.h>
 #include <linux/compiler.h>
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 95cbe63b3d14..8631d790e6f3 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -10,6 +10,7 @@
 #include <fsl_lpuart.h>
 #include <log.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <serial.h>
 #include <dm/device_compat.h>
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index 402fd5343c13..6b907fe19202 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_coldfire.h>
 #include <serial.h>
 #include <linux/compiler.h>
diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c
index 50d6e70f1773..0978930dcd4f 100644
--- a/drivers/serial/serial_mpc8xx.c
+++ b/drivers/serial/serial_mpc8xx.c
@@ -10,6 +10,7 @@
 #include <serial.h>
 #include <watchdog.h>
 #include <asm/cpm_8xx.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index c8946c3aae8d..13c7f9d809ec 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <serial.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <dm/pinctrl.h>
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index 778a04d87e0c..9715f372ecfe 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <serial.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/types.h>
 #include <linux/err.h>
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index de6cefcd3acf..1f8eeb2cbfe1 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -9,6 +9,7 @@
 #include <watchdog.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <serial.h>
 #include <linux/compiler.h>
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index ef394b723509..1353e2f7ccb5 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -8,6 +8,7 @@
 #include <clock_legacy.h>
 #include <ns16550.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index a492063e39c2..ce6c5db762f3 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <serial.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 2772c25f1d2d..1ae5bac249a9 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -11,6 +11,7 @@
 /* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */
 
 #include <common.h>
+#include <asm/global_data.h>
 /* For get_bus_freq() */
 #include <clock_legacy.h>
 #include <dm.h>
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index 6f8f7e1198ae..6fc126f404b7 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -23,6 +23,7 @@
 #include <hang.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/regs-uart.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/platform_data/serial_pxa.h>
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 9bb2be21e7b8..986c5ca8107e 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 13b179f03ded..d697d62d910c 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <clk.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index fcc47fb348fd..c3f0a3cb65d2 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index 33ff396bff7e..aa3c9efc8a0e 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <log.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 2557269bc546..bf1696e85e01 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/of_access.h>
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index bc3c1e85f8cf..a7423d46c185 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -18,6 +18,7 @@
 #include <log.h>
 #include <pch.h>
 #include <sound.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 static int bd82x6x_azalia_probe(struct udevice *dev)
diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c
index 39c6e226ba75..9e7d40d0a81e 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 
diff --git a/drivers/spi/bcmstb_spi.c b/drivers/spi/bcmstb_spi.c
index fb1dc46b704c..f400a0f57323 100644
--- a/drivers/spi/bcmstb_spi.c
+++ b/drivers/spi/bcmstb_spi.c
@@ -5,6 +5,7 @@
  * Author: Thomas Fitzsimmons <fitzsim at fitzsim.org>
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <command.h>
 #include <config.h>
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 8fa6d3510756..242dc9d89095 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/spi_coldfire.h>
 #include <spi.h>
 #include <malloc.h>
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index a11433db1e9a..c1b21a8cd358 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <spi.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <dm.h>
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index d338ff5a0bd1..03c03ab4874d 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -18,6 +18,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index b22c9b3a09db..1912d676a681 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -9,6 +9,7 @@
  * Haikun Wang (B53464 at freescale.com)
  */
 
+#include <asm/global_data.h>
 #include <linux/math64.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 5c76fd962e98..3dd98aadbaa7 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index eec968e5ec12..84b4714c0507 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -25,6 +25,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index e860b9ec64be..502f5153cc43 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -12,6 +12,7 @@
 #include <spi.h>
 #include <clk.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index e90a06a66dec..466355b0178e 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index fbf9575851a9..afe80e53d2ba 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -20,6 +20,7 @@
 #include <dm.h>
 #include <spi.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index 52e9eff743c8..ffba2d84f1fd 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
 #include <malloc.h>
diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c
index 32bb8c8d2127..01ffaea4c346 100644
--- a/drivers/spi/pl022_spi.c
+++ b/drivers/spi/pl022_spi.c
@@ -12,6 +12,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/platform_data/spi_pl022.h>
 #include <linux/io.h>
 #include <spi.h>
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index 3ea59b8fb82a..72a9e464776f 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index 153bbf8b2557..87e1e2417cea 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index cd2e17bfd1a2..be6ef1757a07 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -27,6 +27,7 @@
 #include <fdt_support.h>
 #include <reset.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index cffd9cf0b0e7..46b5249f5095 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 771744dfe438..5066f43ba614 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index f9846ee3665e..d725a9574854 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index ae16b45dcb47..293b16c6fe93 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 5fdbb494420f..26cd83be76ab 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/omap.h>
 #include <malloc.h>
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 114bd8abd7a6..2753d0cd2d80 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index 3f39ef05f2d6..1358bd103555 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index 9923931e36ec..b4604a4b2020 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index a72986be9078..cd2c7d40b86e 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 2f430aed9cb8..6b12a96ee3c0 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <spmi/spmi.h>
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 3f5414ed1f8a..d1b47eebac75 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <regmap.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/root.h>
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 456f006bc126..ddd7e26d6968 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <sysreset.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #include "sysreset_mpc83xx.h"
diff --git a/drivers/sysreset/sysreset_sti.c b/drivers/sysreset/sysreset_sti.c
index 3482d2a07875..8465a62e1855 100644
--- a/drivers/sysreset/sysreset_sti.c
+++ b/drivers/sysreset/sysreset_sti.c
@@ -9,6 +9,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <sysreset.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 83ec753802ac..dc92e6b603e9 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <log.h>
 #include <thermal.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device.h>
 #include <asm/arch/sci/sci.h>
diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c
index 4ca22089b8b2..d8acfef49252 100644
--- a/drivers/thermal/imx_tmu.c
+++ b/drivers/thermal/imx_tmu.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/timer/arc_timer.c b/drivers/timer/arc_timer.c
index 8c574ec5af1d..c6771d15966e 100644
--- a/drivers/timer/arc_timer.c
+++ b/drivers/timer/arc_timer.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <timer.h>
 #include <asm/arcregs.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index e6b6dfe3765c..1ad3b5db8fe4 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <init.h>
 #include <timer.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/err.h>
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index ad8bb28e8b39..51ad79aa6eb2 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -14,6 +14,7 @@
 #include <time.h>
 #include <timer.h>
 #include <watchdog.h>
+#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <linux/bitops.h>
 
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index bea97159ebe7..cd62d8690228 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <clk.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 7a5a48425277..7e7612f154ea 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/ofnode.h>
 #include <mapmem.h>
 #include <asm/arch-rockchip/timer.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 14dde950a183..d90755a7e74f 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 93c959ff4445..b4c40fe1c2d5 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -14,6 +14,7 @@
 #include <time.h>
 #include <timer.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/i8254.h>
 #include <asm/ibmpc.h>
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 9a8145e6ba1f..8ff6c461f19f 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <spi.h>
 #include <tpm-v2.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index d4ae18693c60..400bdf72ad79 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <linux/usb/otg.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/phy.h>
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 3e6c1429d665..febbfe5d2438 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 6a37c5d982a6..9f1ec7ea9263 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 5423d10abe77..eed67e77dc67 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <pci.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <usb/ehci-ci.h>
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 62414bb11028..9f6b8a2ae5fa 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <usb.h>
 #include <linux/delay.h>
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index caafa688993f..516d64953591 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <usb.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <usb/ehci-ci.h>
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 37b59758bb38..f9e72ba0d967 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -9,6 +9,7 @@
 #include <usb.h>
 #include <errno.h>
 #include <wait_bit.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <usb/ehci-ci.h>
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 2768d4097499..86eac41ea667 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <usb.h>
 #include <errno.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 6fb7a7f6e097..77c2534da44c 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 67488ddb5049..e13a6810b8da 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index da63cc2c2243..fbd5f98f3685 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <log.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index 2fbe9bebf17e..8995e78fee49 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index f4f26d86b3ff..bf58f13480b5 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/usb/otg.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index f1cf9160d565..93caa821a1d2 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <hang.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index 2707ff59c7d3..2bf4d85d021c 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -20,6 +20,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/utils.h>
 #include <linux/delay.h>
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 38def2816b2a..bfe76349fda4 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <part.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index ae8ec26468f0..e5e0aeec3502 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <part.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c
index 8399c6f74cf8..7e9c6da4545f 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <video_bridge.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index df6a761d2dbb..416a1c07b13f 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -14,6 +14,7 @@
 #include <vbe.h>
 #include <video.h>
 #include <asm/cpu.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/mtrr.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index badade353ec1..3a51ad4a9d42 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -74,6 +74,7 @@
 #include <version.h>
 #include <malloc.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 #if defined(CONFIG_VIDEO_MXS)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 4984dda8477d..462c318126dd 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <video_fb.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/list.h>
 #include <linux/fb.h>
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 999ee1c14af6..36595556f137 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -11,6 +11,7 @@
 #include <display.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index 979b90918271..26068ab056f2 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <panel.h>
 #include <video.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index 042aa9a5b9eb..c56eadc8237b 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <dm/devres.h>
 #include <linux/libfdt.h>
 #include <linux/compat.h>
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index e9d05c93946a..60b97e40633e 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -8,6 +8,7 @@
 
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index 2587f53ac1d4..cd742b2273cd 100644
--- a/drivers/video/ivybridge_igd.c
+++ b/drivers/video/ivybridge_igd.c
@@ -12,6 +12,7 @@
 #include <pci_rom.h>
 #include <vbe.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/mtrr.h>
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 1e6da0e1e25f..7f9443828b2d 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -13,6 +13,7 @@
 #include <display.h>
 #endif
 #include <fdtdec.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <os.h>
 #include <fdt_support.h>
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index 4868839ff7df..2d095c6a28eb 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <part.h>
+#include <asm/global_data.h>
 #include <linux/sizes.h>
 #include <asm/arch/mem.h>
 #include <dm/device-internal.h>
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 6589a2a09d23..d84adb004bcc 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
index 68d1507cda46..d1bf82c5b27a 100644
--- a/drivers/video/rockchip/rk3288_vop.c
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -11,6 +11,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/grf_rk3288.h>
diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
index d5a7aa8ac1b3..fe424d51f73b 100644
--- a/drivers/video/rockchip/rk3399_vop.c
+++ b/drivers/video/rockchip/rk3399_vop.c
@@ -12,6 +12,7 @@
 #include <regmap.h>
 #include <video.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include "rk_vop.h"
 
diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index 04f795a213c0..24f3caabb011 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -11,6 +11,7 @@
 #include <panel.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index f811913ce5e2..2e235cb6c2cd 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <panel.h>
 #include <regmap.h>
+#include <asm/global_data.h>
 #include "rk_mipi.h"
 #include <syscon.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index 9032eb430e7f..7e864698697a 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -13,6 +13,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index d806f35debba..48470e6f5567 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -8,6 +8,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <video.h>
+#include <asm/global_data.h>
 #include <asm/sdl.h>
 #include <asm/state.h>
 #include <asm/u-boot-sandbox.h>
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index 0c5b40c30b8d..e7c2e184ba5c 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <log.h>
 #include <video.h>
+#include <asm/global_data.h>
 
 static int simple_video_probe(struct udevice *dev)
 {
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index 283151398bbf..b09ecb73365b 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -18,6 +18,7 @@
 #include <reset.h>
 #include <video.h>
 #include <video_bridge.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <dm/device-internal.h>
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index 2f3427a32ee6..ac031dc6c943 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -14,6 +14,7 @@
 #include <reset.h>
 #include <video.h>
 #include <video_bridge.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <dm/device-internal.h>
diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c
index 49bf083a8d14..10f7e2ac2346 100644
--- a/drivers/video/sunxi/sunxi_lcd.c
+++ b/drivers/video/sunxi/sunxi_lcd.c
@@ -12,6 +12,7 @@
 #include <backlight.h>
 #include <dm.h>
 #include <edid.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/lcdc.h>
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 827ea13d13a5..a32478ea6277 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -12,6 +12,7 @@
 #include <pwm.h>
 #include <video.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 650891e49dd0..1654d02860be 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -14,6 +14,7 @@
 #include <video.h>
 #include <video_console.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c
index 89003eea7276..ed7373eac84b 100644
--- a/drivers/video/videomodes.c
+++ b/drivers/video/videomodes.c
@@ -60,6 +60,7 @@
 #include <edid.h>
 #include <env.h>
 #include <errno.h>
+#include <fdtdec.h>
 #include <linux/ctype.h>
 
 #include "videomodes.h"
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c
index 5da8e56505fb..7af680a5c250 100644
--- a/drivers/watchdog/armada-37xx-wdt.c
+++ b/drivers/watchdog/armada-37xx-wdt.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 33f5c351d5be..e64831132dc7 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -15,6 +15,7 @@
  */
 
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/at91_wdt.h>
 #include <common.h>
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 1cd8866ef8d8..ff5c3243ce73 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index d33e2ac3dc19..3284321299d0 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -17,6 +17,7 @@
 #include <clk.h>
 #include <log.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 2eae431ba6c1..b837b045fa59 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -5,6 +5,7 @@
  * Copyright 2020 NXP
  */
 
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm/device.h>
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 23fef2147f8f..0eea0ab388ec 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -6,6 +6,7 @@
  */
 
 #include <log.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <common.h>
 #include <clk.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index e632f077f342..28f7918c4673 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <time.h>
 #include <wdt.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 
diff --git a/drivers/xen/gnttab.c b/drivers/xen/gnttab.c
index becf7a79fbfc..a706dfac8ae7 100644
--- a/drivers/xen/gnttab.c
+++ b/drivers/xen/gnttab.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <malloc.h>
 
+#include <asm/global_data.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <asm/xen/system.h>
diff --git a/env/callback.c b/env/callback.c
index 4054b9ef58b3..638a02b28f78 100644
--- a/env/callback.c
+++ b/env/callback.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <env.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/common.c b/env/common.c
index ed18378000f8..d6d1fa3a1f7d 100644
--- a/env/common.c
+++ b/env/common.c
@@ -14,6 +14,7 @@
 #include <env_internal.h>
 #include <log.h>
 #include <sort.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <search.h>
 #include <errno.h>
diff --git a/env/eeprom.c b/env/eeprom.c
index e300470ad0fc..ba168014e248 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -12,6 +12,7 @@
 #include <eeprom.h>
 #include <env.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <u-boot/crc.h>
 #if defined(CONFIG_I2C_ENV_EEPROM_BUS)
diff --git a/env/env.c b/env/env.c
index 42c7d8155e1a..51f55ec3fe87 100644
--- a/env/env.c
+++ b/env/env.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 
diff --git a/env/ext4.c b/env/ext4.c
index f823b694099b..d4869a1a4577 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -31,6 +31,7 @@
 #include <errno.h>
 #include <ext4fs.h>
 #include <mmc.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/env/flash.c b/env/flash.c
index 722d5adf8b69..ebee9069e4e3 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -15,6 +15,7 @@
 #include <env_internal.h>
 #include <flash.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <malloc.h>
 #include <search.h>
diff --git a/env/mmc.c b/env/mmc.c
index ba872701b0d5..3fecdff816ba 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -6,6 +6,7 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <asm/global_data.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/nand.c b/env/nand.c
index 0d7ee19bc232..be82e97d69cd 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -17,6 +17,7 @@
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/env/nowhere.c b/env/nowhere.c
index d33fdf27d0c4..23028661084c 100644
--- a/env/nowhere.c
+++ b/env/nowhere.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/nvram.c b/env/nvram.c
index 7c8ea26f9682..f4126858b5b4 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -27,6 +27,7 @@
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <search.h>
 #include <errno.h>
diff --git a/env/onenand.c b/env/onenand.c
index a2477cef9bed..c8da3ff8114b 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <malloc.h>
 #include <search.h>
diff --git a/env/remote.c b/env/remote.c
index d93a137376e3..166bebf52b5b 100644
--- a/env/remote.c
+++ b/env/remote.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env_internal.h>
+#include <asm/global_data.h>
 #include <linux/stddef.h>
 #include <u-boot/crc.h>
 
diff --git a/env/sf.c b/env/sf.c
index 937778aa37d5..f01d1dbcb216 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <uuid.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <u-boot/crc.h>
 
diff --git a/env/ubi.c b/env/ubi.c
index 5502efe28b62..eb21c4f38b49 100644
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 5fb460454f23..3e326fc64052 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -1,5 +1,6 @@
 #include <common.h>
 #include <exports.h>
+#include <asm/global_data.h>
 #include <linux/compiler.h>
 
 struct cmd_tbl;
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 1a340b4764c6..361baa35c921 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <ext_common.h>
+#include <asm/global_data.h>
 #include "ext4_common.h"
 
 static struct revoke_blk_list *revk_blk_list;
diff --git a/fs/ext4/ext4_journal.h b/fs/ext4/ext4_journal.h
index 43fb8e766411..8c974cff609d 100644
--- a/fs/ext4/ext4_journal.h
+++ b/fs/ext4/ext4_journal.h
@@ -17,6 +17,7 @@
 #ifndef __EXT4_JRNL__
 #define __EXT4_JRNL__
 
+#include <asm/global_data.h>
 #define EXT4_FEATURE_COMPAT_HAS_JOURNAL		0x0004
 
 #define EXT2_JOURNAL_INO		8	/* Journal inode */
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 4c89152ce4ad..691d7e29b6d7 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -24,11 +24,11 @@
 #include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
-#include "ext4_common.h"
 #include <div64.h>
 #include <malloc.h>
 #include <part.h>
 #include <uuid.h>
+#include "ext4_common.h"
 
 int ext4fs_symlinknest;
 struct ext_filesystem ext_fs;
diff --git a/fs/fs.c b/fs/fs.c
index 17e4bc33f762..07e5767df433 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -18,6 +18,7 @@
 #include <sandboxfs.h>
 #include <ubifs_uboot.h>
 #include <btrfs.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <linux/math64.h>
diff --git a/fs/reiserfs/reiserfs_private.h b/fs/reiserfs/reiserfs_private.h
index c8867e24fefa..5936f2140056 100644
--- a/fs/reiserfs/reiserfs_private.h
+++ b/fs/reiserfs/reiserfs_private.h
@@ -15,6 +15,8 @@
  * from the original reiser fs code, as found in the linux kernel.
  */
 
+#include <compiler.h>
+
 #ifndef __BYTE_ORDER
 #if defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
 #define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 70beb848e1b0..d6be5c947d7e 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -17,6 +17,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <asm/global_data.h>
 #include "ubifs.h"
 #include <part.h>
 #include <dm/devres.h>
diff --git a/include/audio_codec.h b/include/audio_codec.h
index 258709954693..2ea4ff096e62 100644
--- a/include/audio_codec.h
+++ b/include/audio_codec.h
@@ -7,6 +7,8 @@
 #ifndef __AUDIO_CODEC_H__
 #define __AUDIO_CODEC_H__
 
+struct udevice;
+
 /*
  * An audio codec turns digital data into sound with various parameters to
  * control its operation.
diff --git a/include/axi.h b/include/axi.h
index 3e40692cdfda..59fb0b2e4584 100644
--- a/include/axi.h
+++ b/include/axi.h
@@ -7,6 +7,8 @@
 #ifndef _AXI_H_
 #define _AXI_H_
 
+struct udevice;
+
 /**
  * enum axi_size_t - Determine size of AXI transfer
  * @AXI_SIZE_8:  AXI sransfer is 8-bit wide
diff --git a/include/backlight.h b/include/backlight.h
index ac59eb293b45..b44da50bc306 100644
--- a/include/backlight.h
+++ b/include/backlight.h
@@ -7,6 +7,8 @@
 #ifndef _BACKLIGHT_H
 #define _BACKLIGHT_H
 
+struct udevice;
+
 enum {
 	BACKLIGHT_MAX		= 100,
 	BACKLIGHT_MIN		= 0,
diff --git a/include/board.h b/include/board.h
index 678b652b0aa3..a43f35a021b0 100644
--- a/include/board.h
+++ b/include/board.h
@@ -4,6 +4,8 @@
  * Mario Six,  Guntermann & Drunck GmbH, mario.six at gdsys.cc
  */
 
+struct udevice;
+
 /*
  * This uclass encapsulates hardware methods to gather information about a
  * board or a specific device such as hard-wired GPIOs on GPIO expanders,
@@ -32,6 +34,7 @@
  */
 
 #if CONFIG_IS_ENABLED(BOARD)
+
 struct board_ops {
 	/**
 	 * detect() - Run the hardware info detection procedure for this
diff --git a/include/bootcount.h b/include/bootcount.h
index cd304039849b..bb235407e301 100644
--- a/include/bootcount.h
+++ b/include/bootcount.h
@@ -7,6 +7,7 @@
 #define _BOOTCOUNT_H__
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <env.h>
diff --git a/include/cache.h b/include/cache.h
index 32f59fd8f714..ecb7956efd5c 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -6,6 +6,8 @@
 #ifndef __CACHE_H
 #define __CACHE_H
 
+struct udevice;
+
 /*
  * Structure for the cache controller
  */
diff --git a/include/common.h b/include/common.h
index f0679ac70544..71df59bca0e5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -23,7 +23,6 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
-#include <asm/global_data.h>	/* global data used for startup functions */
 #include <display_options.h>
 #include <vsprintf.h>
 #endif	/* __ASSEMBLY__ */
diff --git a/include/cpu.h b/include/cpu.h
index 78e88b9ed092..089e74c262b3 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -7,6 +7,8 @@
 #ifndef __CPU_H
 #define __CPU_H
 
+struct udevice;
+
 /**
  * struct cpu_platdata - platform data for a CPU
  * @cpu_id:	   Platform-specific way of identifying the CPU.
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 5145fb4e1459..c29134976aa0 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -10,6 +10,7 @@
 #ifndef _DM_DEVICE_INTERNAL_H
 #define _DM_DEVICE_INTERNAL_H
 
+#include <asm/global_data.h>
 #include <dm/ofnode.h>
 
 struct device_node;
diff --git a/include/dma.h b/include/dma.h
index 6ff591977b14..a64580a61ff7 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -13,6 +13,8 @@
 #include <linux/errno.h>
 #include <linux/types.h>
 
+struct udevice;
+
 /*
  * enum dma_direction - dma transfer direction indicator
  * @DMA_MEM_TO_MEM: Memcpy mode
diff --git a/include/exports.h b/include/exports.h
index b30055409164..e89cc333e52a 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -2,6 +2,7 @@
 #define __EXPORTS_H__
 
 #include <irq_func.h>
+#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #ifndef __ASSEMBLY__
diff --git a/include/ext_common.h b/include/ext_common.h
index bc3324172a08..30a0c248414a 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -20,6 +20,8 @@
 #ifndef __EXT_COMMON__
 #define __EXT_COMMON__
 
+#include <compiler.h>
+
 struct cmd_tbl;
 
 #define SECTOR_SIZE		0x200
diff --git a/include/image-sparse.h b/include/image-sparse.h
index 234c237b845f..0572dbd0a283 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -3,6 +3,7 @@
  * Copyright 2014 Broadcom Corporation.
  */
 
+#include <compiler.h>
 #include <part.h>
 #include <sparse_format.h>
 
diff --git a/include/init.h b/include/init.h
index 0f48ccb57ad2..3b00e1d8aca9 100644
--- a/include/init.h
+++ b/include/init.h
@@ -10,16 +10,15 @@
 #ifndef __INIT_H_
 #define __INIT_H_	1
 
-#include <linux/types.h>
-
-struct global_data;
-
 #ifndef __ASSEMBLY__		/* put C only stuff in this section */
 
+#include <linux/types.h>
+
 /* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */
 #ifdef CONFIG_EFI_STUB
 #define ll_boot_init()	false
 #else
+#include <asm/global_data.h>
 #define ll_boot_init()	(!(gd->flags & GD_FLG_SKIP_LL_INIT))
 #endif
 
diff --git a/include/led.h b/include/led.h
index 7bfdddfd6fab..02766fa56fb6 100644
--- a/include/led.h
+++ b/include/led.h
@@ -7,6 +7,8 @@
 #ifndef __LED_H
 #define __LED_H
 
+struct udevice;
+
 /**
  * struct led_uc_plat - Platform data the uclass stores about each device
  *
diff --git a/include/libata.h b/include/libata.h
index b03b29960df5..10e6057ef4a9 100644
--- a/include/libata.h
+++ b/include/libata.h
@@ -10,8 +10,6 @@
 #ifndef __LIBATA_H__
 #define __LIBATA_H__
 
-#include <common.h>
-
 enum {
 	/* various global constants */
 	ATA_MAX_DEVICES		= 2,	/* per bus/port */
diff --git a/include/misc.h b/include/misc.h
index 12d1325ee26e..82ec2ce79368 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -6,6 +6,8 @@
 #ifndef _MISC_H_
 #define _MISC_H_
 
+struct udevice;
+
 /**
  * misc_read() - Read the device to buffer, optional.
  * @dev: the device
diff --git a/include/netdev.h b/include/netdev.h
index b1eb5fc10467..0ad9f8dc3a5c 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -12,6 +12,8 @@
 #define _NETDEV_H_
 #include <phy_interface.h>
 
+struct udevice;
+
 /*
  * Board and CPU-specific initialization functions
  * board_eth_init() has highest priority.  cpu_eth_init() only
diff --git a/include/pci.h b/include/pci.h
index 2089db9f16f8..a98ac209eac8 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -825,9 +825,7 @@ int pci_last_busno(void);
 extern void pci_mpc85xx_init (struct pci_controller *hose);
 #endif
 
-#ifdef CONFIG_PCIE_IMX
 extern void imx_pcie_remove(void);
-#endif
 
 #if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
 /**
diff --git a/include/power/as3722.h b/include/power/as3722.h
index 27828570559e..f5398123f2a9 100644
--- a/include/power/as3722.h
+++ b/include/power/as3722.h
@@ -6,6 +6,8 @@
 #ifndef __POWER_AS3722_H__
 #define __POWER_AS3722_H__
 
+struct udevice;
+
 #define AS3722_GPIO_OUTPUT_VDDH (1 << 0)
 #define AS3722_GPIO_INVERT (1 << 1)
 
diff --git a/include/power/regulator.h b/include/power/regulator.h
index 74938dd61e49..d9eb9cae2b79 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -7,6 +7,8 @@
 #ifndef _INCLUDE_REGULATOR_H_
 #define _INCLUDE_REGULATOR_H_
 
+struct udevice;
+
 /**
  * U-Boot Voltage/Current Regulator
  * ================================
diff --git a/include/pwm.h b/include/pwm.h
index 54ae3e64c310..f9959706ceb6 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -10,6 +10,8 @@
 #ifndef _pwm_h_
 #define _pwm_h_
 
+struct udevice;
+
 /* struct pwm_ops: Operations for the PWM uclass */
 struct pwm_ops {
 	/**
diff --git a/include/ram.h b/include/ram.h
index 67e22d76c930..273d41539400 100644
--- a/include/ram.h
+++ b/include/ram.h
@@ -7,6 +7,8 @@
 #ifndef __RAM_H
 #define __RAM_H
 
+struct udevice;
+
 struct ram_info {
 	phys_addr_t base;
 	size_t size;
diff --git a/include/scsi.h b/include/scsi.h
index 96cb7266762e..61619e89a7f5 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -9,6 +9,8 @@
 #include <asm/cache.h>
 #include <linux/dma-direction.h>
 
+struct udevice;
+
 struct scsi_cmd {
 	unsigned char		cmd[16];					/* command				   */
 	/* for request sense */
diff --git a/include/soc.h b/include/soc.h
index a55eb1b5724e..a52a300a84a6 100644
--- a/include/soc.h
+++ b/include/soc.h
@@ -9,6 +9,8 @@
 
 #define SOC_MAX_STR_SIZE	128
 
+struct udevice;
+
 /**
  * struct soc_attr - Contains SoC identify information to be used in
  *		     SoC matching. An array of these structs
diff --git a/include/sysreset.h b/include/sysreset.h
index 61295e3fcbb7..8bb094d463b3 100644
--- a/include/sysreset.h
+++ b/include/sysreset.h
@@ -7,6 +7,8 @@
 #ifndef __SYSRESET_H
 #define __SYSRESET_H
 
+struct udevice;
+
 enum sysreset_t {
 	SYSRESET_WARM,	/* Reset CPU, keep GPIOs active */
 	SYSRESET_COLD,	/* Reset CPU and GPIOs */
diff --git a/include/tee.h b/include/tee.h
index 8207d0c02afb..99367b258e29 100644
--- a/include/tee.h
+++ b/include/tee.h
@@ -7,6 +7,8 @@
 #define __TEE_H
 
 #include <linux/bitops.h>
+#include <linux/list.h>
+
 #define TEE_UUID_LEN		16
 
 #define TEE_GEN_CAP_GP          BIT(0)	/* GlobalPlatform compliant TEE */
diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h
index 1de2fe2337ce..9f4a109dca9b 100644
--- a/include/tlv_eeprom.h
+++ b/include/tlv_eeprom.h
@@ -7,6 +7,8 @@
 #ifndef __TLV_EEPROM_H_
 #define __TLV_EEPROM_H_
 
+#include <compiler.h>
+
 /*
  *  The Definition of the TlvInfo EEPROM format can be found at onie.org or
  *  github.com/onie
diff --git a/include/tpm-common.h b/include/tpm-common.h
index e29b10b1766e..c1309a2735d1 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -9,6 +9,8 @@
 
 #include <command.h>
 
+struct udevice;
+
 enum tpm_duration {
 	TPM_SHORT = 0,
 	TPM_MEDIUM = 1,
diff --git a/include/tpm-v1.h b/include/tpm-v1.h
index 59ad4aecf42c..8f6cc28a9ea6 100644
--- a/include/tpm-v1.h
+++ b/include/tpm-v1.h
@@ -10,6 +10,8 @@
 #include <tpm-common.h>
 #include <linux/bitops.h>
 
+struct udevice;
+
 /* Useful constants */
 enum {
 	TPM_REQUEST_HEADER_LENGTH	= 10,
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index f6c045d35480..3b2fe4490072 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -11,6 +11,8 @@
 
 #define TPM2_DIGEST_LEN		32
 
+struct udevice;
+
 /**
  * TPM2 Structure Tags for command/response buffers.
  *
diff --git a/include/tps6586x.h b/include/tps6586x.h
index 785eb39229d0..aa4270c65e33 100644
--- a/include/tps6586x.h
+++ b/include/tps6586x.h
@@ -7,6 +7,8 @@
 #ifndef _TPS6586X_H_
 #define _TPS6586X_H_
 
+struct udevice;
+
 enum {
 	/* SM0-2 PWM/PFM Mode Selection */
 	TPS6586X_PWM_SM0	= 1 << 0,
diff --git a/include/ufs.h b/include/ufs.h
index 0592a763dd9f..bda135cf1841 100644
--- a/include/ufs.h
+++ b/include/ufs.h
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 #ifndef _UFS_H
 #define _UFS_H
+
+struct udevice;
+
 /**
  * ufs_probe() - initialize all devices in the UFS uclass
  *
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index acc55e7fad69..a3b0fb3bce00 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -13,6 +13,7 @@
 #include <tables_csum.h>
 #include <version.h>
 #include <acpi/acpi_table.h>
+#include <asm/global_data.h>
 #include <dm/acpi.h>
 
 int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index b17651ed63d8..ee592cfda1cc 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <asm-offsets.h>
+#include <asm/global_data.h>
 
 #include <linux/kbuild.h>
 
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index b7e19c347509..907bacd716a7 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <linux/err.h>
 #include <linux/types.h>
 #include <efi.h>
diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c
index 35a8a9325f84..4d78923c4d40 100644
--- a/lib/efi/efi_info.c
+++ b/lib/efi/efi_info.c
@@ -9,6 +9,7 @@
 #include <efi.h>
 #include <errno.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 
 int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
 {
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index d49145fc76b6..d07e36caa3f4 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <time.h>
+#include <asm/global_data.h>
 #include <linux/libfdt_env.h>
 #include <u-boot/crc.h>
 #include <bootm.h>
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 53f6d970f735..1206b2d7a2c8 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <video.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 7be756e370d3..302bbcda887a 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -12,6 +12,7 @@
 #include <mapmem.h>
 #include <watchdog.h>
 #include <asm/cache.h>
+#include <asm/global_data.h>
 #include <linux/list_sort.h>
 #include <linux/sizes.h>
 
diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c
index caef4085b077..974a3ed7281b 100644
--- a/lib/efi_loader/efi_rng.c
+++ b/lib/efi_loader/efi_rng.c
@@ -9,6 +9,7 @@
 #include <efi_rng.h>
 #include <log.h>
 #include <rng.h>
+#include <asm/global_data.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 78fd8014d901..d0235c46e185 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <rtc.h>
+#include <asm/global_data.h>
 #include <u-boot/crc.h>
 
 /* For manual relocation support */
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 78576b530fd6..8fccb9e602a3 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -21,6 +21,7 @@
 #include <mapmem.h>
 #include <linux/libfdt.h>
 #include <serial.h>
+#include <asm/global_data.h>
 #include <asm/sections.h>
 #include <linux/ctype.h>
 #include <linux/lzo.h>
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index 457d4cca8a0a..ed9731680233 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdtdec.h>
 #include <image.h>
 #include <log.h>
 #include <malloc.h>
diff --git a/lib/time.c b/lib/time.c
index 47f8c84327d8..1a2a1166cf8a 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -13,6 +13,7 @@
 #include <timer.h>
 #include <watchdog.h>
 #include <div64.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 
diff --git a/lib/trace.c b/lib/trace.c
index 831283c283d9..854e495ed715 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -7,6 +7,7 @@
 #include <mapmem.h>
 #include <time.h>
 #include <trace.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/sections.h>
 
diff --git a/lib/zlib/zlib.c b/lib/zlib/zlib.c
index 90e05e7d4d95..85193d1aa349 100644
--- a/lib/zlib/zlib.c
+++ b/lib/zlib/zlib.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 
 #ifdef CONFIG_GZIP_COMPRESSED
 #define NO_DUMMY_DECL
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 0d9b75a9a20a..9b5c3c04eccb 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <log.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 #include <net/pcap.h>
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 992d1880bf3e..5e51164a8cd3 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <net.h>
 #include <phy.h>
+#include <asm/global_data.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <net/pcap.h>
diff --git a/net/tftp.c b/net/tftp.c
index 84e970bec134..239dbfcc2f15 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <net.h>
+#include <asm/global_data.h>
 #include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_SYS_DIRECT_FLASH_TFTP
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index e90ada3ce854..281989da6fa7 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <asm/global_data.h>
 
 /* Memory test
  *
diff --git a/post/post.c b/post/post.c
index 6687e0b75cac..c344ec5810f7 100644
--- a/post/post.c
+++ b/post/post.c
@@ -14,6 +14,7 @@
 #include <watchdog.h>
 #include <div64.h>
 #include <post.h>
+#include <asm/global_data.h>
 
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
 #include <asm/gpio.h>
diff --git a/test/bloblist.c b/test/bloblist.c
index 4e537ee1b9c4..b93e2713dfd3 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -7,6 +7,7 @@
 #include <bloblist.h>
 #include <log.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <test/suites.h>
 #include <test/test.h>
 #include <test/ut.h>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 16aa1616c948..9ded00ad168f 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -17,6 +17,7 @@
 #include <acpi/acpigen.h>
 #include <acpi/acpi_device.h>
 #include <acpi/acpi_table.h>
+#include <asm/global_data.h>
 #include <dm/acpi.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/blk.c b/test/dm/blk.c
index f34c13f7511c..4eef4048de48 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <part.h>
 #include <usb.h>
+#include <asm/global_data.h>
 #include <asm/state.h>
 #include <dm/test.h>
 #include <test/test.h>
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 865e8bd9fbed..3808305f24fe 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -9,6 +9,7 @@
 #include <os.h>
 #endif
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
 #include <dm/test.h>
diff --git a/test/dm/core.c b/test/dm/core.c
index 8ed5bf73705b..6a77c4fcc83a 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
 #include <dm/util.h>
diff --git a/test/dm/fdtdec.c b/test/dm/fdtdec.c
index 716993f706fb..69badfbb08ee 100644
--- a/test/dm/fdtdec.c
+++ b/test/dm/fdtdec.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <asm/global_data.h>
 #include <dm/of_extra.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/ram.c b/test/dm/ram.c
index f01236c8cd5c..f624343138d6 100644
--- a/test/dm/ram.c
+++ b/test/dm/ram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <ram.h>
+#include <asm/global_data.h>
 #include <dm/test.h>
 #include <test/test.h>
 #include <test/ut.h>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index ac8ce99f5120..e615a18a01ed 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/test.h>
 #include <dm/root.h>
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index 38b7b1481a77..8dc59fc636f1 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <asm/state.h>
 #include <dm/test.h>
 #include <dm/root.h>
diff --git a/test/log/nolog_test.c b/test/log/nolog_test.c
index c418ed07c9a2..cb4fb3db9a20 100644
--- a/test/log/nolog_test.c
+++ b/test/log/nolog_test.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <asm/global_data.h>
 #include <test/log.h>
 #include <test/test.h>
 #include <test/suites.h>
diff --git a/test/log/syslog_test.c b/test/log/syslog_test.c
index 120a8b2537b9..ac2df3fb7c07 100644
--- a/test/log/syslog_test.c
+++ b/test/log/syslog_test.c
@@ -11,6 +11,7 @@
 #define LOG_DEBUG
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <dm/device.h>
 #include <hexdump.h>
 #include <test/log.h>
diff --git a/test/ut.c b/test/ut.c
index 95bdd66de6af..556e9694ee17 100644
--- a/test/ut.c
+++ b/test/ut.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <console.h>
 #include <malloc.h>
+#include <asm/global_data.h>
 #include <test/test.h>
 #include <test/ut.h>
 
-- 
2.17.1



More information about the U-Boot mailing list