Skip to contentSkip to conversation

treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR

PATCH In review Peng Fan (OSS) 2 participants 16 messages Feb 9 – Feb 18

Subsystems (58)
lore
Share & tools
lore
#0 lore raw

v2 cover treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR

This patch set primarily removes unused DECLARE_GLOBAL_DATA_PTR instances.

Many files declare DECLARE_GLOBAL_DATA_PTR and include asm/global_data.h even though gd is never used. In these cases, asm/global_data.h is effectively treated as a proxy header, which is not a good practice.

Following the Include What You Use principle, files should include only the headers they actually depend on, rather than relying on global_data.h indirectly. This approach is also adopted in Linux kernel [1].

The first few patches are prepartion to avoid building break after remove the including of global_data.h.

A script is for filtering the files:
list=find . -name "*.[ch]"
for source in ${list}
do

        result=`sed -n '/DECLARE_GLOBAL_DATA_PTR/p' ${source}`
        if [ "${result}" == "DECLARE_GLOBAL_DATA_PTR;" ]; then
                echo "Found in ${source}"

                result=`sed -n '/\<gd\>/p' ${source}`
                result2=`sed -n '/\<gd_/p' ${source}`
                result3=`sed -n '/\<gd->/p' ${source}`
                if [ "${result}" == "" ] && [ "${result2}" == "" ] && [ "${result3}" == "" ];then
                        echo "Cleanup ${source}"
                        sed -i '/DECLARE_GLOBAL_DATA_PTR/{N;/\n[[:space:]]*$/d;s/.*\n//;}' ${source}
                        sed -i '/DECLARE_GLOBAL_DATA_PTR/d' ${source}
                        sed -i '/global_data.h/d' ${source}
                        git add ${source}
                fi
        fi

done

[1] https://lpc.events/event/17/contributions/1620/attachments/1228/2520/Linux%20Kernel%20Header%20Optimization.pdf

CI: https://github.com/u-boot/u-boot/pull/865

---
Changes in v2:
- Rebased to origin/master to resolve conflicts.
- Added tags for patch 14

---
Peng Fan (14):
beacon: imx8mm/n: Drop useless files
mediatek: mt7622: Drop useless board files
common: cli_hush: Include vsprintf.h
cmd: mem: Include vsprintf.h
test: log_filter: Include vsprintf.h
xtensa: relocate: Add missing headers
toradex: common: Add missing headers
tegra: pmc: Cleanup headers
rockchip: evk_rk3308: Cleanup headers
nxp: emc2305: Cleanup headers
pci: layerspace: Add missing header files
renesas: common: Include asm-generic/u-boot.h
socfpga: clock_manager_s10: Add missing header files
treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage

 arch/arc/lib/bootm.c                                        |  3 ---
 arch/arm/cpu/armv7/s5p4418/cpu.c                            |  3 ---
 arch/arm/mach-aspeed/ast2600/spl.c                          |  3 ---
 arch/arm/mach-imx/imx8/clock.c                              |  3 ---
 arch/arm/mach-imx/imx8/fdt.c                                |  3 ---
 arch/arm/mach-imx/imx8/iomux.c                              |  3 ---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                      |  3 ---
 arch/arm/mach-imx/imx8ulp/cgc.c                             |  3 ---
 arch/arm/mach-imx/imx8ulp/clock.c                           |  3 ---
 arch/arm/mach-imx/imx9/clock.c                              |  3 ---
 arch/arm/mach-imx/imx9/clock_root.c                         |  3 ---
 arch/arm/mach-imx/misc.c                                    |  3 ---
 arch/arm/mach-imx/spl_imx_romapi.c                          |  3 ---
 arch/arm/mach-meson/board-axg.c                             |  3 ---
 arch/arm/mach-meson/board-g12a.c                            |  3 ---
 arch/arm/mach-meson/board-gx.c                              |  3 ---
 arch/arm/mach-socfpga/clock_manager_agilex.c                |  3 ---
 arch/arm/mach-socfpga/clock_manager_agilex5.c               |  3 ---
 arch/arm/mach-socfpga/clock_manager_n5x.c                   |  3 ---
 arch/arm/mach-socfpga/clock_manager_s10.c                   |  5 ++---
 arch/arm/mach-socfpga/mailbox_s10.c                         |  3 ---
 arch/arm/mach-socfpga/misc_gen5.c                           |  3 ---
 arch/arm/mach-socfpga/misc_soc64.c                          |  3 ---
 arch/arm/mach-socfpga/mmu-arm64_s10.c                       |  3 ---
 arch/arm/mach-socfpga/reset_manager_s10.c                   |  3 ---
 arch/arm/mach-socfpga/spl_agilex.c                          |  3 ---
 arch/arm/mach-socfpga/spl_agilex5.c                         |  3 ---
 arch/arm/mach-socfpga/spl_agilex7m.c                        |  3 ---
 arch/arm/mach-socfpga/spl_gen5.c                            |  3 ---
 arch/arm/mach-socfpga/spl_n5x.c                             |  3 ---
 arch/arm/mach-socfpga/spl_s10.c                             |  3 ---
 arch/arm/mach-socfpga/system_manager_soc64.c                |  3 ---
 arch/arm/mach-tegra/pmc.c                                   |  4 +---
 arch/microblaze/lib/bootm.c                                 |  3 ---
 arch/mips/mach-ath79/qca956x/ddr.c                          |  3 ---
 arch/mips/mach-mscc/cpu.c                                   |  3 ---
 arch/mips/mach-mtmips/ddr_cal.c                             |  3 ---
 arch/mips/mach-octeon/cvmx-pko.c                            |  2 --
 arch/nios2/lib/bootm.c                                      |  3 ---
 arch/riscv/cpu/andes/spl.c                                  |  3 ---
 arch/riscv/cpu/cv1800b/dram.c                               |  3 ---
 arch/riscv/cpu/generic/dram.c                               |  3 ---
 arch/riscv/cpu/k230/dram.c                                  |  3 ---
 arch/riscv/cpu/th1520/spl.c                                 |  2 --
 arch/sh/lib/bootm.c                                         |  3 ---
 arch/x86/cpu/ivybridge/model_206ax.c                        |  3 ---
 arch/x86/lib/init_helpers.c                                 |  3 ---
 arch/x86/lib/zimage.c                                       |  3 ---
 arch/xtensa/lib/relocate.c                                  |  2 ++
 arch/xtensa/lib/time.c                                      |  3 ---
 board/BuR/brsmarc1/board.c                                  |  3 ---
 board/BuR/common/common.c                                   |  3 ---
 board/Marvell/octeontx/smc.c                                |  3 ---
 board/Marvell/octeontx2/smc.c                               |  3 ---
 board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c         |  2 --
 board/advantech/imx8mp_rsb3720a1/spl.c                      |  2 --
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c       |  2 --
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c       |  3 ---
 board/andestech/voyager/voyager.c                           |  3 ---
 board/armltd/vexpress64/vexpress64.c                        |  3 ---
 board/beacon/imx8mm/Makefile                                |  1 -
 board/beacon/imx8mm/imx8mm_beacon.c                         |  8 --------
 board/beacon/imx8mm/spl.c                                   |  3 ---
 board/beacon/imx8mn/Makefile                                |  1 -
 board/beacon/imx8mn/imx8mn_beacon.c                         |  8 --------
 board/beacon/imx8mn/spl.c                                   |  3 ---
 board/beacon/imx8mp/spl.c                                   |  3 ---
 board/beagle/beagleboneai64/beagleboneai64.c                |  2 --
 board/beagle/beagleplay/beagleplay.c                        |  2 --
 board/broadcom/bcmns/ns.c                                   |  3 ---
 board/cloos/imx8mm_phg/imx8mm_phg.c                         |  3 ---
 board/cloos/imx8mm_phg/spl.c                                |  3 ---
 board/compulab/imx8mm-cl-iot-gate/spl.c                     |  2 --
 board/coreboot/coreboot/coreboot.c                          |  3 ---
 board/cssi/cmpc885/cmpc885.c                                |  2 --
 board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c |  2 --
 board/data_modul/imx8mm_edm_sbc/spl.c                       |  2 --
 board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c |  2 --
 board/data_modul/imx8mp_edm_sbc/spl.c                       |  2 --
 board/dhelectronics/dh_imx8mp/common.c                      |  2 --
 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c           |  2 --
 board/dhelectronics/dh_imx8mp/spl.c                         |  2 --
 board/emcraft/imx8mp_navqp/spl.c                            |  3 ---
 board/emulation/qemu-riscv/qemu-riscv.c                     |  2 --
 board/engicam/imx8mm/icore_mx8mm.c                          |  2 --
 board/engicam/imx8mm/spl.c                                  |  2 --
 board/engicam/imx8mp/icore_mx8mp.c                          |  3 ---
 board/engicam/imx8mp/spl.c                                  |  3 ---
 board/gdsys/mpc8308/gazerbeam.c                             |  3 ---
 board/google/imx8mq_phanbell/imx8mq_phanbell.c              |  3 ---
 board/highbank/highbank.c                                   |  3 ---
 board/kontron/osm-s-mx8mp/osm-s-mx8mp.c                     |  3 ---
 board/kontron/osm-s-mx93/osm-s-mx93.c                       |  3 ---
 board/kontron/pitx_imx8m/pitx_imx8m.c                       |  2 --
 board/mediatek/mt7622/Makefile                              |  2 +-
 board/mediatek/mt7622/mt7622_rfb.c                          | 12 ------------
 board/mntre/imx8mq_reform2/imx8mq_reform2.c                 |  3 ---
 board/msc/sm2s_imx8mp/sm2s_imx8mp.c                         |  2 --
 board/msc/sm2s_imx8mp/spl.c                                 |  3 ---
 board/nxp/common/emc2305.c                                  |  4 +---
 board/nxp/imx8mm_evk/spl.c                                  |  3 ---
 board/nxp/imx8qm_mek/imx8qm_mek.c                           |  3 ---
 board/nxp/imx8qxp_mek/imx8qxp_mek.c                         |  3 ---
 board/phytec/imx8mp-libra-fpsc/spl.c                        |  3 ---
 board/phytec/phycore_imx8mm/phycore-imx8mm.c                |  3 ---
 board/phytec/phycore_imx8mm/spl.c                           |  3 ---
 board/phytec/phycore_imx8mp/phycore-imx8mp.c                |  3 ---
 board/phytec/phycore_imx8mp/spl.c                           |  3 ---
 board/phytec/phycore_imx93/phycore-imx93.c                  |  3 ---
 board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c   |  3 ---
 board/polyhex/imx8mp_debix_model_a/spl.c                    |  3 ---
 board/purism/librem5/librem5.c                              |  2 --
 board/purism/librem5/spl.c                                  |  2 --
 board/qualcomm/dragonboard410c/dragonboard410c.c            |  3 ---
 board/qualcomm/dragonboard820c/dragonboard820c.c            |  3 ---
 board/renesas/common/gen3-common.c                          |  4 +---
 board/renesas/common/gen4-common.c                          |  4 +---
 board/renesas/common/gen5-common.c                          |  4 +---
 board/rockchip/evb_rk3308/evb_rk3308.c                      |  5 ++---
 board/ronetix/imx8mq-cm/imx8mq_cm.c                         |  2 --
 board/samsung/common/exynos5-dt.c                           |  3 ---
 board/samsung/common/misc.c                                 |  3 ---
 board/st/stm32f429-discovery/stm32f429-discovery.c          |  3 ---
 board/st/stm32f429-evaluation/stm32f429-evaluation.c        |  3 ---
 board/st/stm32f469-discovery/stm32f469-discovery.c          |  3 ---
 board/st/stm32f746-disco/stm32f746-disco.c                  |  3 ---
 board/st/stm32h743-disco/stm32h743-disco.c                  |  3 ---
 board/st/stm32h743-eval/stm32h743-eval.c                    |  3 ---
 board/st/stm32h747-disco/stm32h747-disco.c                  |  3 ---
 board/st/stm32h750-art-pi/stm32h750-art-pi.c                |  3 ---
 board/technexion/pico-imx8mq/pico-imx8mq.c                  |  3 ---
 board/ti/am62x/evm.c                                        |  2 --
 board/ti/am64x/evm.c                                        |  2 --
 board/ti/j784s4/evm.c                                       |  2 --
 board/toradex/apalis-imx8/apalis-imx8.c                     |  3 ---
 board/toradex/apalis_t30/apalis_t30.c                       |  3 ---
 board/toradex/colibri-imx8x/colibri-imx8x.c                 |  3 ---
 board/toradex/colibri_t20/colibri_t20.c                     |  3 ---
 board/toradex/common/tdx-cfg-block.c                        |  3 ---
 board/toradex/common/tdx-cfg-block.h                        |  2 ++
 board/toradex/common/tdx-common.h                           |  2 ++
 board/toradex/smarc-imx8mp/smarc-imx8mp.c                   |  3 ---
 board/toradex/smarc-imx8mp/spl.c                            |  3 ---
 board/toradex/verdin-imx8mm/spl.c                           |  3 ---
 board/toradex/verdin-imx8mm/verdin-imx8mm.c                 |  3 ---
 board/toradex/verdin-imx8mp/spl.c                           |  3 ---
 board/toradex/verdin-imx8mp/verdin-imx8mp.c                 |  3 ---
 board/xilinx/zynq/bootimg.c                                 |  3 ---
 boot/bootmeth-uclass.c                                      |  2 --
 boot/fdt_simplefb.c                                         |  3 ---
 boot/image-sig.c                                            |  2 --
 boot/image.c                                                |  3 ---
 cmd/bloblist.c                                              |  3 ---
 cmd/bootefi.c                                               |  3 ---
 cmd/bootm.c                                                 |  3 ---
 cmd/date.c                                                  |  3 ---
 cmd/mem.c                                                   |  4 +---
 cmd/sound.c                                                 |  3 ---
 cmd/spl.c                                                   |  3 ---
 common/cli_hush.c                                           |  4 +---
 common/stdio.c                                              |  3 ---
 drivers/block/sandbox.c                                     |  3 ---
 drivers/bootcount/pmic_pfuze100.c                           |  2 --
 drivers/cache/sandbox_cache.c                               |  3 ---
 drivers/clk/altera/clk-agilex.c                             |  3 ---
 drivers/clk/altera/clk-agilex5.c                            |  3 ---
 drivers/clk/altera/clk-mem-n5x.c                            |  3 ---
 drivers/clk/altera/clk-n5x.c                                |  3 ---
 drivers/clk/rockchip/clk_px30.c                             |  3 ---
 drivers/clk/rockchip/clk_rk3308.c                           |  3 ---
 drivers/clk/rockchip/clk_rk3528.c                           |  2 --
 drivers/clk/rockchip/clk_rk3568.c                           |  2 --
 drivers/clk/rockchip/clk_rk3576.c                           |  2 --
 drivers/clk/rockchip/clk_rk3588.c                           |  2 --
 drivers/clk/rockchip/clk_rv1108.c                           |  3 ---
 drivers/clk/rockchip/clk_rv1126.c                           |  2 --
 drivers/cpu/bcm283x_cpu.c                                   |  3 ---
 drivers/cpu/cpu-uclass.c                                    |  2 --
 drivers/cpu/imx8_cpu.c                                      |  3 ---
 drivers/cpu/mtk_cpu.c                                       |  3 ---
 drivers/firmware/arm-ffa/arm-ffa-uclass.c                   |  3 ---
 drivers/firmware/arm-ffa/arm-ffa.c                          |  3 ---
 drivers/firmware/arm-ffa/ffa-emul-uclass.c                  |  3 ---
 drivers/firmware/arm-ffa/sandbox_ffa.c                      |  3 ---
 drivers/gpio/gpio-uclass.c                                  |  3 ---
 drivers/gpio/nx_gpio.c                                      |  3 ---
 drivers/i2c/mxc_i2c.c                                       |  3 ---
 drivers/i2c/nx_i2c.c                                        |  3 ---
 drivers/i2c/ocores_i2c.c                                    |  3 ---
 drivers/i2c/soft_i2c.c                                      |  3 ---
 drivers/i2c/synquacer_i2c.c                                 |  2 --
 drivers/mailbox/imx-mailbox.c                               |  2 --
 drivers/misc/atsha204a-i2c.c                                |  3 ---
 drivers/misc/fs_loader.c                                    |  3 ---
 drivers/misc/imx8/fuse.c                                    |  3 ---
 drivers/mmc/ca_dw_mmc.c                                     |  3 ---
 drivers/mmc/f_sdh30.c                                       |  2 --
 drivers/mmc/jz_mmc.c                                        |  3 ---
 drivers/mmc/msm_sdhci.c                                     |  3 ---
 drivers/mmc/mv_sdhci.c                                      |  3 ---
 drivers/mtd/nand/raw/pxa3xx_nand.c                          |  3 ---
 drivers/mtd/nand/raw/tegra_nand.c                           |  3 ---
 drivers/mtd/nvmxip/nvmxip_qspi.c                            |  3 ---
 drivers/mtd/spi/sf-uclass.c                                 |  3 ---
 drivers/net/dwmac_s700.c                                    |  3 ---
 drivers/net/fec_mxc.c                                       |  3 ---
 drivers/net/gmac_rockchip.c                                 |  2 --
 drivers/net/mvneta.c                                        |  3 ---
 drivers/net/octeontx/smi.c                                  |  3 ---
 drivers/net/phy/fixed.c                                     |  3 ---
 drivers/net/phy/phy.c                                       |  3 ---
 drivers/net/phy/xilinx_gmii2rgmii.c                         |  3 ---
 drivers/net/sandbox-raw.c                                   |  3 ---
 drivers/net/sandbox.c                                       |  3 ---
 drivers/net/ti/keystone_net.c                               |  3 ---
 drivers/net/xilinx_axi_emac.c                               |  3 ---
 drivers/pci/pci_octeontx.c                                  |  3 ---
 drivers/pci/pcie_dw_meson.c                                 |  3 ---
 drivers/pci/pcie_dw_qcom.c                                  |  3 ---
 drivers/pci/pcie_dw_rockchip.c                              |  3 ---
 drivers/pci/pcie_dw_ti.c                                    |  3 ---
 drivers/pci/pcie_layerscape.c                               |  3 ---
 drivers/pci/pcie_layerscape.h                               |  4 +++-
 drivers/pci/pcie_starfive_jh7110.c                          |  3 ---
 drivers/pci_endpoint/pci_ep-uclass.c                        |  3 ---
 drivers/phy/marvell/comphy_core.c                           |  3 ---
 drivers/phy/omap-usb2-phy.c                                 |  3 ---
 drivers/phy/rockchip/phy-rockchip-pcie.c                    |  3 ---
 drivers/phy/rockchip/phy-rockchip-typec.c                   |  3 ---
 drivers/pinctrl/mtmips/pinctrl-mt7628.c                     |  3 ---
 drivers/pinctrl/nexell/pinctrl-nexell.c                     |  3 ---
 drivers/pinctrl/nexell/pinctrl-s5pxx18.c                    |  3 ---
 drivers/pinctrl/nxp/pinctrl-imx-mmio.c                      |  3 ---
 drivers/pinctrl/nxp/pinctrl-imx.c                           |  3 ---
 drivers/pinctrl/nxp/pinctrl-imx8.c                          |  3 ---
 drivers/pinctrl/nxp/pinctrl-mxs.c                           |  3 ---
 drivers/power/domain/imx8m-power-domain.c                   |  3 ---
 drivers/power/pmic/bd71837.c                                |  3 ---
 drivers/power/pmic/mc34708.c                                |  3 ---
 drivers/power/pmic/mp5416.c                                 |  3 ---
 drivers/power/pmic/pca9450.c                                |  3 ---
 drivers/power/regulator/pwm_regulator.c                     |  3 ---
 drivers/pwm/pwm-sifive.c                                    |  3 ---
 drivers/pwm/rk_pwm.c                                        |  3 ---
 drivers/pwm/sunxi_pwm.c                                     |  3 ---
 drivers/ram/stm32mp1/stm32mp1_tests.c                       |  3 ---
 drivers/reboot-mode/reboot-mode-gpio.c                      |  2 --
 drivers/reboot-mode/reboot-mode-rtc.c                       |  2 --
 drivers/remoteproc/rproc-uclass.c                           |  2 --
 drivers/serial/ns16550.c                                    |  3 ---
 drivers/serial/sandbox.c                                    |  3 ---
 drivers/serial/serial_adi_uart4.c                           |  2 --
 drivers/serial/serial_htif.c                                |  3 ---
 drivers/serial/serial_xen.c                                 |  3 ---
 drivers/smem/msm_smem.c                                     |  3 ---
 drivers/spi/ca_sflash.c                                     |  3 ---
 drivers/spi/microchip_coreqspi.c                            |  2 --
 drivers/spi/mvebu_a3700_spi.c                               |  3 ---
 drivers/spi/omap3_spi.c                                     |  3 ---
 drivers/spi/spi-sunxi.c                                     |  3 ---
 drivers/spi/spi-synquacer.c                                 |  2 --
 drivers/spi/spi-uclass.c                                    |  3 ---
 drivers/spi/tegra210_qspi.c                                 |  3 ---
 drivers/spmi/spmi-msm.c                                     |  3 ---
 drivers/thermal/imx_tmu.c                                   |  3 ---
 drivers/timer/ostm_timer.c                                  |  3 ---
 drivers/timer/sp804_timer.c                                 |  3 ---
 drivers/usb/common/common.c                                 |  3 ---
 drivers/usb/phy/rockchip_usb2_phy.c                         |  3 ---
 drivers/usb/tcpm/tcpm.c                                     |  2 --
 drivers/video/hx8238d.c                                     |  2 --
 drivers/video/imx/mxc_ipuv3_fb.c                            |  3 ---
 drivers/video/nexell_display.c                              |  3 ---
 drivers/video/rockchip/rk_lvds.c                            |  3 ---
 drivers/video/rockchip/rk_mipi.c                            |  3 ---
 drivers/video/sandbox_sdl.c                                 |  3 ---
 drivers/video/tidss/tidss_drv.c                             |  2 --
 drivers/video/zynqmp/zynqmp_dpsub.c                         |  3 ---
 drivers/watchdog/armada-37xx-wdt.c                          |  3 ---
 drivers/watchdog/at91sam9_wdt.c                             |  3 ---
 drivers/watchdog/mt7621_wdt.c                               |  3 ---
 drivers/watchdog/orion_wdt.c                                |  3 ---
 drivers/watchdog/sbsa_gwdt.c                                |  3 ---
 drivers/watchdog/wdt-uclass.c                               |  3 ---
 fs/fs.c                                                     |  3 ---
 fs/ubifs/ubifs.c                                            |  3 ---
 include/relocate.h                                          |  2 --
 lib/efi_loader/efi_capsule.c                                |  3 ---
 lib/efi_loader/efi_gop.c                                    |  3 ---
 lib/efi_loader/efi_rng.c                                    |  3 ---
 net/eth-uclass.c                                            |  3 ---
 net/tftp.c                                                  |  3 ---
 net/wget.c                                                  |  3 ---
 test/cmd/exit.c                                             |  3 ---
 test/cmd/test_echo.c                                        |  3 ---
 test/cmd/test_pause.c                                       |  3 ---
 test/dm/blk.c                                               |  3 ---
 test/dm/i3c.c                                               |  2 --
 test/lib/test_print.c                                       |  3 ---
 test/log/log_filter.c                                       |  4 +---
 300 files changed, 22 insertions(+), 851 deletions(-)

---
base-commit: c7fbe028ee5bc83df833a73e1491f1a483b65d98
change-id: 20260202-cleanup-560c900f7bc3

Best regards,

Signature · 1 line
Peng Fan <[email protected]>
#1 lore raw

PATCH v2 1/14 beacon: imx8mm/n: Drop useless files

From: Peng Fan <[email protected]>

No functions except reserving gd in the board files. The files are useless, remove them.

---
 board/beacon/imx8mm/Makefile        | 1 -
 board/beacon/imx8mm/imx8mm_beacon.c | 8 --------
 board/beacon/imx8mn/Makefile        | 1 -
 board/beacon/imx8mn/imx8mn_beacon.c | 8 --------
 4 files changed, 18 deletions(-)
board/beacon/imx8mm/Makefile +0 -1
index 8484b85ae1268b2699e442975a4e476ed31f2283..eb762504266de80bad014dba0868c231f63c9ba1 100644
@@ -4,7 +4,6 @@
 # SPDX-License-Identifier:      GPL-2.0+
 #
 
-obj-y += imx8mm_beacon.o
 obj-y += ../../nxp/common/
 
 ifdef CONFIG_XPL_BUILD
board/beacon/imx8mm/imx8mm_beacon.c deleted +0 -8
deleted file mode 100644
index 6459a99cb9d72a00316ccba63daf8414551bdfca..0000000000000000000000000000000000000000
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2022 Logic PD, Inc. dba Beacon EmbeddedWorks
- */
-
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
board/beacon/imx8mn/Makefile +0 -1
index 54735792b9340aba0cd02a53fe2be22e5bda498e..e8fe9f1822e802a9889d3b93291d911f2e555e5f 100644
@@ -4,7 +4,6 @@
 # SPDX-License-Identifier:      GPL-2.0+
 #
 
-obj-y += imx8mn_beacon.o
 obj-y += ../../nxp/common/
 ifdef CONFIG_XPL_BUILD
 obj-y += spl.o
board/beacon/imx8mn/imx8mn_beacon.c deleted +0 -8
deleted file mode 100644
index 6459a99cb9d72a00316ccba63daf8414551bdfca..0000000000000000000000000000000000000000
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2022 Logic PD, Inc. dba Beacon EmbeddedWorks
- */
-
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
Signature · 1 line
2.37.1
#2 lore raw

PATCH v2 2/14 mediatek: mt7622: Drop useless board files

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

No functions except reserving gd in the board files. The files are useless, remove them.

---
 board/mediatek/mt7622/Makefile     |  2 +-
 board/mediatek/mt7622/mt7622_rfb.c | 12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)
board/mediatek/mt7622/Makefile +1 -1
index 64f101337bf16620665cc5d7a308849ba127e107..35f3136e833b4d7f8a92233708e3e15765272b0f 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier:	GPL-2.0
 
-obj-y	+= mt7622_rfb.o
+obj-y	+=
board/mediatek/mt7622/mt7622_rfb.c deleted +0 -12
deleted file mode 100644
index 405f393aade112356ef8422a6e9d4f271ed2e672..0000000000000000000000000000000000000000
@@ -1,12 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2018 MediaTek Inc.
- * Author: Sam Shih <[email protected]>
- */
-
-#include <config.h>
-#include <env.h>
-#include <init.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
Signature · 1 line
2.37.1
#3 lore raw

PATCH v2 3/14 common: cli_hush: Include vsprintf.h

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

sprintf is used in this file, so include header vsprintf.h.

---
 common/cli_hush.c | 1 +
 1 file changed, 1 insertion(+)
common/cli_hush.c +1 -0
index 7bd6943d3ed65bb24c709af0b195825a26d65f39..fb087960c9206b1e7fe4454bae53f6bc1cec1bdf 100644
@@ -83,6 +83,7 @@
 #include <cli.h>
 #include <cli_hush.h>
 #include <command.h>        /* find_cmd */
+#include <vsprintf.h>
 #include <asm/global_data.h>
 #endif
 #ifndef __U_BOOT__
Signature · 1 line
2.37.1
#4 lore raw

PATCH v2 4/14 cmd: mem: Include vsprintf.h

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

hextoul is used in this file, so include header file vsprintf.h.

---
 cmd/mem.c | 1 +
 1 file changed, 1 insertion(+)
cmd/mem.c +1 -0
index d5d7ca2790bdf2d100606963c0c2d48b1c6b6978..8690fc1e4e6b93d78b48cf4c080c7f52bf2504c8 100644
@@ -26,6 +26,7 @@
 #include <mapmem.h>
 #include <rand.h>
 #include <time.h>
+#include <vsprintf.h>
 #include <watchdog.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
Signature · 1 line
2.37.1
#5 lore raw

PATCH v2 5/14 test: log_filter: Include vsprintf.h

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

snprintf is used, need to include vsprintf.h. Otherwise there will be build error after asm/global_data.h is removed.

---
 test/log/log_filter.c | 1 +
 1 file changed, 1 insertion(+)
test/log/log_filter.c +1 -0
index 8622dcf29130f6f6eb70536e042c2ed51ad61893..680c60164b623bb30bf0a5457c190bab8d97468a 100644
@@ -5,6 +5,7 @@
 
 #include <console.h>
 #include <log.h>
+#include <vsprintf.h>
 #include <asm/global_data.h>
 #include <test/log.h>
 #include <test/ut.h>
Signature · 1 line
2.37.1
#6 lore raw

PATCH v2 6/14 xtensa: relocate: Add missing headers

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

memset and size_t are used in this file, so add missing headers.

---
 arch/xtensa/lib/relocate.c | 2 ++
 1 file changed, 2 insertions(+)
arch/xtensa/lib/relocate.c +2 -0
index a499590c75bc5f143ef9dd008b36262b63e027de..d3d317edf88fe433908ffb2300f8f8733415d1fc 100644
@@ -4,6 +4,8 @@
  */
 
 #include <relocate.h>
+#include <linux/string.h>
+#include <linux/types.h>
 #include <asm/sections.h>
 #include <asm/string.h>
 
Signature · 1 line
2.37.1
#7 lore raw

PATCH v2 7/14 toradex: common: Add missing headers

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Include linux/types.h and asm-generic/u-boot.h. Missing the two header files will cause building error after cleaning up usage of asm/global_data.h.

---
 board/toradex/common/tdx-cfg-block.h | 2 ++
 board/toradex/common/tdx-common.h    | 2 ++
 2 files changed, 4 insertions(+)
board/toradex/common/tdx-cfg-block.h +2 -0
index b28033d8332e09d063a6a8ad1d4e334703077f00..067daec0d776070b0b53fc26d1043d6eb781a527 100644
@@ -6,6 +6,8 @@
 #ifndef _TDX_CFG_BLOCK_H
 #define _TDX_CFG_BLOCK_H
 
+#include <linux/types.h>
+
 #include "tdx-common.h"
 
 struct toradex_hw {
board/toradex/common/tdx-common.h +2 -0
index d446e9f1d5ca7d3d5a1318b389393d28854e2263..db3369a8f9ef9b409c53c45e94aa5f22933a44fa 100644
@@ -6,6 +6,8 @@
 #ifndef _TDX_COMMON_H
 #define _TDX_COMMON_H
 
+#include <asm-generic/u-boot.h>
+
 #define TORADEX_USB_PRODUCT_NUM_OFFSET	0x4000
 #define TDX_USB_VID			0x1B67
 
Signature · 1 line
2.37.1
#8 lore raw

PATCH v2 8/14 tegra: pmc: Cleanup headers

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

No gd users, so remove DECLARE_GLOBAL_DATA_PTR and the including of "asm/global_data.h". And include "asm/arch-tegra/tegra.h" to avoid build error.

---
 arch/arm/mach-tegra/pmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mach-tegra/pmc.c +1 -3
index 3f968d4aeae862053dc4e7f26335ebbe1bbb9aa5..019c4b0b21f3b6712d2f577181fd6815ad826e09 100644
@@ -5,14 +5,12 @@
 
 #include <cpu_func.h>
 #include <log.h>
-#include <asm/global_data.h>
 
 #include <linux/arm-smccc.h>
 
 #include <asm/io.h>
 #include <asm/arch-tegra/pmc.h>
-
-DECLARE_GLOBAL_DATA_PTR;
+#include <asm/arch-tegra/tegra.h>
 
 #if IS_ENABLED(CONFIG_TEGRA_PMC_SECURE)
 static bool tegra_pmc_detect_tz_only(void)
Signature · 1 line
2.37.1
#9 lore raw

PATCH v2 9/14 rockchip: evk_rk3308: Cleanup headers

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

There is no user of 'gd', so drop the usage of DECLARE_GLOBAL_DATA_PTR and the including of 'asm/global_data.h'. Also include correct headers to avoid build error.

---
 board/rockchip/evb_rk3308/evb_rk3308.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
board/rockchip/evb_rk3308/evb_rk3308.c +2 -3
index c895da934a998b4f8a4a8b32fbc7336bd4c41604..75536fe117db3fe26abf5a60d2d68e72ee99dfde 100644
@@ -4,9 +4,8 @@
  */
 
 #include <adc.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
+#include <stdio.h>
+#include <linux/kernel.h>
 
 #define KEY_DOWN_MIN_VAL        0
 #define KEY_DOWN_MAX_VAL        30
Signature · 1 line
2.37.1
#10 lore raw

PATCH v2 10/14 nxp: emc2305: Cleanup headers

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

There is no user of gd, drop the usage of DECLARE_GLOBAL_DATA_PTR and the including of "asm/global_data.h". Include config.h to avoid build error.

---
 board/nxp/common/emc2305.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
board/nxp/common/emc2305.c +1 -3
index 50252bb5007f667bd53115922b9c8d06e76f7f61..7e5151eaf5f9f31cb0eba3f85115c0dec46f096f 100644
@@ -4,15 +4,13 @@
  *
  */
 
+#include <config.h>
 #include <command.h>
 #include <i2c.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 
 #include "emc2305.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void set_fan_speed(u8 data, int chip_addr)
 {
 	u8 index;
Signature · 1 line
2.37.1
#11 lore raw

PATCH v2 11/14 pci: layerspace: Add missing header files

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

struct fdt_resource, u32 and bool types are used in this header, add missing header files following "include what you use".

---
 drivers/pci/pcie_layerscape.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/pcie_layerscape.h +3 -1
index b7f692f645070ad594585dd177df9c66a55e80d2..d5f4930e1813bd570a6d5106c11f2ceaa74bac2f 100644
@@ -7,9 +7,11 @@
 
 #ifndef _PCIE_LAYERSCAPE_H_
 #define _PCIE_LAYERSCAPE_H_
-#include <pci.h>
 
+#include <fdtdec.h>
+#include <pci.h>
 #include <linux/sizes.h>
+#include <linux/types.h>
 #include <asm/arch-fsl-layerscape/svr.h>
 #include <asm/arch-ls102xa/svr.h>
 
Signature · 1 line
2.37.1
#12 lore raw

PATCH v2 12/14 renesas: common: Include asm-generic/u-boot.h

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

struct bd_info is defined in asm-generic/u-boot.h. Include it to avoid building error after asm/global_data.h are removed from this file.

---
 board/renesas/common/gen3-common.c | 1 +
 board/renesas/common/gen4-common.c | 1 +
 board/renesas/common/gen5-common.c | 1 +
 3 files changed, 3 insertions(+)
board/renesas/common/gen3-common.c +1 -0
index 94da00985d34049222a2c5aaec650d03dc2aec85..f89ae81e95ec551b8b254fd0fee0b9839f798b85 100644
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/renesas.h>
+#include <asm-generic/u-boot.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
board/renesas/common/gen4-common.c +1 -0
index 38fba7a5ea77778383d29f2403a585bdb54994e9..81c6f6f4c6ddbf78f50657bef9a31a4f3e8e6099 100644
@@ -13,6 +13,7 @@
 #include <asm/mach-types.h>
 #include <asm/processor.h>
 #include <asm/system.h>
+#include <asm-generic/u-boot.h>
 #include <image.h>
 #include <linux/errno.h>
 
board/renesas/common/gen5-common.c +1 -0
index a05a3e8abef46f55ae649d11741ad45797090728..3b724e59049c0b451b6e346a6ecb9846c3226e97 100644
@@ -10,6 +10,7 @@
 #include <asm/mach-types.h>
 #include <asm/processor.h>
 #include <asm/system.h>
+#include <asm-generic/u-boot.h>
 #include <linux/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
Signature · 1 line
2.37.1
#13 lore raw

PATCH v2 13/14 socfpga: clock_manager_s10: Add missing header files

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

struct udevice and u32 are used in this file. Add missing header to avoid building break after asm/global_data.h is removed from this file.

---
 arch/arm/mach-socfpga/clock_manager_s10.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-socfpga/clock_manager_s10.c +2 -0
index 1e148947a3385ff1b9ed3ab5ae4e3ac65c2cfa8d..d6c64e9801076824a32c096b9260a58fd25b01f5 100644
@@ -4,6 +4,8 @@
  *
  */
 
+#include <compiler.h>
+#include <dm/device.h>
 #include <linux/errno.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
Signature · 1 line
2.37.1
#14 lore raw

PATCH v2 14/14 treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them, rather than indirectly via global_data.h.

---
 arch/arc/lib/bootm.c                                        | 3 ---
 arch/arm/cpu/armv7/s5p4418/cpu.c                            | 3 ---
 arch/arm/mach-aspeed/ast2600/spl.c                          | 3 ---
 arch/arm/mach-imx/imx8/clock.c                              | 3 ---
 arch/arm/mach-imx/imx8/fdt.c                                | 3 ---
 arch/arm/mach-imx/imx8/iomux.c                              | 3 ---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                      | 3 ---
 arch/arm/mach-imx/imx8ulp/cgc.c                             | 3 ---
 arch/arm/mach-imx/imx8ulp/clock.c                           | 3 ---
 arch/arm/mach-imx/imx9/clock.c                              | 3 ---
 arch/arm/mach-imx/imx9/clock_root.c                         | 3 ---
 arch/arm/mach-imx/misc.c                                    | 3 ---
 arch/arm/mach-imx/spl_imx_romapi.c                          | 3 ---
 arch/arm/mach-meson/board-axg.c                             | 3 ---
 arch/arm/mach-meson/board-g12a.c                            | 3 ---
 arch/arm/mach-meson/board-gx.c                              | 3 ---
 arch/arm/mach-socfpga/clock_manager_agilex.c                | 3 ---
 arch/arm/mach-socfpga/clock_manager_agilex5.c               | 3 ---
 arch/arm/mach-socfpga/clock_manager_n5x.c                   | 3 ---
 arch/arm/mach-socfpga/clock_manager_s10.c                   | 3 ---
 arch/arm/mach-socfpga/mailbox_s10.c                         | 3 ---
 arch/arm/mach-socfpga/misc_gen5.c                           | 3 ---
 arch/arm/mach-socfpga/misc_soc64.c                          | 3 ---
 arch/arm/mach-socfpga/mmu-arm64_s10.c                       | 3 ---
 arch/arm/mach-socfpga/reset_manager_s10.c                   | 3 ---
 arch/arm/mach-socfpga/spl_agilex.c                          | 3 ---
 arch/arm/mach-socfpga/spl_agilex5.c                         | 3 ---
 arch/arm/mach-socfpga/spl_agilex7m.c                        | 3 ---
 arch/arm/mach-socfpga/spl_gen5.c                            | 3 ---
 arch/arm/mach-socfpga/spl_n5x.c                             | 3 ---
 arch/arm/mach-socfpga/spl_s10.c                             | 3 ---
 arch/arm/mach-socfpga/system_manager_soc64.c                | 3 ---
 arch/microblaze/lib/bootm.c                                 | 3 ---
 arch/mips/mach-ath79/qca956x/ddr.c                          | 3 ---
 arch/mips/mach-mscc/cpu.c                                   | 3 ---
 arch/mips/mach-mtmips/ddr_cal.c                             | 3 ---
 arch/mips/mach-octeon/cvmx-pko.c                            | 2 --
 arch/nios2/lib/bootm.c                                      | 3 ---
 arch/riscv/cpu/andes/spl.c                                  | 3 ---
 arch/riscv/cpu/cv1800b/dram.c                               | 3 ---
 arch/riscv/cpu/generic/dram.c                               | 3 ---
 arch/riscv/cpu/k230/dram.c                                  | 3 ---
 arch/riscv/cpu/th1520/spl.c                                 | 2 --
 arch/sh/lib/bootm.c                                         | 3 ---
 arch/x86/cpu/ivybridge/model_206ax.c                        | 3 ---
 arch/x86/lib/init_helpers.c                                 | 3 ---
 arch/x86/lib/zimage.c                                       | 3 ---
 arch/xtensa/lib/time.c                                      | 3 ---
 board/BuR/brsmarc1/board.c                                  | 3 ---
 board/BuR/common/common.c                                   | 3 ---
 board/Marvell/octeontx/smc.c                                | 3 ---
 board/Marvell/octeontx2/smc.c                               | 3 ---
 board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c         | 2 --
 board/advantech/imx8mp_rsb3720a1/spl.c                      | 2 --
 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c       | 2 --
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c       | 3 ---
 board/andestech/voyager/voyager.c                           | 3 ---
 board/armltd/vexpress64/vexpress64.c                        | 3 ---
 board/beacon/imx8mm/spl.c                                   | 3 ---
 board/beacon/imx8mn/spl.c                                   | 3 ---
 board/beacon/imx8mp/spl.c                                   | 3 ---
 board/beagle/beagleboneai64/beagleboneai64.c                | 2 --
 board/beagle/beagleplay/beagleplay.c                        | 2 --
 board/broadcom/bcmns/ns.c                                   | 3 ---
 board/cloos/imx8mm_phg/imx8mm_phg.c                         | 3 ---
 board/cloos/imx8mm_phg/spl.c                                | 3 ---
 board/compulab/imx8mm-cl-iot-gate/spl.c                     | 2 --
 board/coreboot/coreboot/coreboot.c                          | 3 ---
 board/cssi/cmpc885/cmpc885.c                                | 2 --
 board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c | 2 --
 board/data_modul/imx8mm_edm_sbc/spl.c                       | 2 --
 board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c | 2 --
 board/data_modul/imx8mp_edm_sbc/spl.c                       | 2 --
 board/dhelectronics/dh_imx8mp/common.c                      | 2 --
 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c           | 2 --
 board/dhelectronics/dh_imx8mp/spl.c                         | 2 --
 board/emcraft/imx8mp_navqp/spl.c                            | 3 ---
 board/emulation/qemu-riscv/qemu-riscv.c                     | 2 --
 board/engicam/imx8mm/icore_mx8mm.c                          | 2 --
 board/engicam/imx8mm/spl.c                                  | 2 --
 board/engicam/imx8mp/icore_mx8mp.c                          | 3 ---
 board/engicam/imx8mp/spl.c                                  | 3 ---
 board/gdsys/mpc8308/gazerbeam.c                             | 3 ---
 board/google/imx8mq_phanbell/imx8mq_phanbell.c              | 3 ---
 board/highbank/highbank.c                                   | 3 ---
 board/kontron/osm-s-mx8mp/osm-s-mx8mp.c                     | 3 ---
 board/kontron/osm-s-mx93/osm-s-mx93.c                       | 3 ---
 board/kontron/pitx_imx8m/pitx_imx8m.c                       | 2 --
 board/mntre/imx8mq_reform2/imx8mq_reform2.c                 | 3 ---
 board/msc/sm2s_imx8mp/sm2s_imx8mp.c                         | 2 --
 board/msc/sm2s_imx8mp/spl.c                                 | 3 ---
 board/nxp/imx8mm_evk/spl.c                                  | 3 ---
 board/nxp/imx8qm_mek/imx8qm_mek.c                           | 3 ---
 board/nxp/imx8qxp_mek/imx8qxp_mek.c                         | 3 ---
 board/phytec/imx8mp-libra-fpsc/spl.c                        | 3 ---
 board/phytec/phycore_imx8mm/phycore-imx8mm.c                | 3 ---
 board/phytec/phycore_imx8mm/spl.c                           | 3 ---
 board/phytec/phycore_imx8mp/phycore-imx8mp.c                | 3 ---
 board/phytec/phycore_imx8mp/spl.c                           | 3 ---
 board/phytec/phycore_imx93/phycore-imx93.c                  | 3 ---
 board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c   | 3 ---
 board/polyhex/imx8mp_debix_model_a/spl.c                    | 3 ---
 board/purism/librem5/librem5.c                              | 2 --
 board/purism/librem5/spl.c                                  | 2 --
 board/qualcomm/dragonboard410c/dragonboard410c.c            | 3 ---
 board/qualcomm/dragonboard820c/dragonboard820c.c            | 3 ---
 board/renesas/common/gen3-common.c                          | 3 ---
 board/renesas/common/gen4-common.c                          | 3 ---
 board/renesas/common/gen5-common.c                          | 3 ---
 board/ronetix/imx8mq-cm/imx8mq_cm.c                         | 2 --
 board/samsung/common/exynos5-dt.c                           | 3 ---
 board/samsung/common/misc.c                                 | 3 ---
 board/st/stm32f429-discovery/stm32f429-discovery.c          | 3 ---
 board/st/stm32f429-evaluation/stm32f429-evaluation.c        | 3 ---
 board/st/stm32f469-discovery/stm32f469-discovery.c          | 3 ---
 board/st/stm32f746-disco/stm32f746-disco.c                  | 3 ---
 board/st/stm32h743-disco/stm32h743-disco.c                  | 3 ---
 board/st/stm32h743-eval/stm32h743-eval.c                    | 3 ---
 board/st/stm32h747-disco/stm32h747-disco.c                  | 3 ---
 board/st/stm32h750-art-pi/stm32h750-art-pi.c                | 3 ---
 board/technexion/pico-imx8mq/pico-imx8mq.c                  | 3 ---
 board/ti/am62x/evm.c                                        | 2 --
 board/ti/am64x/evm.c                                        | 2 --
 board/ti/j784s4/evm.c                                       | 2 --
 board/toradex/apalis-imx8/apalis-imx8.c                     | 3 ---
 board/toradex/apalis_t30/apalis_t30.c                       | 3 ---
 board/toradex/colibri-imx8x/colibri-imx8x.c                 | 3 ---
 board/toradex/colibri_t20/colibri_t20.c                     | 3 ---
 board/toradex/common/tdx-cfg-block.c                        | 3 ---
 board/toradex/smarc-imx8mp/smarc-imx8mp.c                   | 3 ---
 board/toradex/smarc-imx8mp/spl.c                            | 3 ---
 board/toradex/verdin-imx8mm/spl.c                           | 3 ---
 board/toradex/verdin-imx8mm/verdin-imx8mm.c                 | 3 ---
 board/toradex/verdin-imx8mp/spl.c                           | 3 ---
 board/toradex/verdin-imx8mp/verdin-imx8mp.c                 | 3 ---
 board/xilinx/zynq/bootimg.c                                 | 3 ---
 boot/bootmeth-uclass.c                                      | 2 --
 boot/fdt_simplefb.c                                         | 3 ---
 boot/image-sig.c                                            | 2 --
 boot/image.c                                                | 3 ---
 cmd/bloblist.c                                              | 3 ---
 cmd/bootefi.c                                               | 3 ---
 cmd/bootm.c                                                 | 3 ---
 cmd/date.c                                                  | 3 ---
 cmd/mem.c                                                   | 3 ---
 cmd/sound.c                                                 | 3 ---
 cmd/spl.c                                                   | 3 ---
 common/cli_hush.c                                           | 3 ---
 common/stdio.c                                              | 3 ---
 drivers/block/sandbox.c                                     | 3 ---
 drivers/bootcount/pmic_pfuze100.c                           | 2 --
 drivers/cache/sandbox_cache.c                               | 3 ---
 drivers/clk/altera/clk-agilex.c                             | 3 ---
 drivers/clk/altera/clk-agilex5.c                            | 3 ---
 drivers/clk/altera/clk-mem-n5x.c                            | 3 ---
 drivers/clk/altera/clk-n5x.c                                | 3 ---
 drivers/clk/rockchip/clk_px30.c                             | 3 ---
 drivers/clk/rockchip/clk_rk3308.c                           | 3 ---
 drivers/clk/rockchip/clk_rk3528.c                           | 2 --
 drivers/clk/rockchip/clk_rk3568.c                           | 2 --
 drivers/clk/rockchip/clk_rk3576.c                           | 2 --
 drivers/clk/rockchip/clk_rk3588.c                           | 2 --
 drivers/clk/rockchip/clk_rv1108.c                           | 3 ---
 drivers/clk/rockchip/clk_rv1126.c                           | 2 --
 drivers/cpu/bcm283x_cpu.c                                   | 3 ---
 drivers/cpu/cpu-uclass.c                                    | 2 --
 drivers/cpu/imx8_cpu.c                                      | 3 ---
 drivers/cpu/mtk_cpu.c                                       | 3 ---
 drivers/firmware/arm-ffa/arm-ffa-uclass.c                   | 3 ---
 drivers/firmware/arm-ffa/arm-ffa.c                          | 3 ---
 drivers/firmware/arm-ffa/ffa-emul-uclass.c                  | 3 ---
 drivers/firmware/arm-ffa/sandbox_ffa.c                      | 3 ---
 drivers/gpio/gpio-uclass.c                                  | 3 ---
 drivers/gpio/nx_gpio.c                                      | 3 ---
 drivers/i2c/mxc_i2c.c                                       | 3 ---
 drivers/i2c/nx_i2c.c                                        | 3 ---
 drivers/i2c/ocores_i2c.c                                    | 3 ---
 drivers/i2c/soft_i2c.c                                      | 3 ---
 drivers/i2c/synquacer_i2c.c                                 | 2 --
 drivers/mailbox/imx-mailbox.c                               | 2 --
 drivers/misc/atsha204a-i2c.c                                | 3 ---
 drivers/misc/fs_loader.c                                    | 3 ---
 drivers/misc/imx8/fuse.c                                    | 3 ---
 drivers/mmc/ca_dw_mmc.c                                     | 3 ---
 drivers/mmc/f_sdh30.c                                       | 2 --
 drivers/mmc/jz_mmc.c                                        | 3 ---
 drivers/mmc/msm_sdhci.c                                     | 3 ---
 drivers/mmc/mv_sdhci.c                                      | 3 ---
 drivers/mtd/nand/raw/pxa3xx_nand.c                          | 3 ---
 drivers/mtd/nand/raw/tegra_nand.c                           | 3 ---
 drivers/mtd/nvmxip/nvmxip_qspi.c                            | 3 ---
 drivers/mtd/spi/sf-uclass.c                                 | 3 ---
 drivers/net/dwmac_s700.c                                    | 3 ---
 drivers/net/fec_mxc.c                                       | 3 ---
 drivers/net/gmac_rockchip.c                                 | 2 --
 drivers/net/mvneta.c                                        | 3 ---
 drivers/net/octeontx/smi.c                                  | 3 ---
 drivers/net/phy/fixed.c                                     | 3 ---
 drivers/net/phy/phy.c                                       | 3 ---
 drivers/net/phy/xilinx_gmii2rgmii.c                         | 3 ---
 drivers/net/sandbox-raw.c                                   | 3 ---
 drivers/net/sandbox.c                                       | 3 ---
 drivers/net/ti/keystone_net.c                               | 3 ---
 drivers/net/xilinx_axi_emac.c                               | 3 ---
 drivers/pci/pci_octeontx.c                                  | 3 ---
 drivers/pci/pcie_dw_meson.c                                 | 3 ---
 drivers/pci/pcie_dw_qcom.c                                  | 3 ---
 drivers/pci/pcie_dw_rockchip.c                              | 3 ---
 drivers/pci/pcie_dw_ti.c                                    | 3 ---
 drivers/pci/pcie_layerscape.c                               | 3 ---
 drivers/pci/pcie_starfive_jh7110.c                          | 3 ---
 drivers/pci_endpoint/pci_ep-uclass.c                        | 3 ---
 drivers/phy/marvell/comphy_core.c                           | 3 ---
 drivers/phy/omap-usb2-phy.c                                 | 3 ---
 drivers/phy/rockchip/phy-rockchip-pcie.c                    | 3 ---
 drivers/phy/rockchip/phy-rockchip-typec.c                   | 3 ---
 drivers/pinctrl/mtmips/pinctrl-mt7628.c                     | 3 ---
 drivers/pinctrl/nexell/pinctrl-nexell.c                     | 3 ---
 drivers/pinctrl/nexell/pinctrl-s5pxx18.c                    | 3 ---
 drivers/pinctrl/nxp/pinctrl-imx-mmio.c                      | 3 ---
 drivers/pinctrl/nxp/pinctrl-imx.c                           | 3 ---
 drivers/pinctrl/nxp/pinctrl-imx8.c                          | 3 ---
 drivers/pinctrl/nxp/pinctrl-mxs.c                           | 3 ---
 drivers/power/domain/imx8m-power-domain.c                   | 3 ---
 drivers/power/pmic/bd71837.c                                | 3 ---
 drivers/power/pmic/mc34708.c                                | 3 ---
 drivers/power/pmic/mp5416.c                                 | 3 ---
 drivers/power/pmic/pca9450.c                                | 3 ---
 drivers/power/regulator/pwm_regulator.c                     | 3 ---
 drivers/pwm/pwm-sifive.c                                    | 3 ---
 drivers/pwm/rk_pwm.c                                        | 3 ---
 drivers/pwm/sunxi_pwm.c                                     | 3 ---
 drivers/ram/stm32mp1/stm32mp1_tests.c                       | 3 ---
 drivers/reboot-mode/reboot-mode-gpio.c                      | 2 --
 drivers/reboot-mode/reboot-mode-rtc.c                       | 2 --
 drivers/remoteproc/rproc-uclass.c                           | 2 --
 drivers/serial/ns16550.c                                    | 3 ---
 drivers/serial/sandbox.c                                    | 3 ---
 drivers/serial/serial_adi_uart4.c                           | 2 --
 drivers/serial/serial_htif.c                                | 3 ---
 drivers/serial/serial_xen.c                                 | 3 ---
 drivers/smem/msm_smem.c                                     | 3 ---
 drivers/spi/ca_sflash.c                                     | 3 ---
 drivers/spi/microchip_coreqspi.c                            | 2 --
 drivers/spi/mvebu_a3700_spi.c                               | 3 ---
 drivers/spi/omap3_spi.c                                     | 3 ---
 drivers/spi/spi-sunxi.c                                     | 3 ---
 drivers/spi/spi-synquacer.c                                 | 2 --
 drivers/spi/spi-uclass.c                                    | 3 ---
 drivers/spi/tegra210_qspi.c                                 | 3 ---
 drivers/spmi/spmi-msm.c                                     | 3 ---
 drivers/thermal/imx_tmu.c                                   | 3 ---
 drivers/timer/ostm_timer.c                                  | 3 ---
 drivers/timer/sp804_timer.c                                 | 3 ---
 drivers/usb/common/common.c                                 | 3 ---
 drivers/usb/phy/rockchip_usb2_phy.c                         | 3 ---
 drivers/usb/tcpm/tcpm.c                                     | 2 --
 drivers/video/hx8238d.c                                     | 2 --
 drivers/video/imx/mxc_ipuv3_fb.c                            | 3 ---
 drivers/video/nexell_display.c                              | 3 ---
 drivers/video/rockchip/rk_lvds.c                            | 3 ---
 drivers/video/rockchip/rk_mipi.c                            | 3 ---
 drivers/video/sandbox_sdl.c                                 | 3 ---
 drivers/video/tidss/tidss_drv.c                             | 2 --
 drivers/video/zynqmp/zynqmp_dpsub.c                         | 3 ---
 drivers/watchdog/armada-37xx-wdt.c                          | 3 ---
 drivers/watchdog/at91sam9_wdt.c                             | 3 ---
 drivers/watchdog/mt7621_wdt.c                               | 3 ---
 drivers/watchdog/orion_wdt.c                                | 3 ---
 drivers/watchdog/sbsa_gwdt.c                                | 3 ---
 drivers/watchdog/wdt-uclass.c                               | 3 ---
 fs/fs.c                                                     | 3 ---
 fs/ubifs/ubifs.c                                            | 3 ---
 include/relocate.h                                          | 2 --
 lib/efi_loader/efi_capsule.c                                | 3 ---
 lib/efi_loader/efi_gop.c                                    | 3 ---
 lib/efi_loader/efi_rng.c                                    | 3 ---
 net/eth-uclass.c                                            | 3 ---
 net/tftp.c                                                  | 3 ---
 net/wget.c                                                  | 3 ---
 test/cmd/exit.c                                             | 3 ---
 test/cmd/test_echo.c                                        | 3 ---
 test/cmd/test_pause.c                                       | 3 ---
 test/dm/blk.c                                               | 3 ---
 test/dm/i3c.c                                               | 2 --
 test/lib/test_print.c                                       | 3 ---
 test/log/log_filter.c                                       | 3 ---
 287 files changed, 810 deletions(-)
arch/arc/lib/bootm.c +0 -3
index b143392ee6c2c16a4da87dc375c45bcf969474c6..91bce5235a554ef9d48a256fb3e67ba51304e236 100644
@@ -10,9 +10,6 @@
 #include <irq_func.h>
 #include <log.h>
 #include <asm/cache.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static int cleanup_before_linux(void)
 {
arch/arm/cpu/armv7/s5p4418/cpu.c +0 -3
index 27ffb450378f5b3edf9d66ad8e4ef093551fe188..2c5504395594f7079bd08b50d788669efb357501 100644
@@ -7,7 +7,6 @@
 #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>
@@ -15,8 +14,6 @@
 #include <asm/arch/tieoff.h>
 #include <cpu_func.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifndef	CONFIG_ARCH_CPU_INIT
 #error must be define the macro "CONFIG_ARCH_CPU_INIT"
 #endif
arch/arm/mach-aspeed/ast2600/spl.c +0 -3
index 0c5a82ed0947bcbbd8376cf73c1f685186f654bb..60f2c5d291e3fe8adb7c1b6513b993ec291fd9ac 100644
@@ -9,9 +9,6 @@
 #include <linux/err.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2600.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 void board_init_f(ulong dummy)
 {
arch/arm/mach-imx/imx8/clock.c +0 -3
index 4e49b5bf3755a91ec89eeb7416c857c4a87393c2..e37d3bf31e450841e8c19f8dc4e08dd4edca4005 100644
@@ -3,12 +3,9 @@
  * Copyright 2018 NXP
  */
 
-#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/arch/clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u32 mxc_get_clock(enum mxc_clock clk)
 {
 	switch (clk) {
arch/arm/mach-imx/imx8/fdt.c +0 -3
index ce78c8ce919a1c7e3e792c1b13316f8cf3454dbf..8337edc2f62b8a02418efa706f95ca1612e214a9 100644
@@ -6,7 +6,6 @@
 #include <log.h>
 #include <firmware/imx/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>
@@ -14,8 +13,6 @@
 #include <cpu.h>
 #include <dm.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static bool check_owned_resource(sc_rsrc_t rsrc_id)
 {
 	bool owned;
arch/arm/mach-imx/imx8/iomux.c +0 -3
index 3e27d75827a5f4469275d3ffc6906afb538fd3c5..b6175a50226ccc941260807badb38cdfce04f44c 100644
@@ -4,13 +4,10 @@
  */
 
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <firmware/imx/sci/sci.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * configures a single pad in the iomuxer
  */
arch/arm/mach-imx/imx8m/clock_imx8mm.c +0 -3
index 77c8efc7899cc33c0c0be94a20925434e10249cc..b7b3702041ee418a6f3c517cc99cd37aa9597ba9 100644
@@ -8,7 +8,6 @@
 #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>
@@ -16,8 +15,6 @@
 #include <linux/delay.h>
 #include <phy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct anamix_pll *ana_pll = (struct anamix_pll *)ANATOP_BASE_ADDR;
 
 static u32 get_root_clk(enum clk_root_index clock_id);
arch/arm/mach-imx/imx8ulp/cgc.c +0 -3
index f9d8ed5b048b616cac1b1398f906444beed09ae2..69585a3605b6be75b44b092752dc138b82287496 100644
@@ -10,12 +10,9 @@
 #include <asm/arch/cgc.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <hang.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct cgc1_regs *cgc1_regs = (struct cgc1_regs *)0x292C0000UL;
 static struct cgc2_regs *cgc2_regs = (struct cgc2_regs *)0x2da60000UL;
 
arch/arm/mach-imx/imx8ulp/clock.c +0 -3
index c390f20d7694660f039ada2a595f3df5facfe8a6..1b5cbd56f50ba4df08f18154c8a7eeadfef28346 100644
@@ -12,11 +12,8 @@
 #include <asm/arch/pcc.h>
 #include <asm/arch/cgc.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PLL_USB_EN_USB_CLKS_MASK	(0x01 << 6)
 #define PLL_USB_PWR_MASK		(0x01 << 12)
 #define PLL_USB_ENABLE_MASK		(0x01 << 13)
arch/arm/mach-imx/imx9/clock.c +0 -3
index e65cabef2c96a3e707112ba07a646fd5babbbe6a..14a2bdf5762fab557c4a0e9c7733e4224ec7111f 100644
@@ -10,7 +10,6 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/ccm_regs.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <div64.h>
 #include <errno.h>
@@ -19,8 +18,6 @@
 #include <log.h>
 #include <phy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct anatop_reg *ana_regs = (struct anatop_reg *)ANATOP_BASE_ADDR;
 
 static struct imx_intpll_rate_table imx9_intpll_tbl[] = {
arch/arm/mach-imx/imx9/clock_root.c +0 -3
index 5dbc398e97f8b79e367eef9079b7cb6ad066360a..acf79a40584ee8ea90c586847ca95816ad73c087 100644
@@ -11,11 +11,8 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <linux/iopoll.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct ccm_reg *ccm_reg = (struct ccm_reg *)CCM_BASE_ADDR;
 
 static enum ccm_clk_src clk_root_mux[][4] = {
arch/arm/mach-imx/misc.c +0 -3
index 7452b82f110557726d66c458f4cd69589118b525..90d91b2300ad1273463451f7757abf92f14c7efb 100644
@@ -6,14 +6,11 @@
 #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>
 #include <asm/mach-imx/regs-common.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* 1 second delay should be plenty of time for block reset. */
 #define	RESET_MAX_TIMEOUT	1000000
 
arch/arm/mach-imx/spl_imx_romapi.c +0 -3
index b7008df8e35ad381ea6e75d02e372c74b65a5817..d36536e600e50ec930f70b5684e658d005cb25d2 100644
@@ -7,13 +7,10 @@
 #include <image.h>
 #include <imx_container.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Caller need ensure the offset and size to align with page size */
 ulong spl_romapi_raw_seekable_read(u32 offset, u32 size, void *buf)
 {
arch/arm/mach-meson/board-axg.c +0 -3
index 6535539184ccfbb4cb891f5510a8c63ad274d602..542792cad1b47423a95f6788be404cb9c14722b5 100644
@@ -10,13 +10,10 @@
 #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>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int meson_get_boot_device(void)
 {
 	return readl(AXG_AO_SEC_GP_CFG0) & AXG_AO_BOOT_DEVICE;
arch/arm/mach-meson/board-g12a.c +0 -3
index dc4abe1e107469c8cdd3917fcecbcbb774632449..17722cb897d312e83fed6bca944fcb9ce4f23d53 100644
@@ -12,13 +12,10 @@
 #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>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int meson_get_boot_device(void)
 {
 	return readl(G12A_AO_SEC_GP_CFG0) & G12A_AO_BOOT_DEVICE;
arch/arm/mach-meson/board-gx.c +0 -3
index 0370ed57e205073f431175eea9911e0d31861dab..d5c506df22b30177c1d02845124e0d0d544a5ce6 100644
@@ -11,14 +11,11 @@
 #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/printk.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int meson_get_boot_device(void)
 {
 	return readl(GX_AO_SEC_GP_CFG0) & GX_AO_BOOT_DEVICE;
arch/arm/mach-socfpga/clock_manager_agilex.c +0 -3
index 9987d5bcee6fab4f4ce102c8e748dbcfbb032278..95c7f044952b05d7e935893bf4631e00ff209243 100644
@@ -10,12 +10,9 @@
 #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>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static ulong cm_get_rate_dm(u32 id)
 {
 	struct udevice *dev;
arch/arm/mach-socfpga/clock_manager_agilex5.c +0 -3
index 7ec28d91ef326222e880ea8920575c09cbe96ab4..fa068a9eeb16a67f41d3c2cabf65e04bb8f0d9d6 100644
@@ -14,7 +14,6 @@
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -23,8 +22,6 @@
 #include <asm/arch/system_manager.h>
 #include <dt-bindings/clock/agilex5-clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static ulong cm_get_rate_dm(u32 id)
 {
 	struct udevice *dev;
arch/arm/mach-socfpga/clock_manager_n5x.c +0 -3
index c4c071330fc34857396b91aa1bd4d29895be1047..8e47b4b8f5bda1b6e1e71a91e16b2e4a427c48c1 100644
@@ -6,15 +6,12 @@
 
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/system_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
 #include <dt-bindings/clock/n5x-clock.h>
 #include <malloc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static ulong cm_get_rate_dm(u32 id)
 {
 	struct udevice *dev;
arch/arm/mach-socfpga/clock_manager_s10.c +0 -3
index d6c64e9801076824a32c096b9260a58fd25b01f5..fd27470f967f87ab2f32bad53d405bdf47c88fff 100644
@@ -7,14 +7,11 @@
 #include <compiler.h>
 #include <dm/device.h>
 #include <linux/errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/handoff_soc64.h>
 #include <asm/arch/system_manager.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * function to write the bypass register which requires a poll of the
  * busy bit
arch/arm/mach-socfpga/mailbox_s10.c +0 -3
index f9c34e857117bd5c5e2ef62630fc12e85fd325d7..5e8768168d3f14da8bfe67d138f0a7919ca428e7 100644
@@ -8,15 +8,12 @@
 #include <asm/arch/mailbox_s10.h>
 #include <asm/arch/smc_api.h>
 #include <asm/arch/system_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/secure.h>
 #include <asm/system.h>
 #include <hang.h>
 #include <wait_bit.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define MBOX_READL(reg)			\
 	 readl(SOCFPGA_MAILBOX_ADDRESS + (reg))
 
arch/arm/mach-socfpga/misc_gen5.c +0 -3
index 5259ef54d734aa0575a05c05e26da7280fba7c59..ae33051c00f23d26ecdd1a010de1f3eff4d60e71 100644
@@ -6,7 +6,6 @@
 #include <config.h>
 #include <cpu_func.h>
 #include <init.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <env.h>
 #include <errno.h>
@@ -28,8 +27,6 @@
 
 #include <dt-bindings/reset/altr,rst-mgr.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct pl310_regs *const pl310 =
 	(struct pl310_regs *)CFG_SYS_PL310_BASE;
 static struct nic301_registers *nic301_regs =
arch/arm/mach-socfpga/misc_soc64.c +0 -3
index 5222b384434aa29bba13dc4e62059f91cc3d7cd8..356240a647e85c903b59ec7e6f5d4188c4eadd79 100644
@@ -17,11 +17,8 @@
 #include <asm/arch/system_manager.h>
 #include <asm/io.h>
 #include <asm/system.h>
-#include <asm/global_data.h>
 #include <mach/clock_manager.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Agilex5 Sub Device Jtag ID List */
 #define A3690_JTAG_ID	0x036090DD
 #define A3694_JTAG_ID	0x436090DD
arch/arm/mach-socfpga/mmu-arm64_s10.c +0 -3
index 1dc44ab47972bac02215514e8e5a8478c9272e05..1a7f8d42415984c5edb4199c0b355c2dbfe7d666 100644
@@ -5,9 +5,6 @@
  */
 
 #include <asm/armv8/mmu.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 #if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)
 static struct mm_region socfpga_agilex5_mem_map[] = {
arch/arm/mach-socfpga/reset_manager_s10.c +0 -3
index abb62a9b49ff339b06e914e917a82f92df1be039..7e1ecc1cd1d935f743ba357deb7ef48fd9bd4fae 100644
@@ -7,7 +7,6 @@
 
 #include <errno.h>
 #include <hang.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/secure.h>
 #include <asm/arch/reset_manager.h>
@@ -20,8 +19,6 @@
 #include <linux/intel-smc.h>
 #include <wait_bit.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define TIMEOUT_300MS     300
 
 /* F2S manager registers */
arch/arm/mach-socfpga/spl_agilex.c +0 -3
index 48f258a37b4b61f854bdd0b9a41430a2b0dde4f5..53a9aa55f804b24b96f548adb6c17ee976551ac7 100644
@@ -7,7 +7,6 @@
 
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/utils.h>
 #include <hang.h>
@@ -22,8 +21,6 @@
 #include <wdt.h>
 #include <dm/uclass.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u32 reset_flag(u32 flag)
 {
 	/* Check rstmgr.stat for warm reset status */
arch/arm/mach-socfpga/spl_agilex5.c +0 -3
index 1be347360f50dfc44ed92af56c7cc7e6992fb8a2..2c3e40b664abd28497f554a6501ead21b331ca76 100644
@@ -6,7 +6,6 @@
  */
 
 #include <init.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <hang.h>
 #include <spl.h>
@@ -19,8 +18,6 @@
 #include <wdt.h>
 #include <dm/uclass.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u32 reset_flag(u32 flag)
 {
 	/* Check rstmgr.stat for warm reset status */
arch/arm/mach-socfpga/spl_agilex7m.c +0 -3
index 90065ccee6f00880862c27862b20ca292531eafb..7371202a7124a37073bdf58959e3ff41d5a85a25 100644
@@ -15,14 +15,11 @@
 #include <asm/arch/misc.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
 #include <dm/uclass.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void board_init_f(ulong dummy)
 {
 	int ret;
arch/arm/mach-socfpga/spl_gen5.c +0 -3
index df79cfe0f7fafd4e84f27a23a6b66054fcf8afc3..08b756db2cae13c687f6c593c6afa823eb93b7e9 100644
@@ -6,7 +6,6 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/utils.h>
 #include <image.h>
@@ -25,8 +24,6 @@
 #include <dm/uclass.h>
 #include <linux/bitops.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u32 spl_boot_device(void)
 {
 	const u32 bsel = readl(socfpga_get_sysmgr_addr() +
arch/arm/mach-socfpga/spl_n5x.c +0 -3
index 81283ef71620034ca173048c27cefed6a62c32d2..a49be8379210c6641904b8491404e6bdc888f704 100644
@@ -10,7 +10,6 @@
 #include <asm/arch/misc.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/utils.h>
 #include <dm/uclass.h>
@@ -20,8 +19,6 @@
 #include <spl.h>
 #include <watchdog.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void board_init_f(ulong dummy)
 {
 	int ret;
arch/arm/mach-socfpga/spl_s10.c +0 -3
index fa83ff96adc862afb2209ba91c031ce89517e97b..a0d3c96d4562892ff795258c1f609f33a3562911 100644
@@ -7,7 +7,6 @@
 #include <hang.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/utils.h>
 #include <debug_uart.h>
@@ -22,8 +21,6 @@
 #include <watchdog.h>
 #include <dm/uclass.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void board_init_f(ulong dummy)
 {
 	const struct cm_config *cm_default_cfg = cm_get_default_config();
arch/arm/mach-socfpga/system_manager_soc64.c +0 -3
index 913f93c8f94d8eed319f52161a9e63bedab05eea..a5c0387190b26a87eec1292816e25467c9818d59 100644
@@ -6,12 +6,9 @@
 
 #include <asm/arch/handoff_soc64.h>
 #include <asm/arch/system_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)
 /*
  * Setting RESET_PULSE_OVERRIDE bit for successful reset staggering pulse
arch/microblaze/lib/bootm.c +0 -3
index 4879a41aab3bb141a6e6b5d532484c1fb7221b80..2410515f4ac504ab6e64bd0e70922f854d3e15e9 100644
@@ -17,12 +17,9 @@
 #include <image.h>
 #include <log.h>
 #include <asm/cache.h>
-#include <asm/global_data.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void boot_jump_linux(struct bootm_headers *images, int flag)
 {
 	void (*thekernel)(char *cmdline, ulong rd, ulong dt);
arch/mips/mach-ath79/qca956x/ddr.c +0 -3
index 2e46e24f48309871e44b1ca2c59b1106228c6bcc..754e2573e37d7b2e722dff4259abe087cf788e9d 100644
@@ -5,7 +5,6 @@
  * Based on QSDK
  */
 
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
@@ -182,8 +181,6 @@
 	DDR_CTL_CONFIG_MISC_SRC1_SRAM_SYNC_SET(0x1) | \
 	DDR_CTL_CONFIG_MISC_SRC2_SRAM_SYNC_SET(0x1)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void qca956x_ddr_init(void)
 {
 	u32 ddr_config, ddr_config2, ddr_config3, mod_val, \
arch/mips/mach-mscc/cpu.c +0 -3
index 22b1b98e0ef4e545b7bbcd0100c6b0c6b5403c66..8ae6fb9437ae407b27fe75bdcdfefb5137092c1d 100644
@@ -4,7 +4,6 @@
  */
 
 #include <init.h>
-#include <asm/global_data.h>
 #include <linux/bitops.h>
 
 #include <asm/io.h>
@@ -14,8 +13,6 @@
 #include <mach/tlb.h>
 #include <mach/ddr.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if CFG_SYS_SDRAM_SIZE <= SZ_64M
 #define MSCC_RAM_TLB_SIZE   SZ_64M
 #define MSCC_ATTRIB2   MMU_REGIO_INVAL
arch/mips/mach-mtmips/ddr_cal.c +0 -3
index e2e1760a64681a07c26158de0c4e036d993c564f..5fc4e0c49e86528a280cc158cd27680409ba9e32 100644
@@ -7,13 +7,10 @@
 
 #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>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define COARSE_MIN_START	6
 #define FINE_MIN_START		15
 #define COARSE_MAX_START	7
arch/mips/mach-octeon/cvmx-pko.c +0 -2
index 8a9181362bda894922f2adab59c51bcef6492563..432488f7815bc95ea0c20f60844c4699071381fd 100644
@@ -52,8 +52,6 @@
 #include <mach/cvmx-helper-pki.h>
 #include <mach/cvmx-helper-pko.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define CVMX_PKO_NQ_PER_PORT_MAX 32
 
 static cvmx_pko_return_value_t cvmx_pko2_config_port(short ipd_port,
arch/nios2/lib/bootm.c +0 -3
index 71319839ba21b68b714ffa59e044ea486b58847d..294ebfb508ba786d98df179ac4230549cedac5a7 100644
@@ -10,9 +10,6 @@
 #include <image.h>
 #include <irq_func.h>
 #include <log.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
arch/riscv/cpu/andes/spl.c +0 -3
index a13dc4095a457372cbc1e64f1b11170a95c92d3d..1e19fad92884617368300dac881ea73435383dbb 100644
@@ -8,11 +8,8 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
-#include <asm/global_data.h>
 #include <asm/system.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if CONFIG_IS_ENABLED(RAM_SUPPORT)
 struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)
 {
arch/riscv/cpu/cv1800b/dram.c +0 -3
index 91007c0a3d341bfd7927e73525ec6c6c5983b17d..5d7659887b9a41ea1e6f87681e0e07c6400ab55d 100644
@@ -5,11 +5,8 @@
 
 #include <fdtdec.h>
 #include <init.h>
-#include <asm/global_data.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
arch/riscv/cpu/generic/dram.c +0 -3
index 91007c0a3d341bfd7927e73525ec6c6c5983b17d..5d7659887b9a41ea1e6f87681e0e07c6400ab55d 100644
@@ -5,11 +5,8 @@
 
 #include <fdtdec.h>
 #include <init.h>
-#include <asm/global_data.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
arch/riscv/cpu/k230/dram.c +0 -3
index b2d3e4fd6a96d7fc6ca8b8507f4eba85f7e9c9b5..5d7659887b9a41ea1e6f87681e0e07c6400ab55d 100644
@@ -3,13 +3,10 @@
  * Copyright (C) 2018, Bin Meng <[email protected]>
  */
 
-#include <asm/global_data.h>
 #include <fdtdec.h>
 #include <init.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
arch/riscv/cpu/th1520/spl.c +0 -2
index b95470485f6d5cf6125f285145c291ef9102e02c..ceb934021d9f0102e1258a4dcead80b76f91ca82 100644
@@ -10,8 +10,6 @@
 #include <log.h>
 #include <init.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define TH1520_SUBSYS_CLK		(void __iomem *)(0xffff011000 + 0x220)
 #define  TH1520_SUBSYS_CLK_VO_EN	BIT(2)
 #define  TH1520_SUBSYS_CLK_VI_EN	BIT(1)
arch/sh/lib/bootm.c +0 -3
index bb0f59e0aa23d1172244c51d55df310c63be6816..1c118870dad684b457325a823e8f08bca28be94a 100644
@@ -13,11 +13,8 @@
 #include <env.h>
 #include <image.h>
 #include <asm/byteorder.h>
-#include <asm/global_data.h>
 #include <asm/zimage.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CONFIG_SH_SDRAM_OFFSET
 #define GET_INITRD_START(initrd, linux) (initrd - linux + CONFIG_SH_SDRAM_OFFSET)
 #else
arch/x86/cpu/ivybridge/model_206ax.c +0 -3
index b72de96a277eb0fe8c7bd0a899f5b264303aca87..ed0ad686b3faf946deab19c9e78a21959e477ceb 100644
@@ -14,7 +14,6 @@
 #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>
@@ -23,8 +22,6 @@
 #include <asm/turbo.h>
 #include <asm/arch/model_206ax.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void enable_vmx(void)
 {
 	struct cpuid_result regs;
arch/x86/lib/init_helpers.c +0 -3
index bd0efde00c1090d47c7cbc9ed7227f328ec06ff7..96943cb8c462d82127a98289accca7c0eff8187c 100644
@@ -5,13 +5,10 @@
  */
 
 #include <init.h>
-#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/mtrr.h>
 #include <asm/u-boot-x86.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int init_cache_f_r(void)
 {
 	bool do_mtrr = CONFIG_IS_ENABLED(X86_32BIT_INIT) ||
arch/x86/lib/zimage.c +0 -3
index 2ea9bcf59c2796bad6fb5682866a5ab4fd05a9ba..a5f2231aa523356de93368338b5fd249b8abad6e 100644
@@ -30,7 +30,6 @@
 #include <asm/bootm.h>
 #include <asm/bootparam.h>
 #include <asm/efi.h>
-#include <asm/global_data.h>
 #ifdef CONFIG_SYS_COREBOOT
 #include <asm/arch/timestamp.h>
 #endif
@@ -38,8 +37,6 @@
 #include <linux/ctype.h>
 #include <linux/libfdt.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * Memory lay-out:
  *
arch/xtensa/lib/time.c +0 -3
index 319635c6b0936515f2cd219f122bc62858817830..1fe33a4c62b948cf5b3c85b5a7cb67e7ec5c323a 100644
@@ -5,12 +5,9 @@
 
 #include <clock_legacy.h>
 #include <time.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/stringify.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if XCHAL_HAVE_CCOUNT
 static ulong get_ccount(void)
 {
board/BuR/brsmarc1/board.c +0 -3
index c05eec6b35ed1d5e871e80efd24641e130595f80..01d7a8c39e23f087ea539d722084234caa8b5efd 100644
@@ -18,7 +18,6 @@
 #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>
@@ -30,8 +29,6 @@
 /* -- defines for used GPIO Hardware -- */
 #define PER_RESET		(2 * 32 + 0)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if defined(CONFIG_XPL_BUILD)
 static const struct ddr_data ddr3_data = {
 	.datardsratio0 = MT41K256M16HA125E_RD_DQS,
board/BuR/common/common.c +0 -3
index 3513f43a9f560d28d0da68d229ecf3a1b7cf6c19..bbafecd79097070e3eb9462bccc05626f8bbc76a 100644
@@ -13,12 +13,9 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <i2c.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include "bur_common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* --------------------------------------------------------------------------*/
 
 int ft_board_setup(void *blob, struct bd_info *bd)
board/Marvell/octeontx/smc.c +0 -3
index 8df32049bda69e99cf28c0dd78e372cc94790d4d..ab6284a732cfa2c3057149bff5df69f9f25f3a95 100644
@@ -5,13 +5,10 @@
  * https://spdx.org/licenses
  */
 
-#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/arch/smc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 ssize_t smc_dram_size(unsigned int node)
 {
 	struct pt_regs regs;
board/Marvell/octeontx2/smc.c +0 -3
index 9e3169576c65ec052001ce43d57f1143d68a46d6..10645a74f6990555afbd81a48fe7561d1621658b 100644
@@ -5,15 +5,12 @@
  * https://spdx.org/licenses
  */
 
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/psci.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/arch/smc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 ssize_t smc_dram_size(unsigned int node)
 {
 	struct pt_regs regs;
board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +0 -2
index 8c9e98308765c0b3d70d22337fbf6a654c408d03..a9a12a4f659139d60adfe157c5398339ecda9469 100644
@@ -26,8 +26,6 @@
 #include <linux/kernel.h>
 #include <power/pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CONFIG_NAND_MXS
 static void setup_gpmi_nand(void)
 {
board/advantech/imx8mp_rsb3720a1/spl.c +0 -2
index 1f7c1f25adcf969d6a980a5795e89e9295b2a692..fb8e84377598cfde5bd8e274ef0fd23c759c7504 100644
@@ -29,8 +29,6 @@
 #include <power/pmic.h>
 #include <power/pca9450.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 #ifdef CONFIG_SPL_BOOTROM_SUPPORT
board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c +0 -2
index accd300df04d658eb1ca39b4649966feb08129e4..fbe8b247e696d2a043c396145963676a08149236 100644
@@ -16,8 +16,6 @@
 #include <asm/arch/sys_proto.h>
 /* #include <power-domain.h> */
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \
 			(SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			(SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +0 -3
index 3def182f2967e24fb2b444632866877da9725d3d..8214e62776882d7730d37e36203c0ae4b44f59ac 100644
@@ -8,7 +8,6 @@
 #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>
@@ -19,8 +18,6 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \
 			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/andestech/voyager/voyager.c +0 -3
index dc8f13477754eb5410b041129a9601a6177f41c3..23fd0910ef82c39b2d38db5110ef4d2da7eac73b 100644
@@ -5,7 +5,6 @@
  */
 
 #include <asm/csr.h>
-#include <asm/global_data.h>
 #include <asm/sbi.h>
 #include <config.h>
 #include <cpu_func.h>
@@ -19,8 +18,6 @@
 #include <net.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
board/armltd/vexpress64/vexpress64.c +0 -3
index e8f1c2fe9fe26e7007d73b64cdd2155c6e742743..d68da0e3d650923d924949eb67dff498279702a5 100644
@@ -12,7 +12,6 @@
 #include <errno.h>
 #include <net.h>
 #include <netdev.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <linux/sizes.h>
@@ -24,8 +23,6 @@
 #include <virtio.h>
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const struct pl01x_serial_plat serial_plat = {
 	.base = V2M_UART0,
 	.type = TYPE_PL011,
board/beacon/imx8mm/spl.c +0 -3
index 93ee5b7ee0cdf8a6b227b4731c4f48b06e2d7ffc..1e5935788ff6bcf9617de0ba13fd725243304047 100644
@@ -5,7 +5,6 @@
 #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>
@@ -23,8 +22,6 @@
 #include <power/pmic.h>
 #include <power/bd71837.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
board/beacon/imx8mn/spl.c +0 -3
index e91d3fdcf5edc978e92a6a4f349a08501d9c6085..46db42ec92111fcaff1a0d3c36d45dc44f3e044b 100644
@@ -9,7 +9,6 @@
 #include <log.h>
 #include <asm/io.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mn_pins.h>
@@ -32,8 +31,6 @@
 #include <dm/uclass-internal.h>
 #include <dm/device-internal.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/beacon/imx8mp/spl.c +0 -3
index 027fae38278638e9a238c86637153ed12353cc4f..e82e385b774bba3853753d24f7448938bb5c12a1 100644
@@ -8,7 +8,6 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
-#include <asm/global_data.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
@@ -22,8 +21,6 @@
 #include <dm/uclass.h>
 #include <dm/device.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/beagle/beagleboneai64/beagleboneai64.c +0 -2
index 500fcc58ed81a6a91c882938c304c616ddc4b393..27b1f22562c48c1bc242a77cd8fbc66398bd55c8 100644
@@ -13,8 +13,6 @@
 #include <fdt_support.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct efi_fw_image fw_images[] = {
 	{
 		.image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID,
board/beagle/beagleplay/beagleplay.c +0 -2
index 9bc9ca30e952671838722d0f5aaccc036bb3f35f..70d296de9f863445854ec670730beecacedde092 100644
@@ -14,8 +14,6 @@
 
 #include <asm/arch/hardware.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct efi_fw_image fw_images[] = {
 	{
 		.image_type_id = BEAGLEPLAY_TIBOOT3_IMAGE_GUID,
board/broadcom/bcmns/ns.c +0 -3
index 47a01227a353d75314b0641a47facf4f565585b9..cb53ec68cf8c5e105ef1c198e81f0ab5cbde5c1a 100644
@@ -9,12 +9,9 @@
 #include <log.h>
 #include <ram.h>
 #include <serial.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
board/cloos/imx8mm_phg/imx8mm_phg.c +0 -3
index 091c9a59a52b66bbe63b044cc34b20fcd52c187f..1ca1c07e08ed82f5b3f183cf1f3d7b07ee881408 100644
@@ -7,14 +7,11 @@
 #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>
 #include <asm/io.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
board/cloos/imx8mm_phg/spl.c +0 -3
index b8892ed2fccd80bf483db833b62a8bf55817d67e..b2340a0ded3dc152d64ca0e8ebfd4800ce382bc1 100644
@@ -10,7 +10,6 @@
 #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>
@@ -28,8 +27,6 @@
 #include <power/pmic.h>
 #include <power/pca9450.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
board/compulab/imx8mm-cl-iot-gate/spl.c +0 -2
index 6d9af2538b630a0939d557ab35368b803dfe2fb9..daac6dca4ce81ded7b3136e647f102a4a27e5cb2 100644
@@ -32,8 +32,6 @@
 
 #include "ddr/ddr.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
board/coreboot/coreboot/coreboot.c +0 -3
index f2ca10767681d83ecc5e10868d8586421b2c7901..d0e8db6cdfe5c382c5857092921dad93b150bc50 100644
@@ -7,9 +7,6 @@
 #include <init.h>
 #include <smbios.h>
 #include <asm/cb_sysinfo.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 int board_early_init_r(void)
 {
board/cssi/cmpc885/cmpc885.c +0 -2
index 49c13056edcb35af47508e5c6cbfbe097dabfd97..552349d104aa4657743e30705331de903798351b 100644
@@ -26,8 +26,6 @@
 
 #include "../common/common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define ADDR_CPLD_R_RESET		((unsigned short __iomem *)CONFIG_CPLD_BASE)
 #define ADDR_CPLD_R_ETAT		((unsigned short __iomem *)(CONFIG_CPLD_BASE + 2))
 #define ADDR_CPLD_R_TYPE		((unsigned char  __iomem *)(CONFIG_CPLD_BASE + 3))
board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c +0 -2
index e271d060efa6b8b36dc5f81d0eba5c2e80e5b10c..ab4a484d393f9510cb492111f27dc0ef7832b2c9 100644
@@ -14,8 +14,6 @@
 
 #include "../common/common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int board_late_init(void)
 {
 	struct udevice *dev;
board/data_modul/imx8mm_edm_sbc/spl.c +0 -2
index a9ef049652ac0f8a5c1937a5e5f5f743780631d4..c6a5740c7a7050164dbe480407f7434e8a36ad01 100644
@@ -27,8 +27,6 @@
 
 #include "../common/common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int data_modul_imx_edm_sbc_board_power_init(void)
 {
 	struct udevice *dev;
board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c +0 -2
index d6f0a917023db26980f3d83f1f7e639a31c846e0..5c319df1cdee84a6f2f4de10921fd27f9d999256 100644
@@ -17,8 +17,6 @@
 
 #include "../common/common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void dmo_setup_second_mac_address(void)
 {
 	u8 enetaddr[6];
board/data_modul/imx8mp_edm_sbc/spl.c +0 -2
index f81b7274556f634b114f7c853fa2f529cd846c22..314f7e87a9d3d06175399d6c80431bd5a704bb14 100644
@@ -28,8 +28,6 @@
 
 #include "../common/common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int data_modul_imx_edm_sbc_board_power_init(void)
 {
 	struct udevice *dev;
board/dhelectronics/dh_imx8mp/common.c +0 -2
index f6db9f678042f100f2401ae077f5a426736a297b..5d89c94970dbd281cff9b46e69a8a88b0bd102d5 100644
@@ -8,8 +8,6 @@
 
 #include "lpddr4_timing.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u8 dh_get_memcfg(void)
 {
 	struct gpio_desc gpio[4];
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c +0 -2
index 5c35a5bf447665768f9d154e9dfc16a7129ec3b2..3fe98d36f5b2b8b75fa29fc92deec90f5bfca1fe 100644
@@ -20,8 +20,6 @@
 #include "../common/dh_common.h"
 #include "../common/dh_imx.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int mach_cpu_init(void)
 {
 	icache_enable();
board/dhelectronics/dh_imx8mp/spl.c +0 -2
index 714f846521e0b9308c9fbacc039df36f773c3409..727e1ff3774d7e1e5789e0acd61114bf9ce66c7f 100644
@@ -29,8 +29,6 @@
 
 #include "lpddr4_timing.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
board/emcraft/imx8mp_navqp/spl.c +0 -3
index 7f30f3af74220a6548abd051c17dea061c532cdb..5ee94d078f8f163bf23acb3e8da1807c3b09c13c 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/sections.h>
 #include <dm/device.h>
@@ -20,8 +19,6 @@
 #include <power/pmic.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/emulation/qemu-riscv/qemu-riscv.c +0 -2
index 97c8211c1008fd265e63b62b266c8a983cae9042..ce5bc34ca71e5f6eddf340b842d03b17371c7ef6 100644
@@ -15,8 +15,6 @@
 #include <virtio_types.h>
 #include <virtio.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if IS_ENABLED(CONFIG_MTD_NOR_FLASH)
 int is_flash_available(void)
 {
board/engicam/imx8mm/icore_mx8mm.c +0 -2
index 236337546aeea42bf14006dbc32f9ba8ecc4a6b7..bb70e7d4ff802cd26a98df3a6ca8f8ca52853d86 100644
@@ -19,8 +19,6 @@
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if IS_ENABLED(CONFIG_FEC_MXC)
 
 #define FEC_RST_PAD IMX_GPIO_NR(3, 7)
board/engicam/imx8mm/spl.c +0 -2
index d51ae241e85cd5fd0646dba2f2a5a6ab607eab57..5a6bcb1747a012c4aa9c6f7ab9bfa97a4c9603b1 100644
@@ -17,8 +17,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/sections.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
board/engicam/imx8mp/icore_mx8mp.c +0 -3
index bfdc447c4784f7a8e73900a284b83fc9b301e503..864afa92aee0afbd994b35ec01e9f13598a4b572 100644
@@ -14,7 +14,6 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <linux/delay.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm-generic/gpio.h>
 #include <asm/arch/imx8mp_pins.h>
@@ -22,8 +21,6 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/gpio.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
board/engicam/imx8mp/spl.c +0 -3
index cd31aa6041d1397fb5b465d174f0c2c52f5596d3..c1aa28a17bc26797cb387818a885c0a9adf81836 100644
@@ -12,7 +12,6 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
-#include <asm/global_data.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
@@ -24,8 +23,6 @@
 #include <power/pmic.h>
 #include <power/pca9450.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/gdsys/mpc8308/gazerbeam.c +0 -3
index 05e4d84460ae1e163721b80c7b33020129fcab89..123dda21423b1ff7701adc4a718bb83613a8fc03 100644
@@ -17,13 +17,10 @@
 #include <sysinfo.h>
 #include <tpm-v1.h>
 #include <video_osd.h>
-#include <asm/global_data.h>
 
 #include "../common/ihs_mdio.h"
 #include "../../../drivers/sysinfo/gazerbeam.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct ihs_mdio_info ihs_mdio_info[] = {
 	{ .fpga = NULL, .name = "ihs0", .base = 0x58 },
 	{ .fpga = NULL, .name = "ihs1", .base = 0x58 },
board/google/imx8mq_phanbell/imx8mq_phanbell.c +0 -3
index 9544d6dd19a800cfb265a9fc3351962b99fceb2b..2f16f1da26ca2a583ce27df732f791ef60052fdd 100644
@@ -7,7 +7,6 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
@@ -21,8 +20,6 @@
 #include <asm/arch/clock.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
board/highbank/highbank.c +0 -3
index 0ec88447384a7814a081f9978d3603050eb02803..62a7b5b0420ff59e36344b12040d449eac7df22f 100644
@@ -11,7 +11,6 @@
 #include <init.h>
 #include <net.h>
 #include <scsi.h>
-#include <asm/global_data.h>
 
 #include <linux/sizes.h>
 #include <asm/io.h>
@@ -37,8 +36,6 @@
 #define HB_SCU_A9_PWR_DORMANT		2
 #define HB_SCU_A9_PWR_OFF		3
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void cphy_disable_overrides(void);
 
 /*
board/kontron/osm-s-mx8mp/osm-s-mx8mp.c +0 -3
index 3db7176f723714e5717a5024bd669609b6045159..739a78d2c8b43ab5dc1d7e641743c394d511f9a2 100644
@@ -5,7 +5,6 @@
 
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <dm/uclass.h>
@@ -22,8 +21,6 @@
 
 #include "../common/hw-uid.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if IS_ENABLED(CONFIG_KONTRON_HW_UID)
 struct uid_otp_loc uid_otp_locations[] = {
 	{
board/kontron/osm-s-mx93/osm-s-mx93.c +0 -3
index d4645285771c658857199f7a74cee45f1159db1e..b6feef549d163905a9a30120cefa4be4a2c05ef1 100644
@@ -6,7 +6,6 @@
 #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 <asm/mach-imx/boot_mode.h>
 #include <dm/uclass.h>
@@ -23,8 +22,6 @@
 
 #include "../common/hw-uid.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int board_early_init_f(void)
 {
 	return 0;
board/kontron/pitx_imx8m/pitx_imx8m.c +0 -2
index 2ee97169c6f5b125f52efa5d72163430582f3eef..f71fa57b808b6c765949c7042bf4cec18a4b475f 100644
@@ -15,8 +15,6 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
 
board/mntre/imx8mq_reform2/imx8mq_reform2.c +0 -3
index 6ee1c5c52a19a7f724095f831c62e27c20c871f1..bcb31564a73680d1d99b13f7d426108f78e9d66f 100644
@@ -8,7 +8,6 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
@@ -26,8 +25,6 @@
 #include <linux/delay.h>
 #include <power/pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
 
 static iomux_v3_cfg_t const wdog_pads[] = {
board/msc/sm2s_imx8mp/sm2s_imx8mp.c +0 -2
index b1ce014bd55d1bee6f26c0dd53445d57f4511309..b2f763dcc02144c03a7272235193ac0bc25d8983 100644
@@ -18,8 +18,6 @@
 #include <asm-generic/gpio.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
board/msc/sm2s_imx8mp/spl.c +0 -3
index b1b5561838dc55a8569177679d678865a10987db..902179aad29e3981965b470673877641b690e691 100644
@@ -17,7 +17,6 @@
 #include <log.h>
 #include <mmc.h>
 #include <spl.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
@@ -33,8 +32,6 @@
 #include <power/pmic.h>
 #include <power/rn5t567_pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/nxp/imx8mm_evk/spl.c +0 -3
index cd251d274ff68a4e70f0449b4e72f8ec479dace2..5c588046ff4b596bab261e660a93367114f34994 100644
@@ -10,7 +10,6 @@
 #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>
@@ -28,8 +27,6 @@
 #include <power/pmic.h>
 #include <power/pca9450.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
board/nxp/imx8qm_mek/imx8qm_mek.c +0 -3
index 72527f774ca93edc6cd62c9c9e3d265d7dd586e4..56f577714e70dd76c185c1f2021bf7b874866025 100644
@@ -7,7 +7,6 @@
 #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>
@@ -18,8 +17,6 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \
 			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/nxp/imx8qxp_mek/imx8qxp_mek.c +0 -3
index adb9556a021c89b9c37d081c6b6909e32338ee00..4bf6645b893fd1bf5ad35b97166dcaa3d926c4d1 100644
@@ -7,7 +7,6 @@
 #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>
@@ -21,8 +20,6 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define GPIO_PAD_CTRL	((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \
 			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/phytec/imx8mp-libra-fpsc/spl.c +0 -3
index d704d588579ecbc90ddf7a4070a13b3807ff064a..08111641aa6796470d81d991c6ac804e310b24b1 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
@@ -24,8 +23,6 @@
 #include "../common/imx8m_som_detection.h"
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EEPROM_ADDR		0x51
 
 int spl_board_boot_device(enum boot_device boot_dev_spl)
board/phytec/phycore_imx8mm/phycore-imx8mm.c +0 -3
index f6ae0bf03087064ad58bafd3facb587a84d96ef6..9f6a4ec704da89d79d37fa1e669824488353dfe1 100644
@@ -5,14 +5,11 @@
  */
 
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <env.h>
 #include <miiphy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
board/phytec/phycore_imx8mm/spl.c +0 -3
index faff064779c19a3eeace4bf14c74c5278f4087cd..e688793bc7451b4f8f8e37d1c8058b864cc3503e 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mm_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/sections.h>
@@ -19,8 +18,6 @@
 
 #include "../common/imx8m_som_detection.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EEPROM_ADDR		0x51
 #define EEPROM_ADDR_FALLBACK	0x59
 
board/phytec/phycore_imx8mp/phycore-imx8mp.c +0 -3
index b345dc7c9856fd1fb149a1a7d6718a910c57be22..5f0a7ee6a94493b93a9c9419aaf4fb82d251cb40 100644
@@ -5,7 +5,6 @@
  */
 
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <env.h>
@@ -17,8 +16,6 @@
 
 #include "../common/imx8m_som_detection.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EEPROM_ADDR		0x51
 #define EEPROM_ADDR_FALLBACK	0x59
 
board/phytec/phycore_imx8mp/spl.c +0 -3
index cb8e450b995669b0259d9d31055f992be576d30a..fc7aefd0073475298ab3ff58920b38d3883b3e81 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
@@ -23,8 +22,6 @@
 #include "lpddr4_timing.h"
 #include "../common/imx8m_som_detection.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EEPROM_ADDR		0x51
 #define EEPROM_ADDR_FALLBACK	0x59
 
board/phytec/phycore_imx93/phycore-imx93.c +0 -3
index cfc6d91f20f2dad1e9ce517ce0e750f6226ed4f8..cdaedd52c141002b9ebafe4555a3f3877bff4d8c 100644
@@ -7,15 +7,12 @@
  */
 
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <env.h>
 #include <fdt_support.h>
 
 #include "../common/imx93_som_detection.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EEPROM_ADDR            0x50
 
 int board_init(void)
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +0 -3
index c709d01748315a0f45712574f773df274caa2a4f..7f0925074fabfdbe5ac0bf8f58cd93707fd31a12 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <env.h>
@@ -18,8 +17,6 @@
 #include <miiphy.h>
 #include <netdev.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
board/polyhex/imx8mp_debix_model_a/spl.c +0 -3
index 6cbd1815cad5815c556cbec2456bc2997ee64945..c154ad7a1cefdd80682dc850d74803e57890617f 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/sections.h>
 #include <dm/device.h>
@@ -20,8 +19,6 @@
 #include <power/pmic.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/purism/librem5/librem5.c +0 -2
index 5178ee6929d8f7c278c8c9a8beb0541982c4ae0f..a2bc0c08f0b50fe681d717cc236c6f6185623b76 100644
@@ -31,8 +31,6 @@
 #include <usb/xhci.h>
 #include "librem5.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int board_early_init_f(void)
 {
 	return 0;
board/purism/librem5/spl.c +0 -2
index ed57554a2bc314a42c4be7c0e18e78d6c1d45199..568224f973244117672de4f2536a5de72e822702 100644
@@ -29,8 +29,6 @@
 #include <linux/usb/gadget.h>
 #include "librem5.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void spl_dram_init(void)
 {
 	/* ddr init */
board/qualcomm/dragonboard410c/dragonboard410c.c +0 -3
index 4698b9d5e3e47a9b0389d9f6bafab9dd6db56a41..36e4d49046e39a35e8a8fcdf605576366608ff2b 100644
@@ -15,13 +15,10 @@
 #include <net.h>
 #include <usb.h>
 #include <asm/cache.h>
-#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static u32 msm_board_serial(void)
 {
 	struct mmc *mmc_dev;
board/qualcomm/dragonboard820c/dragonboard820c.c +0 -3
index 12a9273ec4b9d240bc2eaed2834d5265290153ec..236022a99f12ff4aef182f6e6fece03e39f0dd84 100644
@@ -10,7 +10,6 @@
 #include <init.h>
 #include <env.h>
 #include <asm/cache.h>
-#include <asm/global_data.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
 #include <dm.h>
@@ -24,8 +23,6 @@
 /* Strength (sdc1) */
 #define SDC1_HDRV_PULL_CTL_REG          (TLMM_BASE_ADDR + 0x0012D000)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void sdhci_power_init(void)
 {
 	const u32 TLMM_PULL_MASK = 0x3;
board/renesas/common/gen3-common.c +0 -3
index f89ae81e95ec551b8b254fd0fee0b9839f798b85..5c543807b64b6cc495703060db22b451baaeb046 100644
@@ -12,15 +12,12 @@
 #include <fdt_support.h>
 #include <hang.h>
 #include <init.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/renesas.h>
 #include <asm-generic/u-boot.h>
 #include <linux/libfdt.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* If the firmware passed a device tree use it for e.g. U-Boot DRAM setup. */
 extern u64 rcar_atf_boot_args[];
 
board/renesas/common/gen4-common.c +0 -3
index 81c6f6f4c6ddbf78f50657bef9a31a4f3e8e6099..ac87f2f08e3a42d7920cb0fcb54eb7dd6b08b14e 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/renesas.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/armv8/mmu.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/processor.h>
@@ -17,8 +16,6 @@
 #include <image.h>
 #include <linux/errno.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void init_generic_timer(void)
 {
 	const u32 freq = CONFIG_SYS_CLK_FREQ;
board/renesas/common/gen5-common.c +0 -3
index 3b724e59049c0b451b6e346a6ecb9846c3226e97..c60a76c50382d1d6cb1ca81b5beabbf03ded3962 100644
@@ -5,7 +5,6 @@
 
 #include <asm/arch/renesas.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/processor.h>
@@ -13,8 +12,6 @@
 #include <asm-generic/u-boot.h>
 #include <linux/errno.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void init_generic_timer(void)
 {
 	const u32 freq = CONFIG_SYS_CLK_FREQ;
board/ronetix/imx8mq-cm/imx8mq_cm.c +0 -2
index 602216854ba475eab72035e3bf1182fda5434a7d..e41cfefe37587dad774a5a432be98cac0be97363 100644
@@ -10,8 +10,6 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
board/samsung/common/exynos5-dt.c +0 -3
index 68edd1ec2826841c74702fd8f16f8e98b7519a18..2ba2d6330fd0c7b8d50fe9d23bc855e372e81b7a 100644
@@ -9,7 +9,6 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <i2c.h>
@@ -36,8 +35,6 @@
 #include <samsung/misc.h>
 #include <tmu.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int exynos_set_regulator(const char *name, uint uv)
 {
 	struct udevice *dev;
board/samsung/common/misc.c +0 -3
index c134a9d70e249328cc774c1dbd0fdfa3d4fdb744..85e564f27ee5c79a0e4d2a36fe2069c2cb06f258 100644
@@ -8,7 +8,6 @@
 #include <command.h>
 #include <env.h>
 #include <libtizen.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 #include <samsung/misc.h>
@@ -37,8 +36,6 @@
 #include <power/pmic.h>
 #include <mmc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CONFIG_SET_DFU_ALT_INFO
 void set_dfu_alt_info(char *interface, char *devstr)
 {
board/st/stm32f429-discovery/stm32f429-discovery.c +0 -3
index 4b0defda1ecb148f283f22ce7ad505386aea4309..333b78c27f348b288eadb39bcf63db541c6b236a 100644
@@ -14,13 +14,10 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	int rv;
board/st/stm32f429-evaluation/stm32f429-evaluation.c +0 -3
index 88c825334a8d06321d51b541388fc7f2d0e8395f..feba46d38e4a53e8b9187f6813e49c4b5ec6c868 100644
@@ -8,13 +8,10 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	int rv;
board/st/stm32f469-discovery/stm32f469-discovery.c +0 -3
index 7aab7f71d0cf91756bf35553f5afc8cba82a4da6..d153efdc2b4b07cf8af8548e8e61a205f9e98ec2 100644
@@ -8,13 +8,10 @@
 #include <env.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 	int rv;
board/st/stm32f746-disco/stm32f746-disco.c +0 -3
index 07bc8a5f0a27eabf8e36396034bc94156c6caca5..4b1e443100d1b0448cba8654fb723e0872f678aa 100644
@@ -15,7 +15,6 @@
 #include <spl.h>
 #include <splash.h>
 #include <video.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 #include <asm/arch/stm32.h>
@@ -23,8 +22,6 @@
 #include <asm/gpio.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int dram_init(void)
 {
 #ifndef CONFIG_XPL_BUILD
board/st/stm32h743-disco/stm32h743-disco.c +0 -3
index d00f55379c5ce9c0f685191e9623ad3c7983fc48..6c5c6710926fa507df0cafcd8cb977b56ad597e1 100644
@@ -7,9 +7,6 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
board/st/stm32h743-eval/stm32h743-eval.c +0 -3
index d00f55379c5ce9c0f685191e9623ad3c7983fc48..6c5c6710926fa507df0cafcd8cb977b56ad597e1 100644
@@ -7,9 +7,6 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
board/st/stm32h747-disco/stm32h747-disco.c +0 -3
index 645685a64f19c66e5e81d29eb319f4869863a509..24a229bf0a29906bb3c2197e36ec6ef2f6e8a85f 100644
@@ -8,9 +8,6 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
board/st/stm32h750-art-pi/stm32h750-art-pi.c +0 -3
index 31c85c6816e98c4567b399f301829c168333b388..244bb5eefb3a3bb2b253e91a03664497d6808b56 100644
@@ -7,9 +7,6 @@
 #include <dm.h>
 #include <init.h>
 #include <log.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
board/technexion/pico-imx8mq/pico-imx8mq.c +0 -3
index 1659db112fa150a24dc35e1bbba7ef852bfd0328..5515fc09f996ff08cfbcbc6b0abe009db2915085 100644
@@ -7,7 +7,6 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <miiphy.h>
 #include <netdev.h>
@@ -24,8 +23,6 @@
 #include <spl.h>
 #include <power/pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
board/ti/am62x/evm.c +0 -2
index 2e8336900d1ca8dee9502868d026b290524ffbcb..49e58ad6d6c88d1e4cd41c3a273be6f7441ab609 100644
@@ -32,8 +32,6 @@
 #define board_is_am62x_lp_skevm()  board_ti_k3_is("AM62-LP-SKEVM")
 #define board_is_am62x_sip_skevm()  board_ti_k3_is("AM62SIP-SKEVM")
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if CONFIG_IS_ENABLED(SPLASH_SCREEN)
 static struct splash_location default_splash_locations[] = {
 	{
board/ti/am64x/evm.c +0 -2
index 25076a8a5886e2161ef6572aab7e84fc58ff1f06..764e3011bac35910081713985c0f4564237f91a1 100644
@@ -27,8 +27,6 @@
 #define board_is_am64x_skevm() (board_ti_k3_is("AM64-SKEVM") || \
 				board_ti_k3_is("AM64B-SKEVM"))
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct efi_fw_image fw_images[] = {
 	{
 		.image_type_id = AM64X_SK_TIBOOT3_IMAGE_GUID,
board/ti/j784s4/evm.c +0 -2
index cabb3017ee142d8bf572c75b24813c9080d982cd..8a4d40a5a95986279ddf61496c1d0cf394eb95e9 100644
@@ -14,8 +14,6 @@
 #include <asm/arch/k3-ddr.h>
 #include "../common/fdt_ops.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct efi_fw_image fw_images[] = {
 	{
 		.image_type_id = AM69_SK_TIBOOT3_IMAGE_GUID,
board/toradex/apalis-imx8/apalis-imx8.c +0 -3
index a8c3820869331632b101c50f9d6a19e9c96dd446..b915673d9e37e3e784af8cac9b024207f8638ad7 100644
@@ -5,7 +5,6 @@
 
 #include <cpu_func.h>
 #include <init.h>
-#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
@@ -24,8 +23,6 @@
 
 #include "../common/tdx-cfg-block.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \
 			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/toradex/apalis_t30/apalis_t30.c +0 -3
index 2c785da41eaa411f00e83723cde4593ee10486d6..8dad41f4122f106c4b54db89685840fca9131543 100644
@@ -11,7 +11,6 @@
 #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>
@@ -23,8 +22,6 @@
 
 #include "pinmux-config-apalis_t30.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PMU_I2C_ADDRESS		0x2D
 #define MAX_I2C_RETRY		3
 
board/toradex/colibri-imx8x/colibri-imx8x.c +0 -3
index 2a71e7b92de425b4759f07b29d833049d38e008b..0a86420700dd054b1e08ccb11b60da2df7cc9e62 100644
@@ -5,7 +5,6 @@
 
 #include <cpu_func.h>
 #include <init.h>
-#include <asm/global_data.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
@@ -21,8 +20,6 @@
 
 #include "../common/tdx-cfg-block.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \
 			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
board/toradex/colibri_t20/colibri_t20.c +0 -3
index 05c3377a60bc0d43de4e49355c46dc1f87010782..ccfe2c4933c5f163c7148ffae05d55f67f9c9cc1 100644
@@ -13,7 +13,6 @@
 #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>
@@ -21,8 +20,6 @@
 #include <linux/delay.h>
 #include "../common/tdx-common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PMU_I2C_ADDRESS		0x34
 #define MAX_I2C_RETRY		3
 #define PMU_SUPPLYENE		0x14
board/toradex/common/tdx-cfg-block.c +0 -3
index 0fc3759695fc1043d566b28082b0a5196173f15e..e53530175aeef26e6afd0525578c1b7078877e1c 100644
@@ -4,7 +4,6 @@
  */
 
 #include <config.h>
-#include <asm/global_data.h>
 #include "tdx-cfg-block.h"
 #include "tdx-eeprom.h"
 
@@ -22,8 +21,6 @@
 #include <nand.h>
 #include <asm/mach-types.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define TAG_VALID	0xcf01
 #define TAG_MAC		0x0000
 #define TAG_CAR_SERIAL	0x0021
board/toradex/smarc-imx8mp/smarc-imx8mp.c +0 -3
index 915b413b15e9aa94bf59df5b9c0c4deb18f0cb10..38fb3d61f5bf08678eb1c58ce158e1178ccf8166 100644
@@ -2,14 +2,11 @@
 /* Copyright (C) 2024 Toradex */
 
 #include <init.h>
-#include <asm/global_data.h>
 #include <asm-generic/gpio.h>
 #include <linux/errno.h>
 
 #include "../common/tdx-cfg-block.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int board_phys_sdram_size(phys_size_t *size)
 {
 	if (!size)
board/toradex/smarc-imx8mp/spl.c +0 -3
index 32233c0e1ab9c4afc0051791ffec863a6bfddcd0..511f62e871b3f030dbc618bdf1ebb91862334f38 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <dm/device.h>
 #include <power/pmic.h>
@@ -16,8 +15,6 @@
 
 #include "lpddr4_timing.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/toradex/verdin-imx8mm/spl.c +0 -3
index 3c2d0ba1dd463236a990eb397ee8bb16b73d878a..10b9991e3bf92c81568f96caca32f61481211b4d 100644
@@ -11,7 +11,6 @@
 #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>
@@ -27,8 +26,6 @@
 #include <power/pmic.h>
 #include <spl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define I2C_PMIC_BUS_ID        1
 
 int spl_board_boot_device(enum boot_device boot_dev_spl)
board/toradex/verdin-imx8mm/verdin-imx8mm.c +0 -3
index b44024158453c48611a872eaacdbe0ba612d4580..b56f5bf30a836b84057c601f79059c48aa758e7b 100644
@@ -7,7 +7,6 @@
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <hang.h>
 #include <i2c.h>
@@ -17,8 +16,6 @@
 
 #include "../common/tdx-cfg-block.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define I2C_PMIC	0
 
 enum pcb_rev_t {
board/toradex/verdin-imx8mp/spl.c +0 -3
index 8628112a78258cdbb935761467522033fe6b7593..b39058b1b5d9223a6abade2a8993cffaddec4b96 100644
@@ -7,7 +7,6 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
-#include <asm/global_data.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
@@ -22,8 +21,6 @@
 #include <power/pca9450.h>
 #include "lpddr4_timing.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	return BOOT_DEVICE_BOOTROM;
board/toradex/verdin-imx8mp/verdin-imx8mp.c +0 -3
index 34ce25512e8b54d30ef57553255b04e5f822c10c..59b4607f065142d22aae963457e85419380eb378 100644
@@ -8,7 +8,6 @@
 #include <asm/arch/imx8mp_pins.h>
 #include <asm/arch/sys_proto.h>
 #include <asm-generic/gpio.h>
-#include <asm/global_data.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <errno.h>
@@ -21,8 +20,6 @@
 
 #include "../common/tdx-cfg-block.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 
 /* Verdin UART_3, Console/Debug UART */
board/xilinx/zynq/bootimg.c +0 -3
index 9eb0735f55d3ca9e5f22ac895aff3b2f856b1b5b..52400672799440260e288d0119b99e1123977d5b 100644
@@ -5,15 +5,12 @@
 
 #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>
 #include <u-boot/md5.h>
 #include <zynq_bootimg.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define ZYNQ_IMAGE_PHDR_OFFSET		0x09C
 #define ZYNQ_IMAGE_FSBL_LEN_OFFSET	0x040
 #define ZYNQ_PART_HDR_CHKSUM_WORD_COUNT	0x0F
boot/bootmeth-uclass.c +0 -2
index a9709465f6e75690cc06510de38bac3eba8f04bf..c841dd0d6d4435751c152175b622314ea7ca3dd5 100644
@@ -19,8 +19,6 @@
 #include <mapmem.h>
 #include <dm/uclass-internal.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize)
 {
 	const struct bootmeth_ops *ops = bootmeth_get_ops(dev);
boot/fdt_simplefb.c +0 -3
index 5822131767d19991a921c8d1eeb5da058a065f76..69c7c2e24c03ce3850bf35a3b49e1512ff363855 100644
@@ -8,14 +8,11 @@
 
 #include <dm.h>
 #include <fdt_support.h>
-#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <video.h>
 #include <spl.h>
 #include <bloblist.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int fdt_simplefb_configure_node(void *blob, int off)
 {
 	int xsize, ysize;
boot/image-sig.c +0 -2
index 6bc74866eaedca3f17e78136ebad2c7c74178928..4eab017bc2db26ecac04f221e6d24b752aa24765 100644
@@ -5,8 +5,6 @@
 
 #include <log.h>
 #include <malloc.h>
-#include <asm/global_data.h>
-DECLARE_GLOBAL_DATA_PTR;
 #include <image.h>
 #include <relocate.h>
 #include <u-boot/ecdsa.h>
boot/image.c +0 -3
index dd96f712b6fbe6ba9f0de8739b37b6868bc14a25..3f7452547636ef5dd99dc9baac6e2cacdbe203a3 100644
@@ -24,12 +24,9 @@
 #include <fdt_support.h>
 #endif
 
-#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Set this if we have less than 4 MB of malloc() space */
 #if CONFIG_SYS_MALLOC_LEN < (4096 * 1024)
 #define CONSERVE_MEMORY		true
cmd/bloblist.c +0 -3
index 333ae558142c9efe9003e7ee89a91384fc4b727e..318a1af0220db92effe96dfc20a0210c5b6aa18b 100644
@@ -8,9 +8,6 @@
 
 #include <bloblist.h>
 #include <command.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static int do_bloblist_info(struct cmd_tbl *cmdtp, int flag, int argc,
 			    char *const argv[])
cmd/bootefi.c +0 -3
index b8f5bb3595044b7130994637e4123f6e3c1272aa..85f41c3b0a06483d1dc414a9fa7e8688ae86ff6f 100644
@@ -17,11 +17,8 @@
 #include <mapmem.h>
 #include <vsprintf.h>
 #include <asm-generic/sections.h>
-#include <asm/global_data.h>
 #include <linux/string.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct efi_device_path *test_image_path;
 static struct efi_device_path *test_device_path;
 
cmd/bootm.c +0 -3
index 2c5aea26d98e518c0306e73390f83549e7fb1ca5..ca7cec91fadc5fec5f8fde68160e64ba55507e9f 100644
@@ -15,14 +15,11 @@
 #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>
 #include <mapmem.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if defined(CONFIG_CMD_IMI)
 static int image_info(unsigned long addr);
 #endif
cmd/date.c +0 -3
index 8614f0227614c2ae602271e2d8235c6403b3b41e..d047872289c316d6f6ef3bc288ec06691f10cd9e 100644
@@ -11,9 +11,6 @@
 #include <dm.h>
 #include <rtc.h>
 #include <i2c.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static const char * const weekdays[] = {
 	"Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur",
cmd/mem.c +0 -3
index 8690fc1e4e6b93d78b48cf4c080c7f52bf2504c8..68eb6989b945b6a3eebd3eba69f74bf79da519bc 100644
@@ -28,15 +28,12 @@
 #include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Create a compile-time value */
 #if MEM_SUPPORT_64BIT_DATA
 #define HELP_Q ", .q"
cmd/sound.c +0 -3
index 8f67cbd96e17a90249b6a36ca898c7076445e19c..7546059022f930d18687964cacf455e3deab1a2d 100644
@@ -8,9 +8,6 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <sound.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 /* Initilaise sound subsystem */
 static int do_init(struct cmd_tbl *cmdtp, int flag, int argc,
cmd/spl.c +0 -3
index f591dc07fb66c4689aadcc27f9f245dbc5a49e7b..ddbbd4a817283ede766e24c46212a7db6b8cf709 100644
@@ -9,11 +9,8 @@
 #include <env.h>
 #include <image.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <linux/libfdt.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const char **subcmd_list[] = {
 
 	[SPL_EXPORT_FDT] = (const char * []) {
common/cli_hush.c +0 -3
index fb087960c9206b1e7fe4454bae53f6bc1cec1bdf..fe8fe93bd5466c7494d4bb08a8b652364644fe9d 100644
@@ -84,7 +84,6 @@
 #include <cli_hush.h>
 #include <command.h>        /* find_cmd */
 #include <vsprintf.h>
-#include <asm/global_data.h>
 #endif
 #ifndef __U_BOOT__
 #include <ctype.h>     /* isalpha, isdigit */
@@ -125,8 +124,6 @@
 #endif
 
 #ifdef __U_BOOT__
-DECLARE_GLOBAL_DATA_PTR;
-
 #define EXIT_SUCCESS 0
 #define EOF -1
 #define syntax() syntax_err()
common/stdio.c +0 -3
index 3eeb289dd8bff201327de4af73f313e9c5128c5d..fc9659442098165981ed7a4bb0cfbae00e7d1a2d 100644
@@ -18,11 +18,8 @@
 #include <serial.h>
 #include <splash.h>
 #include <i2c.h>
-#include <asm/global_data.h>
 #include <dm/device-internal.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static struct stdio_dev devs;
 struct stdio_dev *stdio_devices[] = { NULL, NULL, NULL };
 char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
drivers/block/sandbox.c +0 -3
index 9cb27561a97f450a0c9abf5647bd5c23fad1a50d..4b3de0529ce4ea7890ed436d4f64e061ec86ed48 100644
@@ -10,13 +10,10 @@
 #include <os.h>
 #include <malloc.h>
 #include <sandbox_host.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static unsigned long host_block_read(struct udevice *dev,
 				     lbaint_t start, lbaint_t blkcnt,
 				     void *buffer)
drivers/bootcount/pmic_pfuze100.c +0 -2
index 8c529f5592b43e19a41ed48234cf92f2b797cb68..dd11344322b3c3f3ad282875273d5d436628e29e 100644
@@ -13,8 +13,6 @@
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PFUZE_BC_MAGIC 0xdead
 
 struct bootcount_pmic_priv {
drivers/cache/sandbox_cache.c +0 -3
index 375892fafb02e9e0ea391a53f9bbc6c90cc37994..b27960f1bfa936b172365911a15105b22816e671 100644
@@ -6,9 +6,6 @@
 #include <cache.h>
 #include <dm.h>
 #include <errno.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static int sandbox_get_info(struct udevice *dev, struct cache_info *info)
 {
drivers/clk/altera/clk-agilex.c +0 -3
index fdbf834bb2f6ae85025a2d11f25f8b1de025871d..9d49561512bf1cea549d6a49bbbb7c00526871f6 100644
@@ -6,7 +6,6 @@
 
 #include <log.h>
 #include <wait_bit.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <clk-uclass.h>
@@ -19,8 +18,6 @@
 
 #include <asm/arch/clock_manager.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct socfpga_clk_plat {
 	void __iomem *regs;
 	int pllgrp;
drivers/clk/altera/clk-agilex5.c +0 -3
index fb1e72ffc5cdef4d641982daf2b57f185ec327c8..92b91a9dfc8d8207283b2c5bbbcae77e0f2df30c 100644
@@ -12,7 +12,6 @@
 #include <stdio.h>
 #include <time.h>
 #include <vsprintf.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <dm/lists.h>
@@ -26,8 +25,6 @@
 #include <wait_bit.h>
 #include <clk-uclass.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define CLKMGR_CTRL_SWCTRLBTCLKEN_MASK		BIT(8)
 #define CLKMGR_CTRL_SWCTRLBTCLKSEL_MASK		BIT(9)
 
drivers/clk/altera/clk-mem-n5x.c +0 -3
index b75f52d203b23b600b53ddbdf0fe5d2ef38c01a6..ac59571a8532af966e80a7f31af18c5c7bda9902 100644
@@ -4,7 +4,6 @@
  */
 
 #include <asm/arch/clock_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include "clk-mem-n5x.h"
 #include <clk-uclass.h>
@@ -13,8 +12,6 @@
 #include <dm/util.h>
 #include <dt-bindings/clock/n5x-clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct socfpga_mem_clk_plat {
 	void __iomem *regs;
 };
drivers/clk/altera/clk-n5x.c +0 -3
index 9e4e7a1d90879bf89cb07212b9d3c894bb203fc7..185c9028a78dce18c290274f3d415877629950b3 100644
@@ -4,7 +4,6 @@
  */
 
 #include <asm/arch/clock_manager.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
 #include <dm.h>
@@ -12,8 +11,6 @@
 #include <dm/util.h>
 #include <dt-bindings/clock/n5x-clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct socfpga_clk_plat {
 	void __iomem *regs;
 };
drivers/clk/rockchip/clk_px30.c +0 -3
index b5054e84c3269d40f70d01a6d755264d85f32a3a..d143a6b85ee6a2be57778abdab162f5ca3d4df80 100644
@@ -13,15 +13,12 @@
 #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 <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/px30-cru.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 enum {
 	VCO_MAX_HZ	= 3200U * 1000000,
 	VCO_MIN_HZ	= 800 * 1000000,
drivers/clk/rockchip/clk_rk3308.c +0 -3
index e73bb6790af262c81a2ae11d94d700ec307d8861..97043b8693c03de423b4d724f1db153fcb6c3ff6 100644
@@ -10,7 +10,6 @@
 #include <log.h>
 #include <malloc.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_rk3308.h>
 #include <asm/arch-rockchip/hardware.h>
@@ -19,8 +18,6 @@
 #include <dt-bindings/clock/rk3308-cru.h>
 #include <linux/bitops.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 enum {
 	VCO_MAX_HZ	= 3200U * 1000000,
 	VCO_MIN_HZ	= 800 * 1000000,
drivers/clk/rockchip/clk_rk3528.c +0 -2
index d58557ff56de1b5e69cf0f51aa6ac9ab99bafd5f..bcdc0f930d25e3716673a40b304011b4a9bb6eae 100644
@@ -17,8 +17,6 @@
 #include <dt-bindings/clock/rockchip,rk3528-cru.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define DIV_TO_RATE(input_rate, div)	((input_rate) / ((div) + 1))
 
 /*
drivers/clk/rockchip/clk_rk3568.c +0 -2
index 533031caead6818fe41774c9efee969fdd428dbc..bb49af358e6056d21c873ef739dd2ba8c889e2c1 100644
@@ -16,8 +16,6 @@
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3568-cru.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 struct rk3568_clk_plat {
 	struct dtd_rockchip_rk3568_cru dtd;
drivers/clk/rockchip/clk_rk3576.c +0 -2
index 125b08ee8322e26ae91b3e8ef8c1fc398db2eab8..1026af27ca133e15a93a15445da5998481b742a6 100644
@@ -17,8 +17,6 @@
 #include <dt-bindings/clock/rockchip,rk3576-cru.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define DIV_TO_RATE(input_rate, div)	((input_rate) / ((div) + 1))
 
 static struct rockchip_pll_rate_table rk3576_24m_pll_rates[] = {
drivers/clk/rockchip/clk_rk3588.c +0 -2
index 8c3a113526f902ef25bd0f661b28a021b18744f2..be401a9faeec90b69fcd8c918c7ca1dc0dee29d8 100644
@@ -17,8 +17,6 @@
 #include <dm/lists.h>
 #include <dt-bindings/clock/rockchip,rk3588-cru.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define DIV_TO_RATE(input_rate, div)	((input_rate) / ((div) + 1))
 
 static struct rockchip_pll_rate_table rk3588_pll_rates[] = {
drivers/clk/rockchip/clk_rv1108.c +0 -3
index 75202a66aa68c1a4f820bab29b317ea484f95632..e1b9ccf1236ae6c82f9ce0103e6a228ebd1b511e 100644
@@ -11,7 +11,6 @@
 #include <log.h>
 #include <malloc.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_rv1108.h>
 #include <asm/arch-rockchip/hardware.h>
@@ -21,8 +20,6 @@
 #include <linux/delay.h>
 #include <linux/stringify.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 enum {
 	VCO_MAX_HZ	= 2400U * 1000000,
 	VCO_MIN_HZ	= 600 * 1000000,
drivers/clk/rockchip/clk_rv1126.c +0 -2
index aeeea95691479e8a6a450fb25b27f1b86d9494cb..39920d34b75a338838a2235aa72cb9d3ac302864 100644
@@ -18,8 +18,6 @@
 #include <dm/lists.h>
 #include <dt-bindings/clock/rockchip,rv1126-cru.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define RV1126_CPUCLK_RATE(_rate, _aclk_div, _pclk_div)		\
 {								\
 	.rate	= _rate##U,					\
drivers/cpu/bcm283x_cpu.c +0 -3
index 59a7b142c95210aced2604dae20b020e29acb76c..ad638cd8fff91a6ed5e77cac6a1147eaeca610ee 100644
@@ -11,7 +11,6 @@
 #include <asm/armv8/cpu.h>
 #include <asm/cache.h>
 #include <asm/io.h>
-#include <asm/global_data.h>
 #include <asm/system.h>
 #include <asm-generic/sections.h>
 #include <linux/bitops.h>
@@ -19,8 +18,6 @@
 #include <linux/delay.h>
 #include "armv8_cpu.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct bcm_plat {
 	u64 release_addr;
 };
drivers/cpu/cpu-uclass.c +0 -2
index 2c8e46c05e39259e2d0a3e018f2ca26e3f8e1479..b73768de918647f7aa2749ea6b0def0af5d69bdc 100644
@@ -15,8 +15,6 @@
 #include <linux/err.h>
 #include <relocate.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int cpu_probe_all(void)
 {
 	int ret = uclass_probe_all(UCLASS_CPU);
drivers/cpu/imx8_cpu.c +0 -3
index 5f17122c36c5c87a27f24c66da1858fd6422a1a8..3cd00199548e0a772a8ffe636c1d16f2f4fd7148 100644
@@ -6,7 +6,6 @@
 #include <cpu.h>
 #include <dm.h>
 #include <thermal.h>
-#include <asm/global_data.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <firmware/imx/sci/sci.h>
@@ -18,8 +17,6 @@
 #include <linux/clk-provider.h>
 #include <linux/psci.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define IMX_REV_LEN	4
 struct cpu_imx_plat {
 	const char *name;
drivers/cpu/mtk_cpu.c +0 -3
index 2a08be9b6d181c64e147bfd32f919e0a63289e98..4f4e5480eac56f53a0d80efa0e0b106d9b224da4 100644
@@ -10,12 +10,9 @@
 #include <dm.h>
 #include <regmap.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <linux/err.h>
 #include <linux/io.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct mtk_cpu_plat {
 	struct regmap *hwver;
 };
drivers/firmware/arm-ffa/arm-ffa-uclass.c +0 -3
index 96c64964bb73b05e094f7ab71a5e68c3195f3edf..76a8775e911c8497fd43ca76dbbfcb0dfc865d42 100644
@@ -12,15 +12,12 @@
 #include <malloc.h>
 #include <string.h>
 #include <u-boot/uuid.h>
-#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/devres.h>
 #include <dm/root.h>
 #include <linux/errno.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Error mapping declarations */
 
 int ffa_to_std_errmap[MAX_NUMBER_FFA_ERR] = {
drivers/firmware/arm-ffa/arm-ffa.c +0 -3
index 94e6105cb38ebcadff3d248870a5a0bce5cb9384..9e6b5dcc542fd54abe58180887d7888a1c429f4a 100644
@@ -10,12 +10,9 @@
 #include <arm_ffa_priv.h>
 #include <dm.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * invoke_ffa_fn() - SMC wrapper
  * @args: FF-A ABI arguments to be copied to Xn registers
drivers/firmware/arm-ffa/ffa-emul-uclass.c +0 -3
index 1521d9b66ac3e97cc25975c10b305105760e8d3e..6198d6873541c16d02c079a47579236cec68c5fa 100644
@@ -8,7 +8,6 @@
 #include <dm.h>
 #include <mapmem.h>
 #include <string.h>
-#include <asm/global_data.h>
 #include <asm/sandbox_arm_ffa.h>
 #include <asm/sandbox_arm_ffa_priv.h>
 #include <dm/device-internal.h>
@@ -17,8 +16,6 @@
 #include <linux/errno.h>
 #include <linux/sizes.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* The partitions (SPs) table */
 static struct ffa_partition_desc sandbox_partitions[SANDBOX_PARTITIONS_CNT] = {
 	{
drivers/firmware/arm-ffa/sandbox_ffa.c +0 -3
index 44b32a829ddfe9a94084c05b0135a1ffe8a343e8..f1e8de4bf0df04c2e76e03fba13339e152fd4975 100644
@@ -8,13 +8,10 @@
 #include <arm_ffa.h>
 #include <dm.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/sandbox_arm_ffa_priv.h>
 #include <dm/device-internal.h>
 #include <linux/errno.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * sandbox_ffa_discover() - perform sandbox FF-A discovery
  * @dev: The sandbox FF-A bus device
drivers/gpio/gpio-uclass.c +0 -3
index 38151ef1bee7d5ef0c4b26fcafb98a7260611abb..7651d5360d688ec1a7962ca651120ca299ce3478 100644
@@ -18,15 +18,12 @@
 #include <fdtdec.h>
 #include <malloc.h>
 #include <acpi/acpi_device.h>
-#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
 #include <linux/bug.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define GPIO_ALLOC_BITS	32
 
 /**
drivers/gpio/nx_gpio.c +0 -3
index 741b2ff7f177919efd1ce34ea13c2993aa2890d2..5abbb34daea7e5db0c4aabe54a4e1b56c58087b9 100644
@@ -7,12 +7,9 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct nx_gpio_regs {
 	u32	data;		/* Data register */
 	u32	outputenb;	/* Output Enable register */
drivers/i2c/mxc_i2c.c +0 -3
index 2dfc1c4eab5d83e617407f49a8c783ef61778b3a..268bb39f009fbd2dc06159807cc8e9dac531ea4c 100644
@@ -18,7 +18,6 @@
 #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>
@@ -30,8 +29,6 @@
 #include <dm.h>
 #include <dm/pinctrl.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define I2C_QUIRK_FLAG		(1 << 0)
 
 #define IMX_I2C_REGSHIFT	2
drivers/i2c/nx_i2c.c +0 -3
index 8562dd82bd630f7872f5f3f22f34f1f65e567ded..706b7adefe8ac1b28e2afb6f8fe1c1a9b2276c94 100644
@@ -7,7 +7,6 @@
 #include <asm/arch/reset.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/nx_gpio.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #define I2C_WRITE       0
@@ -45,8 +44,6 @@
 
 #define DEFAULT_SPEED   100000  /* default I2C speed [Hz] */
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct nx_i2c_regs {
 	uint     iiccon;
 	uint     iicstat;
drivers/i2c/ocores_i2c.c +0 -3
index cf714d22ee4634a4b19c905cec9443f2da6c8a38..32704ee885454d695dcb6ede129fd8934c1d19b9 100644
@@ -12,7 +12,6 @@
  * Andreas Larsson <[email protected]>
  */
 
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
@@ -75,8 +74,6 @@ struct ocores_i2c_bus {
 	u8 (*getreg)(struct ocores_i2c_bus *i2c, int reg);
 };
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Boolean attribute values */
 enum {
 	FALSE = 0,
drivers/i2c/soft_i2c.c +0 -3
index 79f7a3205022afebfe736c1995af4386371d99a4..4102375e5b7390b5cfc96d46d3920880f6c0f797 100644
@@ -25,7 +25,6 @@
 #endif
 #endif
 #include <i2c.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_SOFT_I2C_GPIO_SCL)
@@ -82,8 +81,6 @@
 
 /* #define	DEBUG_I2C	*/
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifndef	I2C_SOFT_DECLARATIONS
 #  define I2C_SOFT_DECLARATIONS
 #endif
drivers/i2c/synquacer_i2c.c +0 -2
index 6672d9435e330cbf32b23677f94815185be6b92d..6e5722327c5f749ad2203629e2e362977db61414 100644
@@ -112,8 +112,6 @@
 #define SPEED_FM		400	// Fast Mode
 #define SPEED_SM		100	// Standard Mode
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct synquacer_i2c {
 	void __iomem *base;
 	unsigned long pclkrate;
drivers/mailbox/imx-mailbox.c +0 -2
index b1e0465e7a8bfa204664e487825f4221784a760c..c7eaa3de96f4a4b96b11fd331323e4f2c2a45e27 100644
@@ -15,8 +15,6 @@
 /* This driver only exposes the status bits to keep with the
  * polling methodology of u-boot.
  */
-DECLARE_GLOBAL_DATA_PTR;
-
 #define IMX_MU_CHANS		24
 
 #define IMX_MU_V2_PAR_OFF	0x4
drivers/misc/atsha204a-i2c.c +0 -3
index 3b9046da880c106859978d36a5a10a1e6ce2259b..aa3094fcc016a53eaf7c54b87c61fb1e7d7c12aa 100644
@@ -15,7 +15,6 @@
 #include <errno.h>
 #include <atsha204a-i2c.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/bitrev.h>
 #include <u-boot/crc.h>
@@ -25,8 +24,6 @@
 #define ATSHA204A_TRANSACTION_RETRY	5
 #define ATSHA204A_EXECTIME		5000
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static inline u16 atsha204a_crc16(const u8 *buffer, size_t len)
 {
 	return bitrev16(crc16(0, buffer, len));
drivers/misc/fs_loader.c +0 -3
index 2928cf75f89e7b7829a2dd0595499900850334cc..6af4c7f15e7b910b03922131ddb0db0d21be6590 100644
@@ -13,7 +13,6 @@
 #include <fs.h>
 #include <fs_loader.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
 #include <linux/string.h>
@@ -25,8 +24,6 @@
 #include <ubi_uboot.h>
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * struct firmware - A place for storing firmware and its attribute data.
  *
drivers/misc/imx8/fuse.c +0 -3
index 90d251a440589ca07e545ae1303121a74f888188..872713e30b6c15fee6f79f9e4b86a4ee81237bd5 100644
@@ -8,11 +8,8 @@
 #include <fuse.h>
 #include <firmware/imx/sci/sci.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/global_data.h>
 #include <linux/arm-smccc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define FSL_ECC_WORD_START_1	 0x10
 #define FSL_ECC_WORD_END_1	 0x10F
 
drivers/mmc/ca_dw_mmc.c +0 -3
index 1af5ec0532ea0933981e2663d97e6474eadccbba..d5a4453a62e0a79b1bf0964359defbaf4c19f546 100644
@@ -6,7 +6,6 @@
 
 #include <dwmmc.h>
 #include <fdtdec.h>
-#include <asm/global_data.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <errno.h>
@@ -26,8 +25,6 @@
 
 #define MIN_FREQ (400000)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct ca_mmc_plat {
 	struct mmc_config cfg;
 	struct mmc mmc;
drivers/mmc/f_sdh30.c +0 -2
index f47cf8485216e60bb5d9ff2b2becca0749116c94..f0356e1e9609bb5fcfcf3cf9e0c4974988fde260 100644
@@ -29,8 +29,6 @@ struct f_sdh30_plat {
 	const struct f_sdh30_data *data;
 };
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void f_sdh30_e51_init(struct udevice *dev)
 {
 	struct f_sdh30_plat *plat = dev_get_plat(dev);
drivers/mmc/jz_mmc.c +0 -3
index fc10bb256a4df53107d54fe89f060e8f37dd72f1..651d98683055329f17428a7b3d4ae685982a2861 100644
@@ -8,7 +8,6 @@
 
 #include <malloc.h>
 #include <mmc.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
 #include <errno.h>
@@ -419,8 +418,6 @@ int jz_mmc_init(void __iomem *base)
 #else /* CONFIG_DM_MMC */
 
 #include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
 static int jz_mmc_dm_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
 			      struct mmc_data *data)
 {
drivers/mmc/msm_sdhci.c +0 -3
index 38dc36a21940efc070028deade3e3eebaf862222..66f3cf2de4f0d71aa34df03447ee37e1ced043d3 100644
@@ -13,7 +13,6 @@
 #include <reset.h>
 #include <sdhci.h>
 #include <wait_bit.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <power/regulator.h>
@@ -61,8 +60,6 @@ struct msm_sdhc_variant_info {
 	u32 core_vendor_spec_capabilities0;
 };
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int msm_sdc_clk_init(struct udevice *dev)
 {
 	struct msm_sdhc *prv = dev_get_priv(dev);
drivers/mmc/mv_sdhci.c +0 -3
index 2da5334c21f13c1ad93b4154c6dd4c637868cbf0..a8b63a203870caffcd60a42f411c511f6690841e 100644
@@ -6,7 +6,6 @@
 #include <dm.h>
 #include <malloc.h>
 #include <sdhci.h>
-#include <asm/global_data.h>
 #include <linux/mbus.h>
 
 #define MVSDH_NAME "mv_sdh"
@@ -14,8 +13,6 @@
 #define SDHCI_WINDOW_CTRL(win)		(0x4080 + ((win) << 4))
 #define SDHCI_WINDOW_BASE(win)		(0x4084 + ((win) << 4))
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct mv_sdhci_plat {
 	struct mmc_config cfg;
 	struct mmc mmc;
drivers/mtd/nand/raw/pxa3xx_nand.c +0 -3
index 7bf54fa46540b95df9c53843046d9fbc7bb8b2b2..7324dc72e0a61023c30068ab5a5c0ce1c2fd4a30 100644
@@ -9,7 +9,6 @@
 #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>
@@ -30,8 +29,6 @@
 
 #include "pxa3xx_nand.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define TIMEOUT_DRAIN_FIFO	5	/* in ms */
 #define	CHIP_DELAY_TIMEOUT	200
 #define NAND_STOP_DELAY		40
drivers/mtd/nand/raw/tegra_nand.c +0 -3
index ef43dcad079b23db418ee305ad90aecc1be89881..0bee7eace908806da450fcf9c8d88419036f0be4 100644
@@ -7,7 +7,6 @@
  */
 
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
@@ -26,8 +25,6 @@
 #include <linux/printk.h>
 #include "tegra_nand.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define NAND_CMD_TIMEOUT_MS		10
 
 #define SKIPPED_SPARE_BYTES		4
drivers/mtd/nvmxip/nvmxip_qspi.c +0 -3
index 1a109bee557a58d65b08a7bf108442029c0ffd42..383971bea6659072982e28bea108a95402e4952a 100644
@@ -11,9 +11,6 @@
 #include <nvmxip.h>
 #include <linux/errno.h>
 
-#include <asm/global_data.h>
-DECLARE_GLOBAL_DATA_PTR;
-
 #define NVMXIP_QSPI_DRV_NAME "nvmxip_qspi"
 
 /**
drivers/mtd/spi/sf-uclass.c +0 -3
index 102a92368267b28a6602aa7edb025794ed212aad..a9db5296b2da1a32bc3eda58692841dddbab603a 100644
@@ -11,13 +11,10 @@
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
-#include <asm/global_data.h>
 #include <dm/device-internal.h>
 #include <test/test.h>
 #include "sf_internal.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int spi_flash_read_dm(struct udevice *dev, u32 offset, size_t len, void *buf)
 {
 	return log_ret(sf_get_ops(dev)->read(dev, offset, len, buf));
drivers/net/dwmac_s700.c +0 -3
index 969d247b4f3ae2e8b3e683f281208db44aee259f..76daab961c017da86cf50635c5f9cc163e5b54a3 100644
@@ -5,7 +5,6 @@
  * Actions DWMAC specific glue layer
  */
 
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <clk.h>
@@ -24,8 +23,6 @@
 #define RMII_REF_CLK_MFP_CTL0		(0x0 << 6)
 #define CLKO_25M_EN_MFP_CTL3		BIT(30)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void dwmac_board_setup(void)
 {
 	clrbits_le32(MFP_CTL0, (RMII_TXD01_MFP_CTL0 | RMII_RXD01_MFP_CTL0 |
drivers/net/fec_mxc.c +0 -3
index 1c51e936b5be96f8ef4a9d76c39d797287edf384..3d32bad083183ea467ad73d69d7c3c6da64b7215 100644
@@ -18,7 +18,6 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 
@@ -36,8 +35,6 @@
 #include "fec_mxc.h"
 #include <eth_phy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * Timeout the transfer after 5 mS. This is usually a bit more, since
  * the code in the tightloops this timeout is used in adds some overhead.
drivers/net/gmac_rockchip.c +0 -2
index c8cfe7448d4daa7e793b3fba8380de6545dd55d0..2b6080dd9ee014ee432ff6596d5a82fbd96a72a0 100644
@@ -11,7 +11,6 @@
 #include <net.h>
 #include <phy.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/arch-rockchip/periph.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/hardware.h>
@@ -28,7 +27,6 @@
 #include <linux/bitops.h>
 #include "designware.h"
 
-DECLARE_GLOBAL_DATA_PTR;
 #define DELAY_ENABLE(soc, tx, rx) \
 	(((tx) ? soc##_TXCLK_DLY_ENA_GMAC_ENABLE : soc##_TXCLK_DLY_ENA_GMAC_DISABLE) | \
 	((rx) ? soc##_RXCLK_DLY_ENA_GMAC_ENABLE : soc##_RXCLK_DLY_ENA_GMAC_DISABLE))
drivers/net/mvneta.c +0 -3
index 1640868c24af0628306ed570d4d8f413fdb064ba..baa18202d6e23097de6e08394fb586929637b800 100644
@@ -20,7 +20,6 @@
 #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>
@@ -37,8 +36,6 @@
 #include <linux/mbus.h>
 #include <asm-generic/gpio.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define MVNETA_NR_CPUS		1
 #define ETH_HLEN		14	/* Total octets in header */
 
drivers/net/octeontx/smi.c +0 -3
index 217bcac2ce290cf4ec72a3ace1dda77b22fefcf4..5a822b64427be716bcb23e2fa08a99784015622f 100644
@@ -10,15 +10,12 @@
 #include <pci.h>
 #include <pci_ids.h>
 #include <phy.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 
 #define PCI_DEVICE_ID_OCTEONTX_SMI 0xA02B
 
-DECLARE_GLOBAL_DATA_PTR;
-
 enum octeontx_smi_mode {
 	CLAUSE22 = 0,
 	CLAUSE45 = 1,
drivers/net/phy/fixed.c +0 -3
index 11d3616497697b7003bba4b2e3006d6d1b6d6d15..4ab709a14d5f4d1f59bd600edd5a20f0f9032690 100644
@@ -10,9 +10,6 @@
 #include <phy.h>
 #include <dm.h>
 #include <fdt_support.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static int fixedphy_probe(struct phy_device *phydev)
 {
drivers/net/phy/phy.c +0 -3
index b58283fe3d5f2f8c6dd22283677d68e2fa5cb1e5..d7e0c4fe02dd8b45d7a99bc7bf3eba7a64ca8c49 100644
@@ -17,7 +17,6 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
 #include <dm/of_extra.h>
@@ -26,8 +25,6 @@
 #include <linux/err.h>
 #include <linux/compiler.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Generic PHY support and helper functions */
 
 /**
drivers/net/phy/xilinx_gmii2rgmii.c +0 -3
index e44b7b75bd585c13364dd2f6f6495dc941b855e7..f5a7dd349c91dc5fa858cd913a57ddd3c249d719 100644
@@ -8,9 +8,6 @@
 #include <dm.h>
 #include <log.h>
 #include <phy.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 #define ZYNQ_GMII2RGMII_REG		0x10
 #define ZYNQ_GMII2RGMII_SPEED_MASK	(BMCR_SPEED1000 | BMCR_SPEED100)
drivers/net/sandbox-raw.c +0 -3
index 1d716716778cbf372e89fad71ec7b62ad5ebbbf2..c3d40f0b59ed7e2e9eb7bbbdda385a744e2d77c7 100644
@@ -12,9 +12,6 @@
 #include <env.h>
 #include <malloc.h>
 #include <net.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static int reply_arp;
 static struct in_addr arp_ip;
drivers/net/sandbox.c +0 -3
index 2011fd31f41aa8b5a7c2ba7f08fb56acf8fcee50..0ea50c484c05967aac335a9d321da68dd67328bf 100644
@@ -10,7 +10,6 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/eth.h>
-#include <asm/global_data.h>
 #include <asm/test.h>
 #include <asm/types.h>
 
@@ -84,8 +83,6 @@ struct icmphdr {
 #define ICMP_ECHO_REPLY		0
 #define IPPROTO_ICMP		1
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const u8 null_ethaddr[6];
 static bool skip_timeout;
 
drivers/net/ti/keystone_net.c +0 -3
index d4abc9a041102c584bdcec57280112e9c4acf079..40c98e72e4d3e4a5d77afd73d177d82a24e89dc2 100644
@@ -7,7 +7,6 @@
  */
 #include <command.h>
 #include <console.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 
@@ -26,8 +25,6 @@
 
 #include "cpsw_mdio.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef KEYSTONE2_EMAC_GIG_ENABLE
 #define emac_gigabit_enable(x)	keystone2_eth_gigabit_enable(x)
 #else
drivers/net/xilinx_axi_emac.c +0 -3
index fb48feb4469a06356ddfd9da188fb639f538edfe..e9cc5db52d25c60739bbfc73335a556a3093953e 100644
@@ -15,7 +15,6 @@
 #include <log.h>
 #include <net.h>
 #include <malloc.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <phy.h>
 #include <miiphy.h>
@@ -23,8 +22,6 @@
 #include <linux/delay.h>
 #include <eth_phy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Link setup */
 #define XAE_EMMC_LINKSPEED_MASK	0xC0000000 /* Link speed */
 #define XAE_EMMC_LINKSPD_10	0x00000000 /* Link Speed mask for 10 Mbit */
drivers/pci/pci_octeontx.c +0 -3
index 875cf7f7115d5a1a3ae5cd1a292e7fff518091bb..6752112a878284746384d1c82b846ec1a29101f5 100644
@@ -11,14 +11,11 @@
 #include <log.h>
 #include <malloc.h>
 #include <pci.h>
-#include <asm/global_data.h>
 
 #include <asm/io.h>
 
 #include <linux/ioport.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * This driver supports multiple types of operations / host bridges / busses:
  *
drivers/pci/pcie_dw_meson.c +0 -3
index 483b07ce078d751f6d33e22e4a633c915e4cf929..1eff6d1b0edcef3da058a97dfa9248b97114ae3a 100644
@@ -16,7 +16,6 @@
 #include <power-domain.h>
 #include <reset.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
@@ -27,8 +26,6 @@
 
 #include "pcie_dw_common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * struct meson_pcie - Amlogic Meson DW PCIe controller state
  *
drivers/pci/pcie_dw_qcom.c +0 -3
index 978754e847231f13f740f8e48f645dba44c0a7b0..10c45aaba2068c2666a6a13f8908170a15d2fa6d 100644
@@ -10,7 +10,6 @@
 #include <syscon.h>
 #include <malloc.h>
 #include <power/regulator.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
@@ -21,8 +20,6 @@
 
 #include "pcie_dw_common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct qcom_pcie;
 
 struct qcom_pcie_ops {
drivers/pci/pcie_dw_rockchip.c +0 -3
index 208aa30463af6a73f1dffaa89bf1c28273d548eb..61117fa95e6fba20f36bf812fa8a5e6ca1e6ef5e 100644
@@ -13,7 +13,6 @@
 #include <reset.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
@@ -24,8 +23,6 @@
 
 #include "pcie_dw_common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * struct rk_pcie - RK DW PCIe controller state
  *
drivers/pci/pcie_dw_ti.c +0 -3
index dc6e65273b798c5be03f8b2878df8fcb8a8e38c1..37c295fdd385c95d9a0d3e553197d2ce5f2519bf 100644
@@ -10,7 +10,6 @@
 #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>
@@ -20,8 +19,6 @@
 
 #include "pcie_dw_common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PCIE_VENDORID_MASK	GENMASK(15, 0)
 #define PCIE_DEVICEID_SHIFT	16
 
drivers/pci/pcie_layerscape.c +0 -3
index 1be33095b9cee07e563f841ecafa8c1b5ef0bfe5..db7c4f47916a41acced471d731b551d8fa895f5b 100644
@@ -6,7 +6,6 @@
  */
 
 #include <log.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <malloc.h>
@@ -16,8 +15,6 @@
 #endif
 #include "pcie_layerscape.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 LIST_HEAD(ls_pcie_list);
 
 unsigned int dbi_readl(struct ls_pcie *pcie, unsigned int offset)
drivers/pci/pcie_starfive_jh7110.c +0 -3
index 0908ae16b67335e2c81762f48219a43941713ec5..761e64be58a590c4ec6433c1b44db19ae7fa7bd3 100644
@@ -15,7 +15,6 @@
 #include <regmap.h>
 #include <reset.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
@@ -39,8 +38,6 @@
 #define STG_SYSCON_RP_NEP_OFFSET               0xe8
 #define STG_SYSCON_K_RP_NEP_MASK               BIT(8)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct starfive_pcie {
 	struct pcie_plda plda;
 	struct clk_bulk	clks;
drivers/pci_endpoint/pci_ep-uclass.c +0 -3
index 902d1a51eaa3e819883e0c63f001cfb5a1399a56..b71defe4019f6c234f37070aeb7af5e1b5ffec8d 100644
@@ -13,12 +13,9 @@
 
 #include <dm.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <linux/log2.h>
 #include <pci_ep.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int pci_ep_write_header(struct udevice *dev, uint fn, struct pci_ep_header *hdr)
 {
 	struct pci_ep_ops *ops = pci_ep_get_ops(dev);
drivers/phy/marvell/comphy_core.c +0 -3
index a4121423873ba457fde69744af20e951329c16f9..b074d58f9f6a4017b5e7ce4b692ac73342f2cad6 100644
@@ -7,7 +7,6 @@
 
 #include <dm.h>
 #include <fdtdec.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
@@ -18,8 +17,6 @@
 
 #define COMPHY_MAX_CHIP 4
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const char *get_speed_string(u32 speed)
 {
 	static const char * const speed_strings[] = {
drivers/phy/omap-usb2-phy.c +0 -3
index 2be0178882a417e7ce1587849179952e41323fd8..6df4ff4eb056b06a4bfbdd135cbdf231eb29b4ec 100644
@@ -6,7 +6,6 @@
  * Written by Jean-Jacques Hiblot <[email protected]>
  */
 
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
@@ -39,8 +38,6 @@
 #define USB2PHY_USE_CHG_DET_REG		BIT(29)
 #define USB2PHY_DIS_CHG_DET		BIT(28)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct omap_usb2_phy {
 	struct regmap *pwr_regmap;
 	ulong flags;
drivers/phy/rockchip/phy-rockchip-pcie.c +0 -3
index 660037034ec0368f991ab01e8015fb812eb696f6..5775101c4cb56fa57a331089d593b23b948af6ae 100644
@@ -9,7 +9,6 @@
 
 #include <clk.h>
 #include <dm.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <generic-phy.h>
 #include <reset.h>
@@ -19,8 +18,6 @@
 #include <linux/iopoll.h>
 #include <asm/arch-rockchip/clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * The higher 16-bit of this register is used for write protection
  * only if BIT(x + 16) set to 1 the BIT(x) can be written.
drivers/phy/rockchip/phy-rockchip-typec.c +0 -3
index 66d1d32d25cbb74df1df26ea6ce3fb9638e13910..305d5b0dd48ddc05a8fde6090296b62b05bf74b3 100644
@@ -10,7 +10,6 @@
 
 #include <clk.h>
 #include <dm.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <generic-phy.h>
@@ -21,8 +20,6 @@
 #include <linux/iopoll.h>
 #include <asm/arch-rockchip/clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define usleep_range(a, b) udelay((b))
 
 #define CMN_SSM_BANDGAP			(0x21 << 2)
drivers/pinctrl/mtmips/pinctrl-mt7628.c +0 -3
index dc7acec4a77f6a767f339b4672e49ecb44de0ef1..be3a28eb94d0fc9e0d7fc98e50673dad937d2935 100644
@@ -6,15 +6,12 @@
  */
 
 #include <dm.h>
-#include <asm/global_data.h>
 #include <dm/pinctrl.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 
 #include "pinctrl-mtmips-common.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define AGPIO_OFS			0
 #define GPIOMODE1_OFS			0x24
 #define GPIOMODE2_OFS			0x28
drivers/pinctrl/nexell/pinctrl-nexell.c +0 -3
index d5be7baf50ddc06b5817870d593699af238fd19e..af1acd91649fbe886be059ba8a2371d65900a83b 100644
@@ -7,13 +7,10 @@
 
 #include <dm.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include "pinctrl-nexell.h"
 #include "pinctrl-s5pxx18.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* given a pin-name, return the address of pin config registers */
 unsigned long pin_to_bank_base(struct udevice *dev, const char *pin_name,
 			       u32 *pin)
drivers/pinctrl/nexell/pinctrl-s5pxx18.c +0 -3
index a6ae5764fbc1c31e258622ef15ed08aeefeaf90f..aeed3f1e1e1e2d21274b6f985ad3feacf580d66d 100644
@@ -9,15 +9,12 @@
 
 #include <dm.h>
 #include <errno.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include "pinctrl-nexell.h"
 #include "pinctrl-s5pxx18.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void nx_gpio_set_bit(u32 *value, u32 bit, int enable)
 {
 	register u32 newvalue;
drivers/pinctrl/nxp/pinctrl-imx-mmio.c +0 -3
index 2f4228a9fc5f960da4b461d01ac49ddbeec0b92d..7cdbbbba747ba29c41897fa1cf9e27450be11ce1 100644
@@ -5,7 +5,6 @@
 
 #include <malloc.h>
 #include <mapmem.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
@@ -16,8 +15,6 @@
 
 #include "pinctrl-imx.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int imx_pinctrl_set_state_mmio(struct udevice *dev, struct udevice *config)
 {
 	struct imx_pinctrl_priv *priv = dev_get_priv(dev);
drivers/pinctrl/nxp/pinctrl-imx.c +0 -3
index 7d91ccfb26f1c7764deb59aa75663b4e5ed56393..d801176858190f3d41b3fdd2c3dd4dfc388daaa0 100644
@@ -5,7 +5,6 @@
 
 #include <malloc.h>
 #include <mapmem.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
@@ -16,8 +15,6 @@
 
 #include "pinctrl-imx.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int imx_pinctrl_set_state_common(struct udevice *dev, struct udevice *config,
 				 int pin_size, u32 **pin_data, int *npins)
 {
drivers/pinctrl/nxp/pinctrl-imx8.c +0 -3
index 9b3b5aec07adce51e6220db6edb822f460fbc39c..23865ee6428c36952f21e8d8c4f26017797985d4 100644
@@ -9,14 +9,11 @@
 #include <asm/io.h>
 #include <firmware/imx/sci/sci.h>
 #include <misc.h>
-#include <asm/global_data.h>
 #include <dm/device.h>
 #include <dm/pinctrl.h>
 
 #include "pinctrl-imx.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define PADRING_IFMUX_EN_SHIFT		31
 #define PADRING_IFMUX_EN_MASK		BIT(31)
 #define PADRING_GP_EN_SHIFT		30
drivers/pinctrl/nxp/pinctrl-mxs.c +0 -3
index 85ab5fdf6404c97364370f7d8b74dbe1e44be2eb..8b7647380143d7265330438c96920a2ad0d4d6c1 100644
@@ -5,7 +5,6 @@
  */
 
 #include <log.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/io.h>
@@ -15,8 +14,6 @@
 #include <dm/read.h>
 #include "pinctrl-mxs.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct mxs_pinctrl_priv {
 	void __iomem *base;
 	const struct mxs_regs *regs;
drivers/power/domain/imx8m-power-domain.c +0 -3
index a7e64971a2abc211e275094bacdc705a2be625e8..1c731b897cc4c99c30d8aeee95a597e93601c227 100644
@@ -7,7 +7,6 @@
 #include <dm.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/mach-imx/sys_proto.h>
 #include <dm/device-internal.h>
@@ -22,8 +21,6 @@
 #include <dt-bindings/power/imx8mp-power.h>
 #include <dt-bindings/power/imx8mq-power.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define GPC_PGC_CPU_MAPPING			0x0ec
 #define IMX8MP_GPC_PGC_CPU_MAPPING		0x1cc
 
drivers/power/pmic/bd71837.c +0 -3
index a5df2570fc3e6a2dcaa4f1277c1a4fd341d66f63..136427947653b88d2e7d0961d78594c3b65f2246 100644
@@ -7,14 +7,11 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <linux/printk.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/bd71837.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const struct pmic_child_info pmic_children_info[] = {
 	/* buck */
 	{ .prefix = "b", .driver = BD718XX_REGULATOR_DRIVER},
drivers/power/pmic/mc34708.c +0 -3
index 43badb5767a589c74e70529da159406905b6f66d..0ec52e25a9e8813e0cf5c9f3dbd39d75feaa3b8a 100644
@@ -9,11 +9,8 @@
 #include <errno.h>
 #include <fsl_pmic.h>
 #include <i2c.h>
-#include <asm/global_data.h>
 #include <power/pmic.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int mc34708_reg_count(struct udevice *dev)
 {
 	return PMIC_NUM_OF_REGS;
drivers/power/pmic/mp5416.c +0 -3
index 9d44f0ae655e843682d1286c9a795f402519fbcf..899c2beeb37c87c34ed06bd9589f08d2cb604c29 100644
@@ -9,9 +9,6 @@
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/mp5416.h>
-#include <asm/global_data.h>
-
-DECLARE_GLOBAL_DATA_PTR;
 
 static const struct pmic_child_info pmic_children_info[] = {
 	/* buck */
drivers/power/pmic/pca9450.c +0 -3
index e5c1f037b613400e2b0f465983bbaa70471d97b1..c95e6357ee84b1039eef9bf00854d4b7954b62a9 100644
@@ -10,7 +10,6 @@
 #include <dm/lists.h>
 #include <i2c.h>
 #include <log.h>
-#include <asm/global_data.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 #include <power/pmic.h>
@@ -18,8 +17,6 @@
 #include <power/pca9450.h>
 #include <sysreset.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static const struct pmic_child_info pmic_children_info[] = {
 	/* buck */
 	{ .prefix = "b", .driver = PCA9450_REGULATOR_DRIVER},
drivers/power/regulator/pwm_regulator.c +0 -3
index ff738faadc52d0e7847d3e3f8b6e9167b25d82a8..adde5156c7647064bd366bd4b75bf6d6378e9830 100644
@@ -11,12 +11,9 @@
 #include <errno.h>
 #include <log.h>
 #include <pwm.h>
-#include <asm/global_data.h>
 #include <dm/device_compat.h>
 #include <power/regulator.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct pwm_regulator_info {
 	/* pwm id corresponding to the PWM driver */
 	int pwm_id;
drivers/pwm/pwm-sifive.c +0 -3
index e9777c71f5e0b845bbaebdaf71185b5509059cf9..dea7bc574952c43055039d6a5aefdab54f17db2a 100644
@@ -17,7 +17,6 @@
 #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>
@@ -40,8 +39,6 @@
 #define PWM_SIFIVE_CHANNEL_ENABLE_VAL   0
 #define PWM_SIFIVE_CHANNEL_DISABLE_VAL  0xffff
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct pwm_sifive_regs {
 	unsigned long cfg;
 	unsigned long cnt;
drivers/pwm/rk_pwm.c +0 -3
index 0a64eb01dc2bad5e1e7a9a4a65f929270564f764..b51dee31a9873b3d4769aca3034927d2f2d79162 100644
@@ -11,14 +11,11 @@
 #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>
 #include <power/regulator.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct rockchip_pwm_data {
 	struct rockchip_pwm_regs regs;
 	unsigned int prescaler;
drivers/pwm/sunxi_pwm.c +0 -3
index 2140a05b6796bbcf1c99b5a5024103aa1102a48c..1dd2428da771999445c123f4730f4142a41019cd 100644
@@ -9,13 +9,10 @@
 #include <pwm.h>
 #include <regmap.h>
 #include <syscon.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
 #include <power/regulator.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define OSC_24MHZ 24000000
 
 struct sunxi_pwm_priv {
drivers/ram/stm32mp1/stm32mp1_tests.c +0 -3
index 6108faa70730cea425568a331503c38fe7baad40..3b41d6045ada32d471d8d5933961f7938ba8afd4 100644
@@ -10,7 +10,6 @@
 #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"
@@ -19,8 +18,6 @@
 
 #define PATTERN_DEFAULT	"-"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int get_bufsize(char *string, int argc, char *argv[], int arg_nb,
 		       size_t *bufsize, size_t default_size, size_t min_size)
 {
drivers/reboot-mode/reboot-mode-gpio.c +0 -2
index 22ee40c343338022a3c2921a779b32930748a653..8d3e53d50ee69a7bbad009c8f1cc590a4fc5872b 100644
@@ -10,8 +10,6 @@
 #include <reboot-mode/reboot-mode-gpio.h>
 #include <reboot-mode/reboot-mode.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int reboot_mode_get(struct udevice *dev, u32 *buf)
 {
 	int ret;
drivers/reboot-mode/reboot-mode-rtc.c +0 -2
index 4f4ad63febc106acd7f40de8757fe0db95bf6bee..adca584d622d8b65691fc12012548af4357a1ea8 100644
@@ -9,8 +9,6 @@
 #include <reboot-mode/reboot-mode.h>
 #include <rtc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int reboot_mode_get(struct udevice *dev, u32 *buf)
 {
 	if (!buf)
drivers/remoteproc/rproc-uclass.c +0 -2
index 2dbd3a21cea6382a7ec02e52b2c0eb757197d434..47cb64fec777b28ecd435d645c5ca2879e0e4bc6 100644
@@ -22,8 +22,6 @@
 #include <linux/compat.h>
 #include <linux/printk.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct resource_table {
 	u32 ver;
 	u32 num;
drivers/serial/ns16550.c +0 -3
index 4f7de3ea2152193a3916ca7b5bd052eda4a48bac..c885b46cf56fcaec955fc5c5fbcdb1c09470a29a 100644
@@ -14,13 +14,10 @@
 #include <reset.h>
 #include <spl.h>
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/serial/sandbox.c +0 -3
index cc0491bc3c8753e7488f01f3f31cf0dd4bdca834..658cbd2bbc90930ab7af1a6ce2c9a3b025074500 100644

Lines of this file are not shown. View the raw message.

drivers/serial/serial_adi_uart4.c +0 -2
index 45f8315d0a07d90312ff6965f4e736cf217a27c3..784310ba2311f87cdd2034acbadac9ea899a7d1a 100644

Lines of this file are not shown. View the raw message.

drivers/serial/serial_htif.c +0 -3
index 2a93bbbcc9f8d534be5937180b9709e9f517f4ab..690de3fc0854a989655c67ae2eefd83741750233 100644

Lines of this file are not shown. View the raw message.

drivers/serial/serial_xen.c +0 -3
index e05805f63726a399cfd030546939bc039627dd8c..4ba8d3ee641d0db10b86b3711c77ad8666b37c9a 100644

Lines of this file are not shown. View the raw message.

drivers/smem/msm_smem.c +0 -3
index b6b92d3530d26bd55910324757b3055ecfae115c..7a50d5a5792c1ceaf74c7433f01fc3428d9c967a 100644

Lines of this file are not shown. View the raw message.

drivers/spi/ca_sflash.c +0 -3
index db32e39add2f5e9ca973c628fc4359862644d86d..f00df93a5f58a94f463c8ccc3da2b9c0fa1efb24 100644

Lines of this file are not shown. View the raw message.

drivers/spi/microchip_coreqspi.c +0 -2
index a84b257fb1ab5232a9b651f1a66a53561da60e32..b3ff611e8f7e6fa6dd879e0e3736fd18afdcd105 100644

Lines of this file are not shown. View the raw message.

drivers/spi/mvebu_a3700_spi.c +0 -3
index fde9b142fb89957d22e2a90e1c09cf1e00c323f1..79836d7e271502a349f7c15c8d7f8fcce148cbfe 100644

Lines of this file are not shown. View the raw message.

drivers/spi/omap3_spi.c +0 -3
index 35bd87660978abdf6bf84ec9add0cb6225856245..b2d115aded470b7d9d21371b13c4c1aa384f2859 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-sunxi.c +0 -3
index e00532a371b420d0fe88b337b0fd68ac71ef5bba..0bdc112d249f6f800ced064e5ebbfdeb0b12bbc0 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-synquacer.c +0 -2
index a3c0ad17121cdbaa7998acd973bd8be8eb46032a..66c97da610b90bdfcadc4b15a5a913c88afdceb3 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-uclass.c +0 -3
index 49b584c648d6ffb273f9d5c3f3b773799d26a1fe..60401633341af191f0d70fc3b599cf5652ec4973 100644

Lines of this file are not shown. View the raw message.

drivers/spi/tegra210_qspi.c +0 -3
index b969a7993d40551cac96c64a18e74db716c35e3c..0f77fbc8d41815425d467b66939bae669c744ad6 100644

Lines of this file are not shown. View the raw message.

drivers/spmi/spmi-msm.c +0 -3
index f3cd98c3db83d23f5d5bc9199c8ca5c9084f44a6..b89dd0b406baaa9413c1c45996d26d2452a3bed1 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/imx_tmu.c +0 -3
index c8389d507ee31a39467ea393dd5a18ff9385e3c2..1bde4d07f52efec6b5d0b8abe7add50df60f4597 100644

Lines of this file are not shown. View the raw message.

drivers/timer/ostm_timer.c +0 -3
index 314f956cdfb7a62dd103af4bc6b1f787127d2b68..3841d3c90d089491bbe0e5746de31f4f10584d05 100644

Lines of this file are not shown. View the raw message.

drivers/timer/sp804_timer.c +0 -3
index 3e57f4b98bab98d5ea92f9f67de1a8f7a606351b..05532e3330cae52d5874b1b6a117e48ad59f05be 100644

Lines of this file are not shown. View the raw message.

drivers/usb/common/common.c +0 -3
index 13e9a61072a973acc9a2a7096867bb6d26fe6123..22aa6525c96d4c169685ebca103e247625ceddd8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/phy/rockchip_usb2_phy.c +0 -3
index ce9a7b5b81952a942525fdd504b552cfa93de9f2..bdbd0d44813aea53c3bbfe9365b045199d134b3c 100644

Lines of this file are not shown. View the raw message.

drivers/usb/tcpm/tcpm.c +0 -2
index 0aee57cb2f4a44af7b483e0e609e39ba584a06c0..3061b466d7c7e3736469018f25e8b7906ebf3cf3 100644

Lines of this file are not shown. View the raw message.

drivers/video/hx8238d.c +0 -2
index f0220e4cc07946907c393f57cf634c944a03f411..b6980b1aec1cdb48ae763298d890ba9aa6814b99 100644

Lines of this file are not shown. View the raw message.

drivers/video/imx/mxc_ipuv3_fb.c +0 -3
index ab416fdd33c1842582acf051318f08ae0adb0ecc..ef5d4faf3b38e0540d5d7f67d4c9c2227cb486f9 100644

Lines of this file are not shown. View the raw message.

drivers/video/nexell_display.c +0 -3
index ea3776258a005a9262583e6e860c19d73a5cc3da..e0416b70ec0f99f5762e01f0a409d6b50f272145 100644

Lines of this file are not shown. View the raw message.

drivers/video/rockchip/rk_lvds.c +0 -3
index c969dae30b6912b122a1a8ae0c2a4789c7015312..97c8619a6d8f0cecdba4f70928eff600d2eeaf79 100644

Lines of this file are not shown. View the raw message.

drivers/video/rockchip/rk_mipi.c +0 -3
index 0a603083ba9a561501ab2d8f37e00ea98b734aa0..e7b5973ca589681ad0abee39022057b4a3ad4750 100644

Lines of this file are not shown. View the raw message.

drivers/video/sandbox_sdl.c +0 -3
index 69dfa9302735b0f23bf3c4065516135ccb89d7f0..48da350080a72986a99c5dd619a9810f8781e8b7 100644

Lines of this file are not shown. View the raw message.

drivers/video/tidss/tidss_drv.c +0 -2
index 790ff6e591c00c33ee073cbb20c5dbe778a3d481..c231fd0341ebe08344276a74937a75ddba4576f3 100644

Lines of this file are not shown. View the raw message.

drivers/video/zynqmp/zynqmp_dpsub.c +0 -3
index a0efd3393f5fe2c3a468caec4ad81deef18dbdbf..fba65bb3d5bb77f6a9518b90e570fdc102950760 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/armada-37xx-wdt.c +0 -3
index 4b51178e1b8c8e6cb92287ad9ac9c27f4c839271..d7a6b8de492ddc8bf698eaeeef74f996dc8a3b29 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/at91sam9_wdt.c +0 -3
index 72e13787448e366036dce4a451cc2294e5b60a0d..2fb25126b8cbb22e819c376dba5da720dbe3f30f 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/mt7621_wdt.c +0 -3
index 6308d9632a8115f83daf765ca860133c2fd340fa..08ef3d84e26d3f9bc1a3f8d0e22d7945da0a3f9a 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/orion_wdt.c +0 -3
index 4562b2a37e3478da2f5b117f52a89051491653ff..a2000b968c9b90114e157006862f324bfb6c00a5 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/sbsa_gwdt.c +0 -3
index 03585529bb636a763fcbd536646bbd453735d1bc..807884c5bc73d20409a8cfd5dfa2f94fab3e5692 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/wdt-uclass.c +0 -3
index b32590069d97651f02468c70a85dfb6a4442fce6..438833b2245eaf2af62dfb80c754e146fd43441c 100644

Lines of this file are not shown. View the raw message.

fs/fs.c +0 -3
index 319c55c440aaffb8e59975fa6ea0c06e98cc894f..8ea50a6c13c403106ccc639c7c4e7fa2c4445a48 100644

Lines of this file are not shown. View the raw message.

fs/ubifs/ubifs.c +0 -3
index 40bad0e7da7afe76a37cbec7d4fc64ad944f198e..b0cc0d2e1b2279669382149a02962c79950dd14e 100644

Lines of this file are not shown. View the raw message.

include/relocate.h +0 -2
index 8ca25e1105e6b9536d4df82c1e413e8bea232b6b..331be1387288e5597ce6dbc6baf842c2f0831d62 100644

Lines of this file are not shown. View the raw message.

lib/efi_loader/efi_capsule.c +0 -3
index 89e63ed8dd5cd43f9800f83784e3e72c37b59f54..d66ddd1bbf860bc536430f8684777894ab08142a 100644

Lines of this file are not shown. View the raw message.

lib/efi_loader/efi_gop.c +0 -3
index 3abb47d610e658b67ba15ed3dcc0317fb3f96c0a..9403e09691e1a6e93dd35df5be1f9fede6dfea1f 100644

Lines of this file are not shown. View the raw message.

lib/efi_loader/efi_rng.c +0 -3
index 4734f95eee1df3ebaa53be958b04acc8e2d0332e..7810b4e47ead4f2605d9688bffb4c75881dc7fe8 100644

Lines of this file are not shown. View the raw message.

net/eth-uclass.c +0 -3
index a233912fd8e8e6a18e2bb982c834abfd3ab41c2f..5c437143a3075e4bc3654b34e9afba500c10bf65 100644

Lines of this file are not shown. View the raw message.

net/tftp.c +0 -3
index 78ec44159c1be7ac40bd57f54c62d965932d8c87..73d6a6a3c1bd984d9eb26763dd4e31708fec55ed 100644

Lines of this file are not shown. View the raw message.

net/wget.c +0 -3
index d3642958bf0ede476411369545c65231dff14089..49bfb9fcb96dfb5684ab10bd247fb21169e83851 100644

Lines of this file are not shown. View the raw message.

test/cmd/exit.c +0 -3
index fdde054b92898884f61821e8a6a8ac779667fc89..e20bc5f7b98cda77b0a458231df72fb3dc7e3312 100644

Lines of this file are not shown. View the raw message.

test/cmd/test_echo.c +0 -3
index 8b306cc907fbce7eb900caefdfa72ca1fc0d49ac..7ed534742f77a3d21775a9e5c49b19ca36e5ef9e 100644

Lines of this file are not shown. View the raw message.

test/cmd/test_pause.c +0 -3
index 174c31a3852eaf731d287d023e88a6af476a2371..b2cf60d3e74ed84fa844ce7b1401cf2be7a691e1 100644

Lines of this file are not shown. View the raw message.

test/dm/blk.c +0 -3
index 1b928b27d9cdbd0299d8081f0e3795ab88432219..f67869107da1cda6a5b8dabaec27b64b538c70be 100644

Lines of this file are not shown. View the raw message.

test/dm/i3c.c +0 -2
index 81336e67555d148142574b7d2a4c2bf80c080302..816ecabd7228648ee32f64a7f68fefcc2c04653c 100644

Lines of this file are not shown. View the raw message.

test/lib/test_print.c +0 -3
index cd7f3f85769682fe8da73570d2f47adaab25055d..2aeb034b12112d070bb708e70e925ade8f8ad297 100644

Lines of this file are not shown. View the raw message.

test/log/log_filter.c +0 -3
index 680c60164b623bb30bf0a5457c190bab8d97468a..147b83980cffd26d0bf20c5ff1641cf3545f8e3c 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.37.1

Part of the diff is not shown here. View the raw message.

#15 lore raw
In reply to Peng Fan (OSS)
Quoted 9 lines · Peng Fan (OSS)

This patch set primarily removes unused DECLARE_GLOBAL_DATA_PTR instances.

Many files declare DECLARE_GLOBAL_DATA_PTR and include asm/global_data.h even though gd is never used. In these cases, asm/global_data.h is effectively treated as a proxy header, which is not a good practice.

[...]

Applied to u-boot/next, thanks!

[01/14] beacon: imx8mm/n: Drop useless files

        commit: 090536b8e6f89b31698e20c2a48e1c7ca50e1555
[02/14] mediatek: mt7622: Drop useless board files
        commit: 87b9ccf6e429323a64359df119df75ddb9d6ddea
[03/14] common: cli_hush: Include vsprintf.h
        commit: befa5440b9d484b0d389864e59bcb3aa5d50695a
[04/14] cmd: mem: Include vsprintf.h
        commit: ecbbea0d1657856d1f9515e0ebdd1f9e4be3744e
[05/14] test: log_filter: Include vsprintf.h
        commit: 68ab09e3a2986b570a249d6c1b12baac0e539274
[06/14] xtensa: relocate: Add missing headers
        commit: afbeb3a0922e5337e5b473369245e2fe55cac9c5
[07/14] toradex: common: Add missing headers
        commit: 49f60d60f70bf429319d72b85bbf5bb37519a7ae
[08/14] tegra: pmc: Cleanup headers
        commit: f025f9de6022167e494a88f22751a329b4ac023a
[09/14] rockchip: evk_rk3308: Cleanup headers
        commit: 90d7b4c8a5b094cea20e60d4ebed58aa571b734d
[10/14] nxp: emc2305: Cleanup headers
        commit: b2db865c4e5e625c4b4fc9eb3204ac96effa3af8
[11/14] pci: layerspace: Add missing header files
        commit: d3b0b3c1184744a3471ca98363b7bc31e7ccb882
[12/14] renesas: common: Include asm-generic/u-boot.h
        commit: 15398169c4283d50b7c578363baa4e4054e7b4fa
[13/14] socfpga: clock_manager_s10: Add missing header files
        commit: 406982f091c76e6ce0734373426bd756f97d64e9
[14/14] treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage
        commit: 0f90b1e715f8abe41b0875752eb184f46032ff11
Signature · 1 line
Tom