diff options
| author | Peng Fan <[email protected]> | 2026-02-09 09:30:18 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-02-17 13:50:22 -0600 |
| commit | 0f90b1e715f8abe41b0875752eb184f46032ff11 (patch) | |
| tree | a9fb9e93d8dca6895b94e17cdbe4ec7f596ca40a /drivers | |
| parent | 406982f091c76e6ce0734373426bd756f97d64e9 (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 'drivers')
122 files changed, 0 insertions, 346 deletions
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index 9cb27561a97..4b3de0529ce 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -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) diff --git a/drivers/bootcount/pmic_pfuze100.c b/drivers/bootcount/pmic_pfuze100.c index 8c529f5592b..dd11344322b 100644 --- a/drivers/bootcount/pmic_pfuze100.c +++ b/drivers/bootcount/pmic_pfuze100.c @@ -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 { diff --git a/drivers/cache/sandbox_cache.c b/drivers/cache/sandbox_cache.c index 375892fafb0..b27960f1bfa 100644 --- a/drivers/cache/sandbox_cache.c +++ b/drivers/cache/sandbox_cache.c @@ -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) { diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c index fdbf834bb2f..9d49561512b 100644 --- a/drivers/clk/altera/clk-agilex.c +++ b/drivers/clk/altera/clk-agilex.c @@ -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; diff --git a/drivers/clk/altera/clk-agilex5.c b/drivers/clk/altera/clk-agilex5.c index fb1e72ffc5c..92b91a9dfc8 100644 --- a/drivers/clk/altera/clk-agilex5.c +++ b/drivers/clk/altera/clk-agilex5.c @@ -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) diff --git a/drivers/clk/altera/clk-mem-n5x.c b/drivers/clk/altera/clk-mem-n5x.c index b75f52d203b..ac59571a853 100644 --- a/drivers/clk/altera/clk-mem-n5x.c +++ b/drivers/clk/altera/clk-mem-n5x.c @@ -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; }; diff --git a/drivers/clk/altera/clk-n5x.c b/drivers/clk/altera/clk-n5x.c index 9e4e7a1d908..185c9028a78 100644 --- a/drivers/clk/altera/clk-n5x.c +++ b/drivers/clk/altera/clk-n5x.c @@ -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; }; diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c index b5054e84c32..d143a6b85ee 100644 --- a/drivers/clk/rockchip/clk_px30.c +++ b/drivers/clk/rockchip/clk_px30.c @@ -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, diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c index e73bb6790af..97043b8693c 100644 --- a/drivers/clk/rockchip/clk_rk3308.c +++ b/drivers/clk/rockchip/clk_rk3308.c @@ -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, diff --git a/drivers/clk/rockchip/clk_rk3528.c b/drivers/clk/rockchip/clk_rk3528.c index d58557ff56d..bcdc0f930d2 100644 --- a/drivers/clk/rockchip/clk_rk3528.c +++ b/drivers/clk/rockchip/clk_rk3528.c @@ -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)) /* diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c index 533031caead..bb49af358e6 100644 --- a/drivers/clk/rockchip/clk_rk3568.c +++ b/drivers/clk/rockchip/clk_rk3568.c @@ -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; diff --git a/drivers/clk/rockchip/clk_rk3576.c b/drivers/clk/rockchip/clk_rk3576.c index 125b08ee832..1026af27ca1 100644 --- a/drivers/clk/rockchip/clk_rk3576.c +++ b/drivers/clk/rockchip/clk_rk3576.c @@ -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[] = { diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index 8c3a113526f..be401a9faee 100644 --- a/drivers/clk/rockchip/clk_rk3588.c +++ b/drivers/clk/rockchip/clk_rk3588.c @@ -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[] = { diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c index 75202a66aa6..e1b9ccf1236 100644 --- a/drivers/clk/rockchip/clk_rv1108.c +++ b/drivers/clk/rockchip/clk_rv1108.c @@ -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, diff --git a/drivers/clk/rockchip/clk_rv1126.c b/drivers/clk/rockchip/clk_rv1126.c index aeeea956914..39920d34b75 100644 --- a/drivers/clk/rockchip/clk_rv1126.c +++ b/drivers/clk/rockchip/clk_rv1126.c @@ -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, \ diff --git a/drivers/cpu/bcm283x_cpu.c b/drivers/cpu/bcm283x_cpu.c index 59a7b142c95..ad638cd8fff 100644 --- a/drivers/cpu/bcm283x_cpu.c +++ b/drivers/cpu/bcm283x_cpu.c @@ -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; }; diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c index 2c8e46c05e3..b73768de918 100644 --- a/drivers/cpu/cpu-uclass.c +++ b/drivers/cpu/cpu-uclass.c @@ -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); diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 5f17122c36c..3cd00199548 100644 --- a/drivers/cpu/imx8_cpu.c +++ b/drivers/cpu/imx8_cpu.c @@ -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; diff --git a/drivers/cpu/mtk_cpu.c b/drivers/cpu/mtk_cpu.c index 2a08be9b6d1..4f4e5480eac 100644 --- a/drivers/cpu/mtk_cpu.c +++ b/drivers/cpu/mtk_cpu.c @@ -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; }; diff --git a/drivers/firmware/arm-ffa/arm-ffa-uclass.c b/drivers/firmware/arm-ffa/arm-ffa-uclass.c index 96c64964bb7..76a8775e911 100644 --- a/drivers/firmware/arm-ffa/arm-ffa-uclass.c +++ b/drivers/firmware/arm-ffa/arm-ffa-uclass.c @@ -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] = { diff --git a/drivers/firmware/arm-ffa/arm-ffa.c b/drivers/firmware/arm-ffa/arm-ffa.c index 94e6105cb38..9e6b5dcc542 100644 --- a/drivers/firmware/arm-ffa/arm-ffa.c +++ b/drivers/firmware/arm-ffa/arm-ffa.c @@ -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 diff --git a/drivers/firmware/arm-ffa/ffa-emul-uclass.c b/drivers/firmware/arm-ffa/ffa-emul-uclass.c index 1521d9b66ac..6198d687354 100644 --- a/drivers/firmware/arm-ffa/ffa-emul-uclass.c +++ b/drivers/firmware/arm-ffa/ffa-emul-uclass.c @@ -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] = { { diff --git a/drivers/firmware/arm-ffa/sandbox_ffa.c b/drivers/firmware/arm-ffa/sandbox_ffa.c index 44b32a829dd..f1e8de4bf0d 100644 --- a/drivers/firmware/arm-ffa/sandbox_ffa.c +++ b/drivers/firmware/arm-ffa/sandbox_ffa.c @@ -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 diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index 38151ef1bee..7651d5360d6 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -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 /** diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c index 741b2ff7f17..5abbb34daea 100644 --- a/drivers/gpio/nx_gpio.c +++ b/drivers/gpio/nx_gpio.c @@ -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 */ diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 2dfc1c4eab5..268bb39f009 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -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 diff --git a/drivers/i2c/nx_i2c.c b/drivers/i2c/nx_i2c.c index 8562dd82bd6..706b7adefe8 100644 --- a/drivers/i2c/nx_i2c.c +++ b/drivers/i2c/nx_i2c.c @@ -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; diff --git a/drivers/i2c/ocores_i2c.c b/drivers/i2c/ocores_i2c.c index cf714d22ee4..32704ee8854 100644 --- a/drivers/i2c/ocores_i2c.c +++ b/drivers/i2c/ocores_i2c.c @@ -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, diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c index 79f7a320502..4102375e5b7 100644 --- a/drivers/i2c/soft_i2c.c +++ b/drivers/i2c/soft_i2c.c @@ -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 diff --git a/drivers/i2c/synquacer_i2c.c b/drivers/i2c/synquacer_i2c.c index 6672d9435e3..6e5722327c5 100644 --- a/drivers/i2c/synquacer_i2c.c +++ b/drivers/i2c/synquacer_i2c.c @@ -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; diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index b1e0465e7a8..c7eaa3de96f 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -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 diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 3b9046da880..aa3094fcc01 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -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)); diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index 2928cf75f89..6af4c7f15e7 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -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. * diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c index 90d251a4405..872713e30b6 100644 --- a/drivers/misc/imx8/fuse.c +++ b/drivers/misc/imx8/fuse.c @@ -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 diff --git a/drivers/mmc/ca_dw_mmc.c b/drivers/mmc/ca_dw_mmc.c index 1af5ec0532e..d5a4453a62e 100644 --- a/drivers/mmc/ca_dw_mmc.c +++ b/drivers/mmc/ca_dw_mmc.c @@ -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; diff --git a/drivers/mmc/f_sdh30.c b/drivers/mmc/f_sdh30.c index f47cf848521..f0356e1e960 100644 --- a/drivers/mmc/f_sdh30.c +++ b/drivers/mmc/f_sdh30.c @@ -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); diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c index fc10bb256a4..651d9868305 100644 --- a/drivers/mmc/jz_mmc.c +++ b/drivers/mmc/jz_mmc.c @@ -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) { diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 38dc36a2194..66f3cf2de4f 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -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); diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c index 2da5334c21f..a8b63a20387 100644 --- a/drivers/mmc/mv_sdhci.c +++ b/drivers/mmc/mv_sdhci.c @@ -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; diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c index 7bf54fa4654..7324dc72e0a 100644 --- a/drivers/mtd/nand/raw/pxa3xx_nand.c +++ b/drivers/mtd/nand/raw/pxa3xx_nand.c @@ -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 diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c index ef43dcad079..0bee7eace90 100644 --- a/drivers/mtd/nand/raw/tegra_nand.c +++ b/drivers/mtd/nand/raw/tegra_nand.c @@ -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 diff --git a/drivers/mtd/nvmxip/nvmxip_qspi.c b/drivers/mtd/nvmxip/nvmxip_qspi.c index 1a109bee557..383971bea66 100644 --- a/drivers/mtd/nvmxip/nvmxip_qspi.c +++ b/drivers/mtd/nvmxip/nvmxip_qspi.c @@ -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" /** diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index 102a9236826..a9db5296b2d 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -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)); diff --git a/drivers/net/dwmac_s700.c b/drivers/net/dwmac_s700.c index 969d247b4f3..76daab961c0 100644 --- a/drivers/net/dwmac_s700.c +++ b/drivers/net/dwmac_s700.c @@ -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 | diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 1c51e936b5b..3d32bad0831 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -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. diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c index c8cfe7448d4..2b6080dd9ee 100644 --- a/drivers/net/gmac_rockchip.c +++ b/drivers/net/gmac_rockchip.c @@ -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)) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 1640868c24a..baa18202d6e 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -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 */ diff --git a/drivers/net/octeontx/smi.c b/drivers/net/octeontx/smi.c index 217bcac2ce2..5a822b64427 100644 --- a/drivers/net/octeontx/smi.c +++ b/drivers/net/octeontx/smi.c @@ -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, diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 11d36164976..4ab709a14d5 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -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) { diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b58283fe3d5..d7e0c4fe02d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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 */ /** diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index e44b7b75bd5..f5a7dd349c9 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -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) diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c index 1d716716778..c3d40f0b59e 100644 --- a/drivers/net/sandbox-raw.c +++ b/drivers/net/sandbox-raw.c @@ -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; diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c index 2011fd31f41..0ea50c484c0 100644 --- a/drivers/net/sandbox.c +++ b/drivers/net/sandbox.c @@ -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; diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c index d4abc9a0411..40c98e72e4d 100644 --- a/drivers/net/ti/keystone_net.c +++ b/drivers/net/ti/keystone_net.c @@ -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 diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index fb48feb4469..e9cc5db52d2 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -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 */ diff --git a/drivers/pci/pci_octeontx.c b/drivers/pci/pci_octeontx.c index 875cf7f7115..6752112a878 100644 --- a/drivers/pci/pci_octeontx.c +++ b/drivers/pci/pci_octeontx.c @@ -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: * diff --git a/drivers/pci/pcie_dw_meson.c b/drivers/pci/pcie_dw_meson.c index 483b07ce078..1eff6d1b0ed 100644 --- a/drivers/pci/pcie_dw_meson.c +++ b/drivers/pci/pcie_dw_meson.c @@ -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 * diff --git a/drivers/pci/pcie_dw_qcom.c b/drivers/pci/pcie_dw_qcom.c index 978754e8472..10c45aaba20 100644 --- a/drivers/pci/pcie_dw_qcom.c +++ b/drivers/pci/pcie_dw_qcom.c @@ -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 { diff --git a/drivers/pci/pcie_dw_rockchip.c b/drivers/pci/pcie_dw_rockchip.c index 208aa30463a..61117fa95e6 100644 --- a/drivers/pci/pcie_dw_rockchip.c +++ b/drivers/pci/pcie_dw_rockchip.c @@ -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 * diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c index dc6e65273b7..37c295fdd38 100644 --- a/drivers/pci/pcie_dw_ti.c +++ b/drivers/pci/pcie_dw_ti.c @@ -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 diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 1be33095b9c..db7c4f47916 100644 --- a/drivers/pci/pcie_layerscape.c +++ b/drivers/pci/pcie_layerscape.c @@ -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) diff --git a/drivers/pci/pcie_starfive_jh7110.c b/drivers/pci/pcie_starfive_jh7110.c index 0908ae16b67..761e64be58a 100644 --- a/drivers/pci/pcie_starfive_jh7110.c +++ b/drivers/pci/pcie_starfive_jh7110.c @@ -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; diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c index 902d1a51eaa..b71defe4019 100644 --- a/drivers/pci_endpoint/pci_ep-uclass.c +++ b/drivers/pci_endpoint/pci_ep-uclass.c @@ -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); diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c index a4121423873..b074d58f9f6 100644 --- a/drivers/phy/marvell/comphy_core.c +++ b/drivers/phy/marvell/comphy_core.c @@ -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[] = { diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c index 2be0178882a..6df4ff4eb05 100644 --- a/drivers/phy/omap-usb2-phy.c +++ b/drivers/phy/omap-usb2-phy.c @@ -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; diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c index 660037034ec..5775101c4cb 100644 --- a/drivers/phy/rockchip/phy-rockchip-pcie.c +++ b/drivers/phy/rockchip/phy-rockchip-pcie.c @@ -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. diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index 66d1d32d25c..305d5b0dd48 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -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) diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c index dc7acec4a77..be3a28eb94d 100644 --- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c +++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c @@ -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 diff --git a/drivers/pinctrl/nexell/pinctrl-nexell.c b/drivers/pinctrl/nexell/pinctrl-nexell.c index d5be7baf50d..af1acd91649 100644 --- a/drivers/pinctrl/nexell/pinctrl-nexell.c +++ b/drivers/pinctrl/nexell/pinctrl-nexell.c @@ -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) diff --git a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c index a6ae5764fbc..aeed3f1e1e1 100644 --- a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c +++ b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c @@ -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; diff --git a/drivers/pinctrl/nxp/pinctrl-imx-mmio.c b/drivers/pinctrl/nxp/pinctrl-imx-mmio.c index 2f4228a9fc5..7cdbbbba747 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx-mmio.c +++ b/drivers/pinctrl/nxp/pinctrl-imx-mmio.c @@ -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); diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c index 7d91ccfb26f..d8011768581 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx.c +++ b/drivers/pinctrl/nxp/pinctrl-imx.c @@ -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) { diff --git a/drivers/pinctrl/nxp/pinctrl-imx8.c b/drivers/pinctrl/nxp/pinctrl-imx8.c index 9b3b5aec07a..23865ee6428 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx8.c +++ b/drivers/pinctrl/nxp/pinctrl-imx8.c @@ -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 diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c index 85ab5fdf640..8b764738014 100644 --- a/drivers/pinctrl/nxp/pinctrl-mxs.c +++ b/drivers/pinctrl/nxp/pinctrl-mxs.c @@ -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; diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c index a7e64971a2a..1c731b897cc 100644 --- a/drivers/power/domain/imx8m-power-domain.c +++ b/drivers/power/domain/imx8m-power-domain.c @@ -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 diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c index a5df2570fc3..13642794765 100644 --- a/drivers/power/pmic/bd71837.c +++ b/drivers/power/pmic/bd71837.c @@ -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}, diff --git a/drivers/power/pmic/mc34708.c b/drivers/power/pmic/mc34708.c index 43badb5767a..0ec52e25a9e 100644 --- a/drivers/power/pmic/mc34708.c +++ b/drivers/power/pmic/mc34708.c @@ -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; diff --git a/drivers/power/pmic/mp5416.c b/drivers/power/pmic/mp5416.c index 9d44f0ae655..899c2beeb37 100644 --- a/drivers/power/pmic/mp5416.c +++ b/drivers/power/pmic/mp5416.c @@ -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 */ diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c index e5c1f037b61..c95e6357ee8 100644 --- a/drivers/power/pmic/pca9450.c +++ b/drivers/power/pmic/pca9450.c @@ -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}, diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index ff738faadc5..adde5156c76 100644 --- a/drivers/power/regulator/pwm_regulator.c +++ b/drivers/power/regulator/pwm_regulator.c @@ -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; diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index e9777c71f5e..dea7bc57495 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -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; diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c index 0a64eb01dc2..b51dee31a98 100644 --- a/drivers/pwm/rk_pwm.c +++ b/drivers/pwm/rk_pwm.c @@ -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; diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c index 2140a05b679..1dd2428da77 100644 --- a/drivers/pwm/sunxi_pwm.c +++ b/drivers/pwm/sunxi_pwm.c @@ -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 { diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c index 6108faa7073..3b41d6045ad 100644 --- a/drivers/ram/stm32mp1/stm32mp1_tests.c +++ b/drivers/ram/stm32mp1/stm32mp1_tests.c @@ -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) { diff --git a/drivers/reboot-mode/reboot-mode-gpio.c b/drivers/reboot-mode/reboot-mode-gpio.c index 22ee40c3433..8d3e53d50ee 100644 --- a/drivers/reboot-mode/reboot-mode-gpio.c +++ b/drivers/reboot-mode/reboot-mode-gpio.c @@ -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; diff --git a/drivers/reboot-mode/reboot-mode-rtc.c b/drivers/reboot-mode/reboot-mode-rtc.c index 4f4ad63febc..adca584d622 100644 --- a/drivers/reboot-mode/reboot-mode-rtc.c +++ b/drivers/reboot-mode/reboot-mode-rtc.c @@ -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) diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c index 2dbd3a21cea..47cb64fec77 100644 --- a/drivers/remoteproc/rproc-uclass.c +++ b/drivers/remoteproc/rproc-uclass.c @@ -22,8 +22,6 @@ #include <linux/compat.h> #include <linux/printk.h> -DECLARE_GLOBAL_DATA_PTR; - struct resource_table { u32 ver; u32 num; diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 4f7de3ea215..c885b46cf56 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -14,13 +14,10 @@ #include <reset.h> #include <spl.h> #include <watchdog.h> -#include <asm/global_data.h> #include <linux/err.h> #include <linux/types.h> #include <asm/io.h> -DECLARE_GLOBAL_DATA_PTR; - #define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */ #define UART_MCRVAL (UART_MCR_DTR | \ UART_MCR_RTS) /* RTS/DTR */ diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index cc0491bc3c8..658cbd2bbc9 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -14,13 +14,10 @@ #include <os.h> #include <serial.h> #include <video.h> -#include <asm/global_data.h> #include <linux/compiler.h> #include <asm/serial.h> #include <asm/state.h> -DECLARE_GLOBAL_DATA_PTR; - static size_t _sandbox_serial_written = 1; static bool sandbox_serial_enabled = true; diff --git a/drivers/serial/serial_adi_uart4.c b/drivers/serial/serial_adi_uart4.c index 45f8315d0a0..784310ba231 100644 --- a/drivers/serial/serial_adi_uart4.c +++ b/drivers/serial/serial_adi_uart4.c @@ -80,8 +80,6 @@ #define ERXS BIT(8) #define ETXS BIT(9) -DECLARE_GLOBAL_DATA_PTR; - struct uart4_reg { u32 revid; u32 control; diff --git a/drivers/serial/serial_htif.c b/drivers/serial/serial_htif.c index 2a93bbbcc9f..690de3fc085 100644 --- a/drivers/serial/serial_htif.c +++ b/drivers/serial/serial_htif.c @@ -8,14 +8,11 @@ #include <fdtdec.h> #include <log.h> #include <watchdog.h> -#include <asm/global_data.h> #include <asm/io.h> #include <linux/compiler.h> #include <serial.h> #include <linux/err.h> -DECLARE_GLOBAL_DATA_PTR; - #define HTIF_DATA_BITS 48 #define HTIF_DATA_MASK ((1ULL << HTIF_DATA_BITS) - 1) #define HTIF_DATA_SHIFT 0 diff --git a/drivers/serial/serial_xen.c b/drivers/serial/serial_xen.c index e05805f6372..4ba8d3ee641 100644 --- a/drivers/serial/serial_xen.c +++ b/drivers/serial/serial_xen.c @@ -7,7 +7,6 @@ #include <dm.h> #include <serial.h> #include <watchdog.h> -#include <asm/global_data.h> #include <linux/bug.h> @@ -20,8 +19,6 @@ #include <xen/interface/io/console.h> #include <xen/interface/io/ring.h> -DECLARE_GLOBAL_DATA_PTR; - u32 console_evtchn; /* diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c index b6b92d3530d..7a50d5a5792 100644 --- a/drivers/smem/msm_smem.c +++ b/drivers/smem/msm_smem.c @@ -7,7 +7,6 @@ #include <errno.h> #include <dm.h> -#include <asm/global_data.h> #include <dm/device_compat.h> #include <dm/devres.h> #include <dm/of_access.h> @@ -20,8 +19,6 @@ #include <linux/sizes.h> #include <smem.h> -DECLARE_GLOBAL_DATA_PTR; - /* * The Qualcomm shared memory system is an allocate-only heap structure that * consists of one of more memory areas that can be accessed by the processors diff --git a/drivers/spi/ca_sflash.c b/drivers/spi/ca_sflash.c index db32e39add2..f00df93a5f5 100644 --- a/drivers/spi/ca_sflash.c +++ b/drivers/spi/ca_sflash.c @@ -21,9 +21,6 @@ #include <spi.h> #include <spi-mem.h> #include <reset.h> -#include <asm/global_data.h> - -DECLARE_GLOBAL_DATA_PTR; struct ca_sflash_regs { u32 idr; /* 0x00:Flash word ID Register */ diff --git a/drivers/spi/microchip_coreqspi.c b/drivers/spi/microchip_coreqspi.c index a84b257fb1a..b3ff611e8f7 100644 --- a/drivers/spi/microchip_coreqspi.c +++ b/drivers/spi/microchip_coreqspi.c @@ -18,8 +18,6 @@ #include <linux/sizes.h> #include <asm/gpio.h> -DECLARE_GLOBAL_DATA_PTR; - /* * QSPI Control register mask defines */ diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c index fde9b142fb8..79836d7e271 100644 --- a/drivers/spi/mvebu_a3700_spi.c +++ b/drivers/spi/mvebu_a3700_spi.c @@ -11,14 +11,11 @@ #include <spi.h> #include <clk.h> #include <wait_bit.h> -#include <asm/global_data.h> #include <asm/io.h> #include <dm/device_compat.h> #include <linux/bitops.h> #include <asm/gpio.h> -DECLARE_GLOBAL_DATA_PTR; - #define MVEBU_SPI_A3700_XFER_RDY BIT(1) #define MVEBU_SPI_A3700_FIFO_FLUSH BIT(9) #define MVEBU_SPI_A3700_BYTE_LEN BIT(5) diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 35bd8766097..b2d115aded4 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -20,13 +20,10 @@ #include <spi.h> #include <time.h> #include <malloc.h> -#include <asm/global_data.h> #include <asm/io.h> #include <linux/bitops.h> #include <omap3_spi.h> -DECLARE_GLOBAL_DATA_PTR; - struct omap2_mcspi_platform_config { unsigned int regs_offset; }; diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c index e00532a371b..0bdc112d249 100644 --- a/drivers/spi/spi-sunxi.c +++ b/drivers/spi/spi-sunxi.c @@ -26,7 +26,6 @@ #include <fdt_support.h> #include <reset.h> #include <wait_bit.h> -#include <asm/global_data.h> #include <dm/device_compat.h> #include <linux/bitops.h> @@ -35,8 +34,6 @@ #include <linux/iopoll.h> -DECLARE_GLOBAL_DATA_PTR; - /* sun4i spi registers */ #define SUN4I_RXDATA_REG 0x00 #define SUN4I_TXDATA_REG 0x04 diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c index a3c0ad17121..66c97da610b 100644 --- a/drivers/spi/spi-synquacer.c +++ b/drivers/spi/spi-synquacer.c @@ -99,8 +99,6 @@ #define TXBIT 1 #define RXBIT 2 -DECLARE_GLOBAL_DATA_PTR; - struct synquacer_spi_plat { void __iomem *base; bool aces, rtm; diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index 49b584c648d..60401633341 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -12,14 +12,11 @@ #include <spi.h> #include <spi-mem.h> #include <dm/device_compat.h> -#include <asm/global_data.h> #include <dm/device-internal.h> #include <dm/uclass-internal.h> #include <dm/lists.h> #include <dm/util.h> -DECLARE_GLOBAL_DATA_PTR; - #define SPI_DEFAULT_SPEED_HZ 100000 static int spi_set_speed_mode(struct udevice *bus, int speed, int mode) diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c index b969a7993d4..0f77fbc8d41 100644 --- a/drivers/spi/tegra210_qspi.c +++ b/drivers/spi/tegra210_qspi.c @@ -9,7 +9,6 @@ #include <dm.h> #include <log.h> #include <time.h> -#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch-tegra/clk_rst.h> @@ -19,8 +18,6 @@ #include <linux/delay.h> #include "tegra_spi.h" -DECLARE_GLOBAL_DATA_PTR; - /* COMMAND1 */ #define QSPI_CMD1_GO BIT(31) #define QSPI_CMD1_M_S BIT(30) diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c index f3cd98c3db8..b89dd0b406b 100644 --- a/drivers/spmi/spmi-msm.c +++ b/drivers/spmi/spmi-msm.c @@ -10,13 +10,10 @@ #include <dm.h> #include <errno.h> #include <fdtdec.h> -#include <asm/global_data.h> #include <asm/io.h> #include <dm/device_compat.h> #include <spmi/spmi.h> -DECLARE_GLOBAL_DATA_PTR; - /* PMIC Arbiter configuration registers */ #define PMIC_ARB_VERSION 0x0000 #define PMIC_ARB_VERSION_V2_MIN 0x20010000 diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index c8389d507ee..1bde4d07f52 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/imx_tmu.c @@ -5,7 +5,6 @@ */ #include <config.h> -#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> @@ -19,8 +18,6 @@ #include <malloc.h> #include <thermal.h> -DECLARE_GLOBAL_DATA_PTR; - #define SITES_MAX 16 #define FLAGS_VER2 0x1 #define FLAGS_VER3 0x2 diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c index 314f956cdfb..3841d3c90d0 100644 --- a/drivers/timer/ostm_timer.c +++ b/drivers/timer/ostm_timer.c @@ -7,7 +7,6 @@ #include <clock_legacy.h> #include <malloc.h> -#include <asm/global_data.h> #include <asm/io.h> #include <dm.h> #include <clk.h> @@ -22,8 +21,6 @@ #define OSTM_CTL 0x20 #define OSTM_CTL_D BIT(1) -DECLARE_GLOBAL_DATA_PTR; - struct ostm_priv { fdt_addr_t regs; }; diff --git a/drivers/timer/sp804_timer.c b/drivers/timer/sp804_timer.c index 3e57f4b98ba..05532e3330c 100644 --- a/drivers/timer/sp804_timer.c +++ b/drivers/timer/sp804_timer.c @@ -8,15 +8,12 @@ #include <dm.h> #include <init.h> #include <log.h> -#include <asm/global_data.h> #include <dm/ofnode.h> #include <mapmem.h> #include <dt-structs.h> #include <timer.h> #include <asm/io.h> -DECLARE_GLOBAL_DATA_PTR; - #define SP804_TIMERX_LOAD 0x00 #define SP804_TIMERX_VALUE 0x04 #define SP804_TIMERX_CONTROL 0x08 diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c index 13e9a61072a..22aa6525c96 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c @@ -7,14 +7,11 @@ */ #include <dm.h> -#include <asm/global_data.h> #include <linux/printk.h> #include <linux/usb/otg.h> #include <linux/usb/ch9.h> #include <linux/usb/phy.h> -DECLARE_GLOBAL_DATA_PTR; - static const char *const usb_dr_modes[] = { [USB_DR_MODE_UNKNOWN] = "", [USB_DR_MODE_HOST] = "host", diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c index ce9a7b5b819..bdbd0d44813 100644 --- a/drivers/usb/phy/rockchip_usb2_phy.c +++ b/drivers/usb/phy/rockchip_usb2_phy.c @@ -5,15 +5,12 @@ #include <hang.h> #include <log.h> -#include <asm/global_data.h> #include <asm/io.h> #include <linux/bitops.h> #include <linux/delay.h> #include "../gadget/dwc2_udc_otg_priv.h" -DECLARE_GLOBAL_DATA_PTR; - #define BIT_WRITEABLE_SHIFT 16 struct usb2phy_reg { diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c index 0aee57cb2f4..3061b466d7c 100644 --- a/drivers/usb/tcpm/tcpm.c +++ b/drivers/usb/tcpm/tcpm.c @@ -19,8 +19,6 @@ #include <usb/tcpm.h> #include "tcpm-internal.h" -DECLARE_GLOBAL_DATA_PTR; - const char * const tcpm_states[] = { FOREACH_TCPM_STATE(GENERATE_TCPM_STRING) }; diff --git a/drivers/video/hx8238d.c b/drivers/video/hx8238d.c index f0220e4cc07..b6980b1aec1 100644 --- a/drivers/video/hx8238d.c +++ b/drivers/video/hx8238d.c @@ -16,8 +16,6 @@ #include <panel.h> #include <spi.h> -DECLARE_GLOBAL_DATA_PTR; - /* Register Address */ #define HX8238D_OUTPUT_CTRL_ADDR 0x01 #define HX8238D_LCD_AC_CTRL_ADDR 0x02 diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index ab416fdd33c..ef5d4faf3b3 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -21,7 +21,6 @@ #include "ipu_regs.h" #include "mxcfb.h" #include <asm/cache.h> -#include <asm/global_data.h> #include <asm/io.h> #include <asm/mach-imx/video.h> #include <linux/err.h> @@ -37,8 +36,6 @@ #include <dm/devres.h> #include <video.h> -DECLARE_GLOBAL_DATA_PTR; - static int mxcfb_map_video_memory(struct fb_info *fbi); static int mxcfb_unmap_video_memory(struct fb_info *fbi); diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c index ea3776258a0..e0416b70ec0 100644 --- a/drivers/video/nexell_display.c +++ b/drivers/video/nexell_display.c @@ -16,14 +16,11 @@ #include <linux/compat.h> #include <linux/err.h> #include <video.h> /* For struct video_uc_plat */ -#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/display.h> #include <asm/arch/display_dev.h> #include "videomodes.h" -DECLARE_GLOBAL_DATA_PTR; - #if !defined(CONFIG_DM) && !defined(CONFIG_OF_CONTROL) static struct nx_display_dev *dp_dev; #endif diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c index c969dae30b6..97c8619a6d8 100644 --- a/drivers/video/rockchip/rk_lvds.c +++ b/drivers/video/rockchip/rk_lvds.c @@ -10,7 +10,6 @@ #include <panel.h> #include <regmap.h> #include <syscon.h> -#include <asm/global_data.h> #include <asm/gpio.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/grf_rk3288.h> @@ -19,8 +18,6 @@ #include <dt-bindings/clock/rk3288-cru.h> #include <dt-bindings/video/rk3288.h> -DECLARE_GLOBAL_DATA_PTR; - /** * struct rk_lvds_priv - private rockchip lvds display driver info * diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c index 0a603083ba9..e7b5973ca58 100644 --- a/drivers/video/rockchip/rk_mipi.c +++ b/drivers/video/rockchip/rk_mipi.c @@ -10,7 +10,6 @@ #include <log.h> #include <panel.h> #include <regmap.h> -#include <asm/global_data.h> #include "rk_mipi.h" #include <syscon.h> #include <asm/gpio.h> @@ -22,8 +21,6 @@ #include <asm/arch-rockchip/grf_rk3399.h> #include <asm/arch-rockchip/rockchip_mipi_dsi.h> -DECLARE_GLOBAL_DATA_PTR; - int rk_mipi_read_timing(struct udevice *dev, struct display_timing *timing) { diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c index 69dfa930273..48da350080a 100644 --- a/drivers/video/sandbox_sdl.c +++ b/drivers/video/sandbox_sdl.c @@ -7,15 +7,12 @@ #include <fdtdec.h> #include <log.h> #include <video.h> -#include <asm/global_data.h> #include <asm/sdl.h> #include <asm/state.h> #include <asm/u-boot-sandbox.h> #include <dm/device-internal.h> #include <dm/test.h> -DECLARE_GLOBAL_DATA_PTR; - enum { /* Default LCD size we support */ LCD_MAX_WIDTH = 1366, diff --git a/drivers/video/tidss/tidss_drv.c b/drivers/video/tidss/tidss_drv.c index 790ff6e591c..c231fd0341e 100644 --- a/drivers/video/tidss/tidss_drv.c +++ b/drivers/video/tidss/tidss_drv.c @@ -42,8 +42,6 @@ #include "tidss_regs.h" #include "tidss_oldi.h" -DECLARE_GLOBAL_DATA_PTR; - /* Panel parameters */ enum { LCD_MAX_WIDTH = 1920, diff --git a/drivers/video/zynqmp/zynqmp_dpsub.c b/drivers/video/zynqmp/zynqmp_dpsub.c index a0efd3393f5..fba65bb3d5b 100644 --- a/drivers/video/zynqmp/zynqmp_dpsub.c +++ b/drivers/video/zynqmp/zynqmp_dpsub.c @@ -20,12 +20,9 @@ #include <linux/delay.h> #include <linux/ioport.h> #include <dm/device_compat.h> -#include <asm/global_data.h> #include "zynqmp_dpsub.h" -DECLARE_GLOBAL_DATA_PTR; - /* Maximum supported resolution */ #define WIDTH 1024 #define HEIGHT 768 diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c index 4b51178e1b8..d7a6b8de492 100644 --- a/drivers/watchdog/armada-37xx-wdt.c +++ b/drivers/watchdog/armada-37xx-wdt.c @@ -7,14 +7,11 @@ #include <dm.h> #include <wdt.h> -#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <dm/device_compat.h> -DECLARE_GLOBAL_DATA_PTR; - struct a37xx_wdt { void __iomem *sel_reg; void __iomem *reg; diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 72e13787448..2fb25126b8c 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -15,7 +15,6 @@ */ #include <log.h> -#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/at91_wdt.h> #include <div64.h> @@ -23,8 +22,6 @@ #include <errno.h> #include <wdt.h> -DECLARE_GLOBAL_DATA_PTR; - /* * AT91SAM9 watchdog runs a 12bit counter @ 256Hz, * use this to convert a watchdog diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c index 6308d9632a8..08ef3d84e26 100644 --- a/drivers/watchdog/mt7621_wdt.c +++ b/drivers/watchdog/mt7621_wdt.c @@ -11,12 +11,9 @@ #include <dm.h> #include <wdt.h> -#include <asm/global_data.h> #include <linux/bitops.h> #include <linux/io.h> -DECLARE_GLOBAL_DATA_PTR; - struct mt762x_wdt { void __iomem *regs; }; diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index 4562b2a37e3..a2000b968c9 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -16,15 +16,12 @@ #include <clk.h> #include <log.h> #include <wdt.h> -#include <asm/global_data.h> #include <linux/bitops.h> #include <linux/kernel.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> -DECLARE_GLOBAL_DATA_PTR; - struct orion_wdt_priv { void __iomem *reg; int wdt_counter_offset; diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 03585529bb6..807884c5bc7 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -5,7 +5,6 @@ * Copyright 2020 NXP */ -#include <asm/global_data.h> #include <asm/io.h> #include <dm/device.h> #include <dm/fdtaddr.h> @@ -15,8 +14,6 @@ #include <watchdog.h> #include <wdt.h> -DECLARE_GLOBAL_DATA_PTR; - /* SBSA Generic Watchdog register definitions */ /* refresh frame */ #define SBSA_GWDT_WRR 0x000 diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index b32590069d9..438833b2245 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -14,13 +14,10 @@ #include <sysreset.h> #include <time.h> #include <wdt.h> -#include <asm/global_data.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <linux/kernel.h> -DECLARE_GLOBAL_DATA_PTR; - #define WATCHDOG_TIMEOUT_SECS (CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000) struct wdt_priv { |
