summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2026-02-09 09:30:18 +0800
committerTom Rini <[email protected]>2026-02-17 13:50:22 -0600
commit0f90b1e715f8abe41b0875752eb184f46032ff11 (patch)
treea9fb9e93d8dca6895b94e17cdbe4ec7f596ca40a /arch
parent406982f091c76e6ce0734373426bd756f97d64e9 (diff)
treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage
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. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/lib/bootm.c3
-rw-r--r--arch/arm/cpu/armv7/s5p4418/cpu.c3
-rw-r--r--arch/arm/mach-aspeed/ast2600/spl.c3
-rw-r--r--arch/arm/mach-imx/imx8/clock.c3
-rw-r--r--arch/arm/mach-imx/imx8/fdt.c3
-rw-r--r--arch/arm/mach-imx/imx8/iomux.c3
-rw-r--r--arch/arm/mach-imx/imx8m/clock_imx8mm.c3
-rw-r--r--arch/arm/mach-imx/imx8ulp/cgc.c3
-rw-r--r--arch/arm/mach-imx/imx8ulp/clock.c3
-rw-r--r--arch/arm/mach-imx/imx9/clock.c3
-rw-r--r--arch/arm/mach-imx/imx9/clock_root.c3
-rw-r--r--arch/arm/mach-imx/misc.c3
-rw-r--r--arch/arm/mach-imx/spl_imx_romapi.c3
-rw-r--r--arch/arm/mach-meson/board-axg.c3
-rw-r--r--arch/arm/mach-meson/board-g12a.c3
-rw-r--r--arch/arm/mach-meson/board-gx.c3
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex.c3
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex5.c3
-rw-r--r--arch/arm/mach-socfpga/clock_manager_n5x.c3
-rw-r--r--arch/arm/mach-socfpga/clock_manager_s10.c3
-rw-r--r--arch/arm/mach-socfpga/mailbox_s10.c3
-rw-r--r--arch/arm/mach-socfpga/misc_gen5.c3
-rw-r--r--arch/arm/mach-socfpga/misc_soc64.c3
-rw-r--r--arch/arm/mach-socfpga/mmu-arm64_s10.c3
-rw-r--r--arch/arm/mach-socfpga/reset_manager_s10.c3
-rw-r--r--arch/arm/mach-socfpga/spl_agilex.c3
-rw-r--r--arch/arm/mach-socfpga/spl_agilex5.c3
-rw-r--r--arch/arm/mach-socfpga/spl_agilex7m.c3
-rw-r--r--arch/arm/mach-socfpga/spl_gen5.c3
-rw-r--r--arch/arm/mach-socfpga/spl_n5x.c3
-rw-r--r--arch/arm/mach-socfpga/spl_s10.c3
-rw-r--r--arch/arm/mach-socfpga/system_manager_soc64.c3
-rw-r--r--arch/microblaze/lib/bootm.c3
-rw-r--r--arch/mips/mach-ath79/qca956x/ddr.c3
-rw-r--r--arch/mips/mach-mscc/cpu.c3
-rw-r--r--arch/mips/mach-mtmips/ddr_cal.c3
-rw-r--r--arch/mips/mach-octeon/cvmx-pko.c2
-rw-r--r--arch/nios2/lib/bootm.c3
-rw-r--r--arch/riscv/cpu/andes/spl.c3
-rw-r--r--arch/riscv/cpu/cv1800b/dram.c3
-rw-r--r--arch/riscv/cpu/generic/dram.c3
-rw-r--r--arch/riscv/cpu/k230/dram.c3
-rw-r--r--arch/riscv/cpu/th1520/spl.c2
-rw-r--r--arch/sh/lib/bootm.c3
-rw-r--r--arch/x86/cpu/ivybridge/model_206ax.c3
-rw-r--r--arch/x86/lib/init_helpers.c3
-rw-r--r--arch/x86/lib/zimage.c3
-rw-r--r--arch/xtensa/lib/time.c3
48 files changed, 0 insertions, 142 deletions
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index b143392ee6c..91bce5235a5 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -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)
{
diff --git a/arch/arm/cpu/armv7/s5p4418/cpu.c b/arch/arm/cpu/armv7/s5p4418/cpu.c
index 27ffb450378..2c550439559 100644
--- a/arch/arm/cpu/armv7/s5p4418/cpu.c
+++ b/arch/arm/cpu/armv7/s5p4418/cpu.c
@@ -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
diff --git a/arch/arm/mach-aspeed/ast2600/spl.c b/arch/arm/mach-aspeed/ast2600/spl.c
index 0c5a82ed094..60f2c5d291e 100644
--- a/arch/arm/mach-aspeed/ast2600/spl.c
+++ b/arch/arm/mach-aspeed/ast2600/spl.c
@@ -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)
{
diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c
index 4e49b5bf375..e37d3bf31e4 100644
--- a/arch/arm/mach-imx/imx8/clock.c
+++ b/arch/arm/mach-imx/imx8/clock.c
@@ -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) {
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index ce78c8ce919..8337edc2f62 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -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;
diff --git a/arch/arm/mach-imx/imx8/iomux.c b/arch/arm/mach-imx/imx8/iomux.c
index 3e27d75827a..b6175a50226 100644
--- a/arch/arm/mach-imx/imx8/iomux.c
+++ b/arch/arm/mach-imx/imx8/iomux.c
@@ -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
*/
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 77c8efc7899..b7b3702041e 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -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);
diff --git a/arch/arm/mach-imx/imx8ulp/cgc.c b/arch/arm/mach-imx/imx8ulp/cgc.c
index f9d8ed5b048..69585a3605b 100644
--- a/arch/arm/mach-imx/imx8ulp/cgc.c
+++ b/arch/arm/mach-imx/imx8ulp/cgc.c
@@ -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;
diff --git a/arch/arm/mach-imx/imx8ulp/clock.c b/arch/arm/mach-imx/imx8ulp/clock.c
index c390f20d769..1b5cbd56f50 100644
--- a/arch/arm/mach-imx/imx8ulp/clock.c
+++ b/arch/arm/mach-imx/imx8ulp/clock.c
@@ -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)
diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c
index e65cabef2c9..14a2bdf5762 100644
--- a/arch/arm/mach-imx/imx9/clock.c
+++ b/arch/arm/mach-imx/imx9/clock.c
@@ -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[] = {
diff --git a/arch/arm/mach-imx/imx9/clock_root.c b/arch/arm/mach-imx/imx9/clock_root.c
index 5dbc398e97f..acf79a40584 100644
--- a/arch/arm/mach-imx/imx9/clock_root.c
+++ b/arch/arm/mach-imx/imx9/clock_root.c
@@ -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] = {
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 7452b82f110..90d91b2300a 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -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
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index b7008df8e35..d36536e600e 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -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)
{
diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c
index 6535539184c..542792cad1b 100644
--- a/arch/arm/mach-meson/board-axg.c
+++ b/arch/arm/mach-meson/board-axg.c
@@ -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;
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index dc4abe1e107..17722cb897d 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -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;
diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
index 0370ed57e20..d5c506df22b 100644
--- a/arch/arm/mach-meson/board-gx.c
+++ b/arch/arm/mach-meson/board-gx.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 9987d5bcee6..95c7f044952 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex5.c b/arch/arm/mach-socfpga/clock_manager_agilex5.c
index 7ec28d91ef3..fa068a9eeb1 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex5.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex5.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/clock_manager_n5x.c b/arch/arm/mach-socfpga/clock_manager_n5x.c
index c4c071330fc..8e47b4b8f5b 100644
--- a/arch/arm/mach-socfpga/clock_manager_n5x.c
+++ b/arch/arm/mach-socfpga/clock_manager_n5x.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/clock_manager_s10.c b/arch/arm/mach-socfpga/clock_manager_s10.c
index d6c64e98010..fd27470f967 100644
--- a/arch/arm/mach-socfpga/clock_manager_s10.c
+++ b/arch/arm/mach-socfpga/clock_manager_s10.c
@@ -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
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index f9c34e85711..5e8768168d3 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -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))
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 5259ef54d73..ae33051c00f 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -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 =
diff --git a/arch/arm/mach-socfpga/misc_soc64.c b/arch/arm/mach-socfpga/misc_soc64.c
index 5222b384434..356240a647e 100644
--- a/arch/arm/mach-socfpga/misc_soc64.c
+++ b/arch/arm/mach-socfpga/misc_soc64.c
@@ -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
diff --git a/arch/arm/mach-socfpga/mmu-arm64_s10.c b/arch/arm/mach-socfpga/mmu-arm64_s10.c
index 1dc44ab4797..1a7f8d42415 100644
--- a/arch/arm/mach-socfpga/mmu-arm64_s10.c
+++ b/arch/arm/mach-socfpga/mmu-arm64_s10.c
@@ -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[] = {
diff --git a/arch/arm/mach-socfpga/reset_manager_s10.c b/arch/arm/mach-socfpga/reset_manager_s10.c
index abb62a9b49f..7e1ecc1cd1d 100644
--- a/arch/arm/mach-socfpga/reset_manager_s10.c
+++ b/arch/arm/mach-socfpga/reset_manager_s10.c
@@ -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 */
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index 48f258a37b4..53a9aa55f80 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -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 */
diff --git a/arch/arm/mach-socfpga/spl_agilex5.c b/arch/arm/mach-socfpga/spl_agilex5.c
index 1be347360f5..2c3e40b664a 100644
--- a/arch/arm/mach-socfpga/spl_agilex5.c
+++ b/arch/arm/mach-socfpga/spl_agilex5.c
@@ -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 */
diff --git a/arch/arm/mach-socfpga/spl_agilex7m.c b/arch/arm/mach-socfpga/spl_agilex7m.c
index 90065ccee6f..7371202a712 100644
--- a/arch/arm/mach-socfpga/spl_agilex7m.c
+++ b/arch/arm/mach-socfpga/spl_agilex7m.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index df79cfe0f7f..08b756db2ca 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -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() +
diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index 81283ef7162..a49be837921 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -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;
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index fa83ff96adc..a0d3c96d456 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -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();
diff --git a/arch/arm/mach-socfpga/system_manager_soc64.c b/arch/arm/mach-socfpga/system_manager_soc64.c
index 913f93c8f94..a5c0387190b 100644
--- a/arch/arm/mach-socfpga/system_manager_soc64.c
+++ b/arch/arm/mach-socfpga/system_manager_soc64.c
@@ -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
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 4879a41aab3..2410515f4ac 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -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);
diff --git a/arch/mips/mach-ath79/qca956x/ddr.c b/arch/mips/mach-ath79/qca956x/ddr.c
index 2e46e24f483..754e2573e37 100644
--- a/arch/mips/mach-ath79/qca956x/ddr.c
+++ b/arch/mips/mach-ath79/qca956x/ddr.c
@@ -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, \
diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
index 22b1b98e0ef..8ae6fb9437a 100644
--- a/arch/mips/mach-mscc/cpu.c
+++ b/arch/mips/mach-mscc/cpu.c
@@ -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
diff --git a/arch/mips/mach-mtmips/ddr_cal.c b/arch/mips/mach-mtmips/ddr_cal.c
index e2e1760a646..5fc4e0c49e8 100644
--- a/arch/mips/mach-mtmips/ddr_cal.c
+++ b/arch/mips/mach-mtmips/ddr_cal.c
@@ -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
diff --git a/arch/mips/mach-octeon/cvmx-pko.c b/arch/mips/mach-octeon/cvmx-pko.c
index 8a9181362bd..432488f7815 100644
--- a/arch/mips/mach-octeon/cvmx-pko.c
+++ b/arch/mips/mach-octeon/cvmx-pko.c
@@ -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,
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 71319839ba2..294ebfb508b 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -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 */
diff --git a/arch/riscv/cpu/andes/spl.c b/arch/riscv/cpu/andes/spl.c
index a13dc4095a4..1e19fad9288 100644
--- a/arch/riscv/cpu/andes/spl.c
+++ b/arch/riscv/cpu/andes/spl.c
@@ -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)
{
diff --git a/arch/riscv/cpu/cv1800b/dram.c b/arch/riscv/cpu/cv1800b/dram.c
index 91007c0a3d3..5d7659887b9 100644
--- a/arch/riscv/cpu/cv1800b/dram.c
+++ b/arch/riscv/cpu/cv1800b/dram.c
@@ -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();
diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c
index 91007c0a3d3..5d7659887b9 100644
--- a/arch/riscv/cpu/generic/dram.c
+++ b/arch/riscv/cpu/generic/dram.c
@@ -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();
diff --git a/arch/riscv/cpu/k230/dram.c b/arch/riscv/cpu/k230/dram.c
index b2d3e4fd6a9..5d7659887b9 100644
--- a/arch/riscv/cpu/k230/dram.c
+++ b/arch/riscv/cpu/k230/dram.c
@@ -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();
diff --git a/arch/riscv/cpu/th1520/spl.c b/arch/riscv/cpu/th1520/spl.c
index b95470485f6..ceb934021d9 100644
--- a/arch/riscv/cpu/th1520/spl.c
+++ b/arch/riscv/cpu/th1520/spl.c
@@ -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)
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c
index bb0f59e0aa2..1c118870dad 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -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
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index b72de96a277..ed0ad686b3f 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -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;
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index bd0efde00c1..96943cb8c46 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -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) ||
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 2ea9bcf59c2..a5f2231aa52 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -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:
*
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 319635c6b09..1fe33a4c62b 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -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)
{