aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-18 13:50:47 -0400
committerTom Rini <trini@konsulko.com>2018-04-27 14:54:48 -0400
commitd024236e5a31a2b4b82cbcc98b31b8170fc88d28 (patch)
treeab4d96f1b0c5e3991b97708f72679a7af7234222 /drivers
parentf1b1f77060beadbfe9f42a3be00019bd025afbd6 (diff)
downloadu-boot-d024236e5a31a2b4b82cbcc98b31b8170fc88d28.zip
u-boot-d024236e5a31a2b4b82cbcc98b31b8170fc88d28.tar.gz
u-boot-d024236e5a31a2b4b82cbcc98b31b8170fc88d28.tar.bz2
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/adc/adc-uclass.c2
-rw-r--r--drivers/ata/dwc_ahci.c2
-rw-r--r--drivers/clk/at91/clk-plladiv.c2
-rw-r--r--drivers/clk/at91/clk-utmi.c2
-rw-r--r--drivers/clk/at91/sckc.c2
-rw-r--r--drivers/clk/clk-hsdk-cgu.c2
-rw-r--r--drivers/clk/clk_stm32h7.c2
-rw-r--r--drivers/clk/clk_zynqmp.c2
-rw-r--r--drivers/clk/exynos/clk-exynos7420.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3128.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3188.c2
-rw-r--r--drivers/clk/rockchip/clk_rk322x.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3328.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3368.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c2
-rw-r--r--drivers/clk/rockchip/clk_rv1108.c2
-rw-r--r--drivers/cpu/cpu-uclass.c2
-rw-r--r--drivers/ddr/altera/sdram.c2
-rw-r--r--drivers/ddr/fsl/main.c2
-rw-r--r--drivers/dma/dma-uclass.c2
-rw-r--r--drivers/fpga/socfpga.c2
-rw-r--r--drivers/fpga/socfpga_arria10.c2
-rw-r--r--drivers/fpga/socfpga_gen5.c2
-rw-r--r--drivers/gpio/hsdk-creg-gpio.c2
-rw-r--r--drivers/gpio/imx_rgpio2p.c2
-rw-r--r--drivers/gpio/mvebu_gpio.c2
-rw-r--r--drivers/gpio/mxc_gpio.c2
-rw-r--r--drivers/gpio/pm8916_gpio.c2
-rw-r--r--drivers/gpio/sandbox.c2
-rw-r--r--drivers/gpio/sunxi_gpio.c2
-rw-r--r--drivers/gpio/tegra186_gpio.c2
-rw-r--r--drivers/gpio/tegra_gpio.c2
-rw-r--r--drivers/i2c/ast_i2c.c2
-rw-r--r--drivers/i2c/i2c-cdns.c2
-rw-r--r--drivers/i2c/imx_lpi2c.c1
-rw-r--r--drivers/i2c/omap24xx_i2c.c2
-rw-r--r--drivers/i2c/rk_i2c.c2
-rw-r--r--drivers/i2c/sandbox_i2c.c2
-rw-r--r--drivers/i2c/stm32f7_i2c.c2
-rw-r--r--drivers/i2c/tegra_i2c.c2
-rw-r--r--drivers/input/cros_ec_keyb.c2
-rw-r--r--drivers/input/tegra-kbc.c2
-rw-r--r--drivers/led/led_gpio.c2
-rw-r--r--drivers/mailbox/mailbox-uclass.c2
-rw-r--r--drivers/mailbox/tegra-hsp.c2
-rw-r--r--drivers/misc/cros_ec.c2
-rw-r--r--drivers/misc/cros_ec_sandbox.c2
-rw-r--r--drivers/misc/cros_ec_spi.c2
-rw-r--r--drivers/misc/i2c_eeprom_emul.c2
-rw-r--r--drivers/misc/spltest_sandbox.c2
-rw-r--r--drivers/misc/syscon_sandbox.c2
-rw-r--r--drivers/mmc/arm_pl180_mmci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhost.c2
-rw-r--r--drivers/mmc/gen_atmel_mci.c2
-rw-r--r--drivers/mmc/mmc-uclass.c2
-rw-r--r--drivers/mmc/rockchip_dw_mmc.c2
-rw-r--r--drivers/mmc/rockchip_sdhci.c1
-rw-r--r--drivers/mmc/sandbox_mmc.c2
-rw-r--r--drivers/mmc/stm32_sdmmc2.c2
-rw-r--r--drivers/mmc/tegra_mmc.c2
-rw-r--r--drivers/mtd/nand/nand.c2
-rw-r--r--drivers/mtd/spi/sandbox.c2
-rw-r--r--drivers/mtd/spi/spi_flash.c2
-rw-r--r--drivers/net/designware.c2
-rw-r--r--drivers/net/fsl_mcdmafec.c2
-rw-r--r--drivers/net/gmac_rockchip.c2
-rw-r--r--drivers/net/lpc32xx_eth.c2
-rw-r--r--drivers/net/mcffec.c2
-rw-r--r--drivers/net/netconsole.c2
-rw-r--r--drivers/net/phy/micrel_ksz8xxx.c2
-rw-r--r--drivers/net/phy/micrel_ksz90x1.c2
-rw-r--r--drivers/pch/pch-uclass.c2
-rw-r--r--drivers/pci/pci-aardvark.c2
-rw-r--r--drivers/pci/pci-emul-uclass.c2
-rw-r--r--drivers/pci/pci_sandbox.c2
-rw-r--r--drivers/pci/pci_tegra.c2
-rw-r--r--drivers/phy/meson-gxl-usb2.c2
-rw-r--r--drivers/phy/meson-gxl-usb3.c2
-rw-r--r--drivers/phy/phy-uclass.c2
-rw-r--r--drivers/phy/sandbox-phy.c2
-rw-r--r--drivers/pinctrl/aspeed/pinctrl_ast2500.c2
-rw-r--r--drivers/pinctrl/exynos/pinctrl-exynos7420.c2
-rw-r--r--drivers/pinctrl/renesas/pfc.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3036.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3328.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3368.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3399.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rv1108.c2
-rw-r--r--drivers/power/domain/power-domain-uclass.c2
-rw-r--r--drivers/power/pmic/act8846.c2
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c2
-rw-r--r--drivers/power/pmic/lp873x.c2
-rw-r--r--drivers/power/pmic/lp87565.c2
-rw-r--r--drivers/power/pmic/max77686.c2
-rw-r--r--drivers/power/pmic/max8997.c2
-rw-r--r--drivers/power/pmic/max8998.c2
-rw-r--r--drivers/power/pmic/palmas.c2
-rw-r--r--drivers/power/pmic/pfuze100.c2
-rw-r--r--drivers/power/pmic/pm8916.c2
-rw-r--r--drivers/power/pmic/pmic-uclass.c2
-rw-r--r--drivers/power/pmic/pmic_tps65910_dm.c2
-rw-r--r--drivers/power/pmic/rk8xx.c2
-rw-r--r--drivers/power/pmic/s2mps11.c2
-rw-r--r--drivers/power/pmic/s5m8767.c2
-rw-r--r--drivers/power/pmic/sandbox.c2
-rw-r--r--drivers/power/pmic/tps65090.c2
-rw-r--r--drivers/power/regulator/fixed.c2
-rw-r--r--drivers/power/regulator/lp873x_regulator.c2
-rw-r--r--drivers/power/regulator/lp87565_regulator.c2
-rw-r--r--drivers/power/regulator/max77686.c2
-rw-r--r--drivers/power/regulator/palmas_regulator.c2
-rw-r--r--drivers/power/regulator/pbias_regulator.c2
-rw-r--r--drivers/power/regulator/regulator-uclass.c2
-rw-r--r--drivers/power/regulator/s2mps11_regulator.c2
-rw-r--r--drivers/power/regulator/s5m8767.c2
-rw-r--r--drivers/power/regulator/sandbox.c2
-rw-r--r--drivers/pwm/exynos_pwm.c2
-rw-r--r--drivers/pwm/rk_pwm.c2
-rw-r--r--drivers/pwm/sandbox_pwm.c2
-rw-r--r--drivers/pwm/tegra_pwm.c2
-rw-r--r--drivers/ram/rockchip/dmc-rk3368.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3128.c1
-rw-r--r--drivers/ram/rockchip/sdram_rk3188.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3288.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3328.c1
-rw-r--r--drivers/ram/rockchip/sdram_rk3399.c1
-rw-r--r--drivers/ram/stm32_sdram.c2
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ram.c2
-rw-r--r--drivers/reset/ast2500-reset.c2
-rw-r--r--drivers/reset/reset-uclass.c2
-rw-r--r--drivers/rtc/i2c_rtc_emul.c2
-rw-r--r--drivers/serial/altera_jtag_uart.c2
-rw-r--r--drivers/serial/lpc32xx_hsuart.c2
-rw-r--r--drivers/serial/serial_meson.c2
-rw-r--r--drivers/serial/serial_stm32.c2
-rw-r--r--drivers/serial/serial_xuartlite.c2
-rw-r--r--drivers/serial/serial_zynq.c2
-rw-r--r--drivers/spi/altera_spi.c2
-rw-r--r--drivers/spi/atmel_spi.c2
-rw-r--r--drivers/spi/rk_spi.c2
-rw-r--r--drivers/spi/sandbox_spi.c2
-rw-r--r--drivers/spi/tegra114_spi.c2
-rw-r--r--drivers/spmi/spmi-sandbox.c2
-rw-r--r--drivers/spmi/spmi-uclass.c2
-rw-r--r--drivers/sysreset/sysreset_sandbox.c2
-rw-r--r--drivers/timer/ag101p_timer.c2
-rw-r--r--drivers/timer/altera_timer.c2
-rw-r--r--drivers/timer/ast_timer.c2
-rw-r--r--drivers/timer/atcpit100_timer.c2
-rw-r--r--drivers/timer/omap-timer.c2
-rw-r--r--drivers/tpm/tpm_tis_infineon.c2
-rw-r--r--drivers/usb/emul/sandbox_flash.c2
-rw-r--r--drivers/usb/emul/sandbox_hub.c2
-rw-r--r--drivers/usb/emul/sandbox_keyb.c2
-rw-r--r--drivers/usb/emul/usb-emul-uclass.c2
-rw-r--r--drivers/usb/host/dwc2.c2
-rw-r--r--drivers/usb/host/dwc3-of-simple.c2
-rw-r--r--drivers/usb/host/ehci-atmel.c2
-rw-r--r--drivers/usb/host/ehci-tegra.c2
-rw-r--r--drivers/usb/host/usb-sandbox.c2
-rw-r--r--drivers/usb/host/usb-uclass.c2
-rw-r--r--drivers/usb/host/xhci-dwc3.c2
-rw-r--r--drivers/usb/host/xhci-fsl.c2
-rw-r--r--drivers/usb/host/xhci-mvebu.c2
-rw-r--r--drivers/usb/host/xhci-omap.c2
-rw-r--r--drivers/usb/host/xhci-rockchip.c2
-rw-r--r--drivers/usb/host/xhci-zynqmp.c2
-rw-r--r--drivers/video/backlight_gpio.c2
-rw-r--r--drivers/video/bridge/anx6345.c2
-rw-r--r--drivers/video/exynos/exynos_dp_lowlevel.c2
-rw-r--r--drivers/video/mx3fb.c2
-rw-r--r--drivers/video/pwm_backlight.c2
-rw-r--r--drivers/video/rockchip/rk3288_mipi.c2
-rw-r--r--drivers/video/rockchip/rk3399_mipi.c2
-rw-r--r--drivers/video/rockchip/rk_edp.c2
-rw-r--r--drivers/video/simple_panel.c2
-rw-r--r--drivers/video/tegra124/display.c2
-rw-r--r--drivers/video/tegra124/dp.c2
-rw-r--r--drivers/video/tegra124/sor.c2
-rw-r--r--drivers/watchdog/ast_wdt.c2
-rw-r--r--drivers/watchdog/mpc8xx_wdt.c2
-rw-r--r--drivers/watchdog/sandbox_wdt.c2
-rw-r--r--drivers/watchdog/ulp_wdog.c2
-rw-r--r--drivers/watchdog/wdt-uclass.c2
185 files changed, 0 insertions, 365 deletions
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index a4c20f4..7e9ad85 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -14,8 +14,6 @@
#include <adc.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ADC_UCLASS_PLATDATA_SIZE sizeof(struct adc_uclass_platdata)
#define CHECK_NUMBER true
#define CHECK_MASK (!CHECK_NUMBER)
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 6c7371e..bb45214 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -18,8 +18,6 @@
#include <asm/io.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dwc_ahci_priv {
void *base;
void *wrapper_base;
diff --git a/drivers/clk/at91/clk-plladiv.c b/drivers/clk/at91/clk-plladiv.c
index 0599d28..520fd13 100644
--- a/drivers/clk/at91/clk-plladiv.c
+++ b/drivers/clk/at91/clk-plladiv.c
@@ -12,8 +12,6 @@
#include <mach/at91_pmc.h>
#include "pmc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int at91_plladiv_clk_enable(struct clk *clk)
{
return 0;
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
index 875bf29..54970b9 100644
--- a/drivers/clk/at91/clk-utmi.c
+++ b/drivers/clk/at91/clk-utmi.c
@@ -14,8 +14,6 @@
#include <mach/sama5_sfr.h>
#include "pmc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The purpose of this clock is to generate a 480 MHz signal. A different
* rate can't be configured.
diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index 0c08812..de8013e 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct udevice_id at91_sckc_match[] = {
{ .compatible = "atmel,at91sam9x5-sckc" },
{}
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 4362d58..56ef08c 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -59,8 +59,6 @@
* |---------------------------->
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define CGU_ARC_IDIV 0x080
#define CGU_TUN_IDIV_TUN 0x380
#define CGU_TUN_IDIV_ROM 0x390
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/clk_stm32h7.c
index 9ee2e2e..5516b48 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -15,8 +15,6 @@
#include <dt-bindings/clock/stm32h7-clks.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* RCC CR specific definitions */
#define RCC_CR_HSION BIT(0)
#define RCC_CR_HSIRDY BIT(2)
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index d0d6c89..3f24975 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -13,8 +13,6 @@
#include <asm/arch/sys_proto.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const resource_size_t zynqmp_crf_apb_clkc_base = 0xfd1a0020;
static const resource_size_t zynqmp_crl_apb_clkc_base = 0xff5e0020;
diff --git a/drivers/clk/exynos/clk-exynos7420.c b/drivers/clk/exynos/clk-exynos7420.c
index e34945d..832b2d8 100644
--- a/drivers/clk/exynos/clk-exynos7420.c
+++ b/drivers/clk/exynos/clk-exynos7420.c
@@ -14,8 +14,6 @@
#include <dt-bindings/clock/exynos7420-clk.h>
#include "clk-pll.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DIVIDER(reg, shift, mask) \
(((readl(reg) >> shift) & mask) + 1)
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 5e11318..c8aab7b 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -17,8 +17,6 @@
#include <dt-bindings/clock/rk3036-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 7b479e7..b4dd8d2 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -18,8 +18,6 @@
#include <dt-bindings/clock/rk3128-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index cfe6abe..e6bf044 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -23,8 +23,6 @@
#include <dm/uclass-internal.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum rk3188_clk_type {
RK3188_CRU,
RK3188A_CRU,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index ebcab73..91f5208 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -17,8 +17,6 @@
#include <dt-bindings/clock/rk3228-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 3200U * 1000000,
VCO_MIN_HZ = 800 * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 046b4e4..f9a1e96 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -18,8 +18,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3328-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pll_div {
u32 refdiv;
u32 fbdiv;
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index ea00f1f..e5a14ba 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -20,8 +20,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3368-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3368_clk_plat {
struct dtd_rockchip_rk3368_cru dtd;
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index fb74c44..86d8ca5 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -20,8 +20,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3399-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_clk_plat {
struct dtd_rockchip_rk3399_cru dtd;
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 42341a8..1cd8ab5 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -17,8 +17,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rv1108-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 73e4853..e47377a 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -12,8 +12,6 @@
#include <dm/lists.h>
#include <dm/root.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int cpu_get_desc(struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);
diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c
index e74c5b0..0f688f9 100644
--- a/drivers/ddr/altera/sdram.c
+++ b/drivers/ddr/altera/sdram.c
@@ -12,8 +12,6 @@
#include <asm/arch/system_manager.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sdram_prot_rule {
u32 sdram_start; /* SDRAM start address */
u32 sdram_end; /* SDRAM end address */
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index d0a7b3f..61bbce9 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -15,8 +15,6 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
* of DDR controllers. It is the same as CONFIG_SYS_DDR_SDRAM_BASE for
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 3d0ce22..7f92d24 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -16,8 +16,6 @@
#include <dm/device-internal.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int dma_get_device(u32 transfer_type, struct udevice **devp)
{
struct udevice *dev;
diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 6e14ebd..aef796c 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -12,8 +12,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Timeout count */
#define FPGA_TIMEOUT_CNT 0x1000000
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 685e8e2..ee18675 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -23,8 +23,6 @@
#define FPGA_TIMEOUT_MSEC 1000 /* timeout in ms */
#define FPGA_TIMEOUT_CNT 0x1000000
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_fpga_manager *fpga_manager_base =
(void *)SOCFPGA_FPGAMGRREGS_ADDRESS;
diff --git a/drivers/fpga/socfpga_gen5.c b/drivers/fpga/socfpga_gen5.c
index 3dfb030..88ae035 100644
--- a/drivers/fpga/socfpga_gen5.c
+++ b/drivers/fpga/socfpga_gen5.c
@@ -12,8 +12,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define FPGA_TIMEOUT_CNT 0x1000000
static struct socfpga_fpga_manager *fpgamgr_regs =
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 8ca807a..084a2da 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -16,8 +16,6 @@
#include <errno.h>
#include <linux/printk.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define HSDK_CREG_MAX_GPIO 8
#define GPIO_ACTIVATE 0x2
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 7825714..0de74cb 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -14,8 +14,6 @@
#include <asm/io.h>
#include <malloc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum imx_rgpio2p_direction {
IMX_RGPIO2P_DIRECTION_IN,
IMX_RGPIO2P_DIRECTION_OUT,
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 85dea14..79942ff 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -10,8 +10,6 @@
#include <asm/io.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MVEBU_GPIOS_PER_BANK 32
struct mvebu_gpio_regs {
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index d0e365a..c6427d7 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -158,8 +158,6 @@ int gpio_direction_output(unsigned gpio, int value)
#ifdef CONFIG_DM_GPIO
#include <fdtdec.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int mxc_gpio_is_output(struct gpio_regs *regs, int offset)
{
u32 val;
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 42f068e..3b6de9d 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -14,8 +14,6 @@
#include <asm/gpio.h>
#include <linux/bitops.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Register offset for each gpio */
#define REG_OFFSET(x) ((x) * 0x100)
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 2a18f32..02f2a24 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -11,8 +11,6 @@
#include <dm/of.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Flags for each GPIO */
#define GPIOF_OUTPUT (1 << 0) /* Currently set as an output */
#define GPIOF_HIGH (1 << 1) /* Currently set high */
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index ea6f359..706afce 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -21,8 +21,6 @@
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define SUNXI_GPIOS_PER_BANK SUNXI_GPIO_A_NR
struct sunxi_gpio_platdata {
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c
index deb59e8..6d610ef 100644
--- a/drivers/gpio/tegra186_gpio.c
+++ b/drivers/gpio/tegra186_gpio.c
@@ -17,8 +17,6 @@
#include <dt-bindings/gpio/gpio.h>
#include "tegra186_gpio_priv.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra186_gpio_port_data {
const char *name;
uint32_t offset;
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index 4965583..faf950e 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -23,8 +23,6 @@
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const int CONFIG_SFIO = 0;
static const int CONFIG_GPIO = 1;
static const int DIRECTION_INPUT = 0;
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 7ed0c10..d632971 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -22,8 +22,6 @@
#define HIGHSPEED_TTIMEOUT 3
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Device private data
*/
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 8265ce3..a977a7f 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -19,8 +19,6 @@
#include <mapmem.h>
#include <wait_bit.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* i2c register set */
struct cdns_i2c_regs {
u32 control;
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index 32d7809..937410f 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -15,7 +15,6 @@
#include <fdtdec.h>
#include <i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
#define LPI2C_FIFO_SIZE 4
#define LPI2C_TIMEOUT_MS 100
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 5d33815..0759585 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -47,8 +47,6 @@
#include "omap24xx_i2c.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define I2C_TIMEOUT 1000
/* Absolutely safe for status update at 100 kHz I2C: */
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 332280c..a09adcd 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -19,8 +19,6 @@
#include <dm/pinctrl.h>
#include <linux/sizes.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* i2c timerout */
#define I2C_TIMEOUT_MS 100
#define I2C_RETRY_COUNT 3
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index f5978fd..6e02dac 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -14,8 +14,6 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_i2c_priv {
bool test_mode;
};
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 81f061a..5ca0b7d 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -244,8 +244,6 @@ static struct stm32_i2c_setup stm32f7_setup = {
.analog_filter = STM32_I2C_ANALOG_FILTER_ENABLE,
};
-DECLARE_GLOBAL_DATA_PTR;
-
static int stm32_i2c_check_device_busy(struct stm32_i2c_priv *i2c_priv)
{
struct stm32_i2c_regs *regs = i2c_priv->regs;
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 7d23e51..2d6cd02 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -20,8 +20,6 @@
#include <asm/arch/gpio.h>
#include <asm/arch-tegra/tegra_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum i2c_type {
TYPE_114,
TYPE_STD,
diff --git a/drivers/input/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index 6fa35a6..f0bf139 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -15,8 +15,6 @@
#include <key_matrix.h>
#include <stdio_dev.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
KBC_MAX_KEYS = 8, /* Maximum keys held down at once */
KBC_REPEAT_RATE_MS = 30,
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index cb56957..1c27683 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -19,8 +19,6 @@
#include <asm/arch-tegra/timer.h>
#include <linux/input.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
KBC_MAX_GPIO = 24,
KBC_MAX_KPENT = 8, /* size of keypress entry queue */
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index 9976635..5e0c524 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct led_gpio_priv {
struct gpio_desc gpio;
};
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index 822ae5b..d053db0 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -9,8 +9,6 @@
#include <mailbox.h>
#include <mailbox-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev)
{
return (struct mbox_ops *)dev->driver->ops;
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index bd2ec41..8d1df20 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -36,8 +36,6 @@ struct tegra_hsp {
uint32_t db_base;
};
-DECLARE_GLOBAL_DATA_PTR;
-
static uint32_t *tegra_hsp_reg(struct tegra_hsp *thsp, uint32_t db_id,
uint32_t reg)
{
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index eefaaa5..bed80dc 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -42,8 +42,6 @@ enum {
CROS_EC_CMD_HASH_TIMEOUT_MS = 2000,
};
-DECLARE_GLOBAL_DATA_PTR;
-
void cros_ec_dump_data(const char *name, int cmd, const uint8_t *data, int len)
{
#ifdef DEBUG
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 5924ade..1f1e23e 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -51,8 +51,6 @@
* the EC image in with U-Boot (Vic has demonstrated a prototype for this).
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define KEYBOARD_ROWS 8
#define KEYBOARD_COLS 13
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index 253d91a..51714a4 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -19,8 +19,6 @@
#include <errno.h>
#include <spi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int cros_ec_spi_packet(struct udevice *udev, int out_bytes, int in_bytes)
{
struct cros_ec_dev *dev = dev_get_uclass_priv(udev);
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 52aa7d6..6f84e81 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -19,8 +19,6 @@
#define debug_buffer(x, ...)
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_i2c_flash_plat_data {
enum sandbox_i2c_eeprom_test_mode test_mode;
const char *filename;
diff --git a/drivers/misc/spltest_sandbox.c b/drivers/misc/spltest_sandbox.c
index 1fef825..24aba78 100644
--- a/drivers/misc/spltest_sandbox.c
+++ b/drivers/misc/spltest_sandbox.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <dt-structs.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_spl_probe(struct udevice *dev)
{
struct dtd_sandbox_spl_test *plat = dev_get_platdata(dev);
diff --git a/drivers/misc/syscon_sandbox.c b/drivers/misc/syscon_sandbox.c
index ccfab3e..e78b6e4 100644
--- a/drivers/misc/syscon_sandbox.c
+++ b/drivers/misc/syscon_sandbox.c
@@ -12,8 +12,6 @@
#include <asm/test.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct udevice_id sandbox_syscon_ids[] = {
{ .compatible = "sandbox,syscon0", .data = SYSCON0 },
{ .compatible = "sandbox,syscon1", .data = SYSCON1 },
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 89a7c19..8664a37 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -25,8 +25,6 @@
#ifdef CONFIG_DM_MMC
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MMC_CLOCK_MAX 48000000
#define MMC_CLOCK_MIN 400000
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index bccd182..752c660 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -44,8 +44,6 @@
#include <mach/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define msleep(a) udelay(a * 1000)
#define SDCMD 0x00 /* Command to SD card - 16 R/W */
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 1c108b5..186b3d7 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -22,8 +22,6 @@
#include <asm/arch/hardware.h>
#include "atmel_mci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SYS_MMC_CLK_OD
# define CONFIG_SYS_MMC_CLK_OD 150000
#endif
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index a3536b1..0481e27 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -12,8 +12,6 @@
#include <dm/lists.h>
#include "mmc_private.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
struct mmc_data *data)
{
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 807dc9e..4ba1436 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -18,8 +18,6 @@
#include <asm/arch/periph.h>
#include <linux/err.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rockchip_mmc_plat {
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct dtd_rockchip_rk3288_dw_mshc dtplat;
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index ab89be4..8868f34 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -15,7 +15,6 @@
#include <sdhci.h>
#include <clk.h>
-DECLARE_GLOBAL_DATA_PTR;
/* 400KHz is max freq for card ID etc. Use that as min */
#define EMMC_MIN_FREQ 400000
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 8a5d256..0945beb 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -12,8 +12,6 @@
#include <mmc.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_mmc_plat {
struct mmc_config cfg;
struct mmc mmc;
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index f5b21dd..47afa26 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -189,8 +189,6 @@ struct stm32_sdmmc2_ctx {
#define SDMMC_CMD_TIMEOUT 0xFFFFFFFF
-DECLARE_GLOBAL_DATA_PTR;
-
static void stm32_sdmmc2_start_data(struct stm32_sdmmc2_priv *priv,
struct mmc_data *data,
struct stm32_sdmmc2_ctx *ctx)
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 7474529..ee63166 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -16,8 +16,6 @@
#include <asm/io.h>
#include <asm/arch-tegra/tegra_mmc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra_mmc_plat {
struct mmc_config cfg;
struct mmc mmc;
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 6aa909f..e422585 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -15,8 +15,6 @@
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
int nand_curr_device = -1;
static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 1ba6815..7893efe 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -24,8 +24,6 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The different states that our SPI flash transitions between.
* We need to keep track of this across multiple xfer calls since
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 5e5bd5d..b78a869 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -21,8 +21,6 @@
#include "sf_internal.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static void spi_flash_addr(u32 addr, u8 *cmd)
{
/* cmd[0] is actual command */
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 43670a7..765e356 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -23,8 +23,6 @@
#include <power/regulator.h>
#include "designware.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int dw_mdio_read(struct mii_dev *bus, int addr, int devad, int reg)
{
#ifdef CONFIG_DM_ETH
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 00d905c..ad7e051 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -38,8 +38,6 @@
#include "MCD_dma.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct fec_info_dma fec_info[] = {
#ifdef CONFIG_SYS_FEC0_IOBASE
{
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 683e820..5ed3049 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -25,8 +25,6 @@
#include <dt-bindings/clock/rk3288-cru.h>
#include "designware.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Platform data for the gmac
*
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index cbef335..1efe625 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -218,8 +218,6 @@ struct lpc32xx_eth_device {
#define MII_MAX_PHY (MADR_PHY_MASK >> MADR_PHY_OFFSET)
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_PHYLIB) || defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
/*
* mii_reg_read - miiphy_read callback function.
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 505a2d1..82838c6 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -33,8 +33,6 @@
#define BD_ENET_RX_W_E (BD_ENET_RX_WRAP | BD_ENET_RX_EMPTY)
#define BD_ENET_TX_RDY_LST (BD_ENET_TX_READY | BD_ENET_TX_LAST)
-DECLARE_GLOBAL_DATA_PTR;
-
struct fec_info_s fec_info[] = {
#ifdef CONFIG_SYS_FEC0_IOBASE
{
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 028fca9..11dbf53 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -10,8 +10,6 @@
#include <stdio_dev.h>
#include <net.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_NETCONSOLE_BUFFER_SIZE
#define CONFIG_NETCONSOLE_BUFFER_SIZE 512
#endif
diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c
index ec628bb..62a4431 100644
--- a/drivers/net/phy/micrel_ksz8xxx.c
+++ b/drivers/net/phy/micrel_ksz8xxx.c
@@ -15,8 +15,6 @@
#include <micrel.h>
#include <phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct phy_driver KSZ804_driver = {
.name = "Micrel KSZ804",
.uid = 0x221510,
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index b350a61..eb83ceb 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -17,8 +17,6 @@
#include <micrel.h>
#include <phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* KSZ9021 - KSZ9031 common
*/
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index af794eb..0d3ce7f 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <pch.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
{
struct pch_ops *ops = pch_get_ops(dev);
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 69a4d81..864ac16 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -131,8 +131,6 @@
#define CFG_RD_UR_VAL 0xFFFFFFFF
#define CFG_RD_CRS_VAL 0xFFFF0001
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct pcie_advk - Advk PCIe controller state
*
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index dcea192..f89acd4 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -12,8 +12,6 @@
#include <pci.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_pci_priv {
int dev_count;
};
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index 6a84ee3..cd7ed00 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -11,8 +11,6 @@
#include <inttypes.h>
#include <pci.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_pci_write_config(struct udevice *bus, pci_dev_t devfn,
uint offset, ulong value,
enum pci_size_t size)
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index b5bd25e..2829b96 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -43,8 +43,6 @@
* use the new standard APIs, with no ifdefs.
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define AFI_AXI_BAR0_SZ 0x00
#define AFI_AXI_BAR1_SZ 0x04
#define AFI_AXI_BAR2_SZ 0x08
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 15c9c89..de5a6ee 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -21,8 +21,6 @@
#include <linux/bitops.h>
#include <linux/compat.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* bits [31:27] are read-only */
#define U2P_R0 0x0
#define U2P_R0_BYPASS_SEL BIT(0)
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index a385fbd..a85d747 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -21,8 +21,6 @@
#include <linux/compat.h>
#include <linux/bitfield.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define USB_R0 0x00
#define USB_R0_P30_FSEL_MASK GENMASK(5, 0)
#define USB_R0_P30_PHY_RESET BIT(6)
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index 68e518f..bdca4c0 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
{
return (struct phy_ops *)dev->driver->ops;
diff --git a/drivers/phy/sandbox-phy.c b/drivers/phy/sandbox-phy.c
index 867c6fe..3ed6837 100644
--- a/drivers/phy/sandbox-phy.c
+++ b/drivers/phy/sandbox-phy.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_phy_priv {
bool initialized;
bool on;
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index 01f97c1..877f24b 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -12,8 +12,6 @@
#include <asm/arch/scu_ast2500.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver works with very simple configuration that has the same name
* for group and function. This way it is compatible with the Linux Kernel
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos7420.c b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
index 8ae5ce7..bcbe1a0 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos7420.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
@@ -16,8 +16,6 @@
#include <asm/arch/pinmux.h>
#include "pinctrl-exynos.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define GPD1_OFFSET 0xc0
static struct exynos_pinctrl_config_data serial2_conf[] = {
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 6194e65..7d2e326 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -21,8 +21,6 @@
#include "sh_pfc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum sh_pfc_model {
SH_PFC_R8A7790 = 0,
SH_PFC_R8A7791,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
index 7e93d85..e66ee99 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
@@ -16,8 +16,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* GRF_GPIO0A_IOMUX */
enum {
GPIO0A3_SHIFT = 6,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3328.c b/drivers/pinctrl/rockchip/pinctrl_rk3328.c
index fa2356a..0a478a8 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3328.c
@@ -15,8 +15,6 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
/* GPIO0A_IOMUX */
GPIO0A5_SEL_SHIFT = 10,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3368.c b/drivers/pinctrl/rockchip/pinctrl_rk3368.c
index 25249e3..a03827a 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3368.c
@@ -17,8 +17,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* PMUGRF_GPIO0B_IOMUX */
enum {
GPIO0B5_SHIFT = 10,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3399.c b/drivers/pinctrl/rockchip/pinctrl_rk3399.c
index c705225..929035e 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3399.c
@@ -15,8 +15,6 @@
#include <asm/arch/clock.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rk3399_pinctrl_priv {
struct rk3399_grf_regs *grf;
struct rk3399_pmugrf_regs *pmugrf;
diff --git a/drivers/pinctrl/rockchip/pinctrl_rv1108.c b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
index 035f01a..4c81bec 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
@@ -14,8 +14,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rv1108_pinctrl_priv {
struct rv1108_grf *grf;
};
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index 1847a49..36a374a 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -9,8 +9,6 @@
#include <power-domain.h>
#include <power-domain-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct power_domain_ops *power_domain_dev_ops(struct udevice *dev)
{
return (struct power_domain_ops *)dev->driver->ops;
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 7d107f4..c233ac0 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -13,8 +13,6 @@
#include <power/act8846_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "REG", .driver = "act8846_reg"},
{ },
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 38a2a04..c58ebb8 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_pmic_plat_data - platform data for the PMIC
*
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index 95c2b7e..ec7b9bf 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -15,8 +15,6 @@
#include <power/lp873x.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = LP873X_LDO_DRIVER },
{ .prefix = "buck", .driver = LP873X_BUCK_DRIVER },
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 506769e..7c02f38 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -15,8 +15,6 @@
#include <power/lp87565.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "buck", .driver = LP87565_BUCK_DRIVER },
{ },
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index b3ed849..f4e0f70 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
{ .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
diff --git a/drivers/power/pmic/max8997.c b/drivers/power/pmic/max8997.c
index 5ebeb8a..66c1c15 100644
--- a/drivers/power/pmic/max8997.c
+++ b/drivers/power/pmic/max8997.c
@@ -12,8 +12,6 @@
#include <power/max8997_pmic.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8997_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/max8998.c b/drivers/power/pmic/max8998.c
index a7e0469..8dd7e48 100644
--- a/drivers/power/pmic/max8998.c
+++ b/drivers/power/pmic/max8998.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/max8998_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8998_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 1e1ecb3..7e3b25d 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -15,8 +15,6 @@
#include <power/palmas.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = PALMAS_LDO_DRIVER },
{ .prefix = "smps", .driver = PALMAS_SMPS_DRIVER },
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index a06cbc0..32b8f71 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/pfuze100_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
/* sw[x], swbst */
{ .prefix = "s", .driver = PFUZE100_REGULATOR_DRIVER },
diff --git a/drivers/power/pmic/pm8916.c b/drivers/power/pmic/pm8916.c
index a048bbe..cd7c906 100644
--- a/drivers/power/pmic/pm8916.c
+++ b/drivers/power/pmic/pm8916.c
@@ -10,8 +10,6 @@
#include <power/pmic.h>
#include <spmi/spmi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define PID_SHIFT 8
#define PID_MASK (0xFF << PID_SHIFT)
#define REG_MASK 0xFF
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 9347b40..5e8f6d6 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -16,8 +16,6 @@
#include <power/pmic.h>
#include <linux/ctype.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
int pmic_bind_children(struct udevice *pmic, ofnode parent,
const struct pmic_child_info *child_info)
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index c65f38f..b0d0c5e 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -11,8 +11,6 @@
#include <power/regulator.h>
#include <power/tps65910_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo_", .driver = TPS65910_LDO_DRIVER },
{ .prefix = "buck_", .driver = TPS65910_BUCK_DRIVER },
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 735046d..c83c8cf 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -11,8 +11,6 @@
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "DCDC_REG", .driver = "rk8xx_buck"},
{ .prefix = "LDO_REG", .driver = "rk8xx_ldo"},
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 3f9525b..13b3f90 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = S2MPS11_OF_LDO_PREFIX, .driver = S2MPS11_LDO_DRIVER },
{ .prefix = S2MPS11_OF_BUCK_PREFIX, .driver = S2MPS11_BUCK_DRIVER },
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index 3812e24..e3bf3a6 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = S5M8767_LDO_DRIVER },
{ .prefix = "BUCK", .driver = S5M8767_BUCK_DRIVER },
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index e8d6fac..80209d3 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = SANDBOX_OF_LDO_PREFIX, .driver = SANDBOX_LDO_DRIVER },
{ .prefix = SANDBOX_OF_BUCK_PREFIX, .driver = SANDBOX_BUCK_DRIVER },
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index ee5358b..1b0fd99 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/tps65090.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "fet", .driver = TPS65090_FET_DRIVER },
{ },
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 97b4a98..eec1914 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -14,8 +14,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct fixed_regulator_platdata {
struct gpio_desc gpio; /* GPIO for regulator enable control */
unsigned int startup_delay_us;
diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 11371a7..ba2dbd7 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp873x.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp873x_buck_ctrl[LP873X_BUCK_NUM] = {0x2, 0x4};
static const char lp873x_buck_volt[LP873X_BUCK_NUM] = {0x6, 0x7};
static const char lp873x_ldo_ctrl[LP873X_LDO_NUM] = {0x8, 0x9};
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index d908f6d..94f09f5 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp87565.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp87565_buck_ctrl1[LP87565_BUCK_NUM] = {0x2, 0x4, 0x6, 0x8, 0x2, 0x6};
static const char lp87565_buck_vout[LP87565_BUCK_NUM] = {0xA, 0xC, 0xE, 0x10, 0xA, 0xE };
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 2212d36..6e4ac02 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 24a7977..45c006c 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/palmas.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define REGULATOR_ON 0x1
#define REGULATOR_OFF 0x0
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index adf589b..1e042ad 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -16,8 +16,6 @@
#include <linux/ioport.h>
#include <dm/read.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pbias_reg_info {
u32 enable;
u32 enable_mask;
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 426a933..b9e2d20 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep)
{
struct dm_regulator_uclass_platdata *uc_pdata;
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 3af20e6..477f0f6 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c
index 871da12..89ad587 100644
--- a/drivers/power/regulator/s5m8767.c
+++ b/drivers/power/regulator/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct sec_voltage_desc buck_v1 = {
.max = 2225000,
.min = 650000,
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index f980a17..ab30c50 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) [_id] = { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index 9520a14..1275752 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -12,8 +12,6 @@
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct exynos_pwm_priv {
struct s5p_timer *regs;
};
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 7d3e11d..4c1ee67 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -16,8 +16,6 @@
#include <asm/arch/pwm.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rk_pwm_priv {
struct rk3288_pwm *regs;
ulong freq;
diff --git a/drivers/pwm/sandbox_pwm.c b/drivers/pwm/sandbox_pwm.c
index fcb1084..48f1698 100644
--- a/drivers/pwm/sandbox_pwm.c
+++ b/drivers/pwm/sandbox_pwm.c
@@ -11,8 +11,6 @@
#include <pwm.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
NUM_CHANNELS = 3,
};
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index b8acc15..2119e1d 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -11,8 +11,6 @@
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra_pwm_priv {
struct pwm_ctlr *regs;
};
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index bfcb1dd..6cd2f16 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -20,8 +20,6 @@
#include <asm/arch/sdram.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dram_info {
struct ram_info info;
struct clk ddr_clk;
diff --git a/drivers/ram/rockchip/sdram_rk3128.c b/drivers/ram/rockchip/sdram_rk3128.c
index a33127f..eec1eba 100644
--- a/drivers/ram/rockchip/sdram_rk3128.c
+++ b/drivers/ram/rockchip/sdram_rk3128.c
@@ -12,7 +12,6 @@
#include <asm/arch/grf_rk3128.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
struct dram_info {
struct ram_info info;
struct rk3128_grf *grf;
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 365d00e..0bc05ba 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -25,8 +25,6 @@
#include <asm/arch/sdram_common.h>
#include <linux/err.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct chan_info {
struct rk3288_ddr_pctl *pctl;
struct rk3288_ddr_publ *publ;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 95efb11..d99bf12 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -27,8 +27,6 @@
#include <power/regulator.h>
#include <power/rk8xx_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct chan_info {
struct rk3288_ddr_pctl *pctl;
struct rk3288_ddr_publ *publ;
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 9637a35..292903a 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -12,7 +12,6 @@
#include <asm/arch/grf_rk3328.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
struct dram_info {
struct ram_info info;
struct rk3328_grf_regs *grf;
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 5cb470c..65191c6 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -23,7 +23,6 @@
#include <linux/err.h>
#include <time.h>
-DECLARE_GLOBAL_DATA_PTR;
struct chan_info {
struct rk3399_ddr_pctl_regs *pctl;
struct rk3399_ddr_pi_regs *pi;
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index ec2edd6..62282c6 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -14,8 +14,6 @@
#define MEM_MODE_MASK GENMASK(2, 0)
#define NOT_FOUND 0xff
-DECLARE_GLOBAL_DATA_PTR;
-
struct stm32_fmc_regs {
/* 0x0 */
u32 bcr1; /* NOR/PSRAM Chip select control register 1 */
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 9599444..4dc84d0 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include "stm32mp1_ddr.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static const char *const clkname[] = {
"ddrc1",
"ddrc2",
diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c
index b2c89e1..36d3246 100644
--- a/drivers/reset/ast2500-reset.c
+++ b/drivers/reset/ast2500-reset.c
@@ -14,8 +14,6 @@
#include <asm/arch/scu_ast2500.h>
#include <asm/arch/wdt.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct ast2500_reset_priv {
/* WDT used to perform resets. */
struct udevice *wdt;
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index fa4f653..05879c6 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -10,8 +10,6 @@
#include <reset.h>
#include <reset-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct reset_ops *reset_dev_ops(struct udevice *dev)
{
return (struct reset_ops *)dev->driver->ops;
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index 0e06c97..2e69a5b 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -28,8 +28,6 @@
#define debug_buffer(x, ...)
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_rtc_plat_data - platform data for the RTC
*
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 4a6e60f..b18300e 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -11,8 +11,6 @@
#include <serial.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* data register */
#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index b425375..1d3e928 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -12,8 +12,6 @@
#include <asm/arch/uart.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct lpc32xx_hsuart_priv {
struct hsuart_regs *hsuart;
};
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 6412ca6..a363cd9 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -11,8 +11,6 @@
#include <linux/compiler.h>
#include <serial.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct meson_uart {
u32 wfifo;
u32 rfifo;
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 286b954..dfef0d4 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -13,8 +13,6 @@
#include <asm/arch/stm32.h>
#include "serial_stm32.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int stm32_serial_setbrg(struct udevice *dev, int baudrate)
{
struct stm32x7_serial_platdata *plat = dev_get_platdata(dev);
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index fedd2a9..ec828e6 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -15,8 +15,6 @@
#include <linux/compiler.h>
#include <serial.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define SR_TX_FIFO_FULL BIT(3) /* transmit FIFO full */
#define SR_TX_FIFO_EMPTY BIT(2) /* transmit FIFO empty */
#define SR_RX_FIFO_VALID_DATA BIT(0) /* data in receive FIFO */
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 4e86e5c..68c5c85 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -17,8 +17,6 @@
#include <serial.h>
#include <asm/arch/hardware.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ZYNQ_UART_SR_TXEMPTY (1 << 3) /* TX FIFO empty */
#define ZYNQ_UART_SR_TXACTIVE (1 << 11) /* TX active */
#define ZYNQ_UART_SR_RXEMPTY 0x00000002 /* RX FIFO empty */
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index c8dcb82..f729347 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -15,8 +15,6 @@
#include <spi.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ALTERA_SPI_STATUS_RRDY_MSK BIT(7)
#define ALTERA_SPI_CONTROL_SSO_MSK BIT(10)
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 3cdfd36..445d865 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -24,8 +24,6 @@
#include "atmel_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_SPI
static int spi_has_wdrbt(struct atmel_spi_slave *slave)
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 03d3fa6..71a665e 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -22,8 +22,6 @@
#include <dm/pinctrl.h>
#include "rk_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* Change to 1 to output registers at the start of each transaction */
#define DEBUG_RK_SPI 0
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 092b13b..75ba6a1 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -20,8 +20,6 @@
#include <asm/state.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SPI_IDLE_VAL
# define CONFIG_SPI_IDLE_VAL 0xFF
#endif
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index 04b4fce..faf609b 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -14,8 +14,6 @@
#include <spi.h>
#include "tegra_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* COMMAND1 */
#define SPI_CMD1_GO BIT(31)
#define SPI_CMD1_M_S BIT(30)
diff --git a/drivers/spmi/spmi-sandbox.c b/drivers/spmi/spmi-sandbox.c
index 980aff2..a938e50 100644
--- a/drivers/spmi/spmi-sandbox.c
+++ b/drivers/spmi/spmi-sandbox.c
@@ -15,8 +15,6 @@
#include <asm/gpio.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define EMUL_GPIO_PID_START 0xC0
#define EMUL_GPIO_PID_END 0xC3
diff --git a/drivers/spmi/spmi-uclass.c b/drivers/spmi/spmi-uclass.c
index 6edece2..e74cd79 100644
--- a/drivers/spmi/spmi-uclass.c
+++ b/drivers/spmi/spmi-uclass.c
@@ -12,8 +12,6 @@
#include <spmi/spmi.h>
#include <linux/ctype.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int spmi_reg_read(struct udevice *dev, int usid, int pid, int reg)
{
const struct dm_spmi_ops *ops = dev_get_driver_ops(dev);
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 12b3e5f..207cc28 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -12,8 +12,6 @@
#include <asm/state.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_warm_sysreset_request(struct udevice *dev,
enum sysreset_t type)
{
diff --git a/drivers/timer/ag101p_timer.c b/drivers/timer/ag101p_timer.c
index 8dc85c4..f9ff5c1 100644
--- a/drivers/timer/ag101p_timer.c
+++ b/drivers/timer/ag101p_timer.c
@@ -12,8 +12,6 @@
#include <timer.h>
#include <linux/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Timer Control Register
*/
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 1ba85c4..f80debb 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -14,8 +14,6 @@
#include <timer.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* control register */
#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
#define ALTERA_TIMER_START BIT(2) /* Start timer */
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index e194c50..ab1e4af 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/arch/timer.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define AST_TICK_TIMER 1
#define AST_TMC_RELOAD_VAL 0xffffffff
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index 963f978..4322921 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -12,8 +12,6 @@
#include <timer.h>
#include <linux/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define REG32_TMR(x) (*(u32 *) ((plat->regs) + (x>>2)))
/*
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index 4cc6105..051c690 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Timer register bits */
#define TCLR_START BIT(0) /* Start=1 */
#define TCLR_AUTO_RELOAD BIT(1) /* Auto reload */
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index 41b748e..f740c78 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -33,8 +33,6 @@
#include "tpm_tis.h"
#include "tpm_internal.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum i2c_chip_type {
SLB9635,
SLB9645,
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 2f84b36..dbece6e 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -11,8 +11,6 @@
#include <scsi.h>
#include <usb.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver emulates a flash stick using the UFI command specification and
* the BBB (bulk/bulk/bulk) protocol. It supports only a single logical unit
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c
index 9a0f47b..f5dda81 100644
--- a/drivers/usb/emul/sandbox_hub.c
+++ b/drivers/usb/emul/sandbox_hub.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* We only support up to 8 */
#define SANDBOX_NUM_PORTS 4
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index cff0176..2fb67e7 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -11,8 +11,6 @@
#include <scsi.h>
#include <usb.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver emulates a USB keyboard using the USB HID specification (boot
* protocol)
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index fbe11f3..01ae6df 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int copy_to_unicode(char *buff, int length, const char *str)
{
int ptr;
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 4862ab0..b63a630 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -19,8 +19,6 @@
#include "dwc2.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* Use only HC channel 0. */
#define DWC2_HC_CHANNEL 0
diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c
index 440dd10..9b122b1 100644
--- a/drivers/usb/host/dwc3-of-simple.c
+++ b/drivers/usb/host/dwc3-of-simple.c
@@ -17,8 +17,6 @@
#include <reset.h>
#include <clk.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dwc3_of_simple {
struct clk_bulk clks;
struct reset_ctl_bulk resets;
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index f6c6b01..f912510 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -15,8 +15,6 @@
#include "ehci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_USB
int ehci_hcd_init(int index, enum usb_init_type init,
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index f317cf0..f07a287 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -20,8 +20,6 @@
#include "ehci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define USB1_ADDR_MASK 0xFFFF0000
#define HOSTPC1_DEVLC 0x84
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index 15055b3..1a35a00 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/root.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_usb_ctrl {
int rootdev;
};
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 4e40f4b..fa7a439 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -16,8 +16,6 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern bool usb_started; /* flag for the started/stopped USB status */
static bool asynch_allowed;
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index adfa4a7..912190b 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -19,8 +19,6 @@
#include <linux/usb/dwc3.h>
#include <linux/usb/otg.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct xhci_dwc3_platdata {
struct phy *usb_phys;
int num_phys;
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index f77c78d..25b14a9 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -20,8 +20,6 @@
#include <dm.h>
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_USB
static struct fsl_xhci fsl_xhci;
unsigned long ctr_addr[] = FSL_USB_XHCI_ADDR;
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index dbdfce3..f51e677 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -15,8 +15,6 @@
#include "xhci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct mvebu_xhci_platdata {
fdt_addr_t hcd_base;
};
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index b814500..d05b302 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -23,8 +23,6 @@
#include "xhci.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
static struct omap_xhci omap;
static int omap_xhci_core_init(struct omap_xhci *omap)
diff --git a/drivers/usb/host/xhci-rockchip.c b/drivers/usb/host/xhci-rockchip.c
index b1f9884..7f637d9 100644
--- a/drivers/usb/host/xhci-rockchip.c
+++ b/drivers/usb/host/xhci-rockchip.c
@@ -16,8 +16,6 @@
#include "xhci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct rockchip_xhci_platdata {
fdt_addr_t hcd_base;
fdt_addr_t phy_base;
diff --git a/drivers/usb/host/xhci-zynqmp.c b/drivers/usb/host/xhci-zynqmp.c
index cec1bc4..c57e9ab 100644
--- a/drivers/usb/host/xhci-zynqmp.c
+++ b/drivers/usb/host/xhci-zynqmp.c
@@ -19,8 +19,6 @@
#include "xhci.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
/* Default to the ZYNQMP XHCI defines */
#define USB3_PWRCTL_CLK_CMD_MASK 0x3FE000
#define USB3_PWRCTL_CLK_FREQ_MASK 0xFFC
diff --git a/drivers/video/backlight_gpio.c b/drivers/video/backlight_gpio.c
index 772df5d..acb6f1c 100644
--- a/drivers/video/backlight_gpio.c
+++ b/drivers/video/backlight_gpio.c
@@ -10,8 +10,6 @@
#include <backlight.h>
#include <asm/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct gpio_backlight_priv {
struct gpio_desc gpio;
bool def_value;
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 0a94aff..6f52d2f 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -16,8 +16,6 @@
#define DP_MAX_LANE_COUNT 0x002
#define DP_MAX_LANE_COUNT_MASK 0x1f
-DECLARE_GLOBAL_DATA_PTR;
-
struct anx6345_priv {
u8 edid[EDID_SIZE];
};
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index f84dd70..3f9a0e1 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -17,8 +17,6 @@
#include "exynos_dp_lowlevel.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
static void exynos_dp_enable_video_input(struct exynos_dp *dp_regs,
unsigned int enable)
{
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 78e595e..fad027f 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -344,8 +344,6 @@ union chan_param_mem {
struct chan_param_mem_interleaved ip;
};
-DECLARE_GLOBAL_DATA_PTR;
-
/* graphics setup */
static GraphicDevice panel;
static struct ctfb_res_modes *mode;
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index f40e57b..28565a1 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pwm_backlight_priv {
struct udevice *reg;
struct gpio_desc enable;
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index a7fa9c5..0a6f7e6 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -24,8 +24,6 @@
#include <asm/arch/grf_rk3288.h>
#include <asm/arch/rockchip_mipi_dsi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MHz 1000000
/* Select mipi dsi source, big or little vop */
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c
index b936fce..c085d8b 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -24,8 +24,6 @@
#include <asm/arch/grf_rk3399.h>
#include <asm/arch/rockchip_mipi_dsi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Select mipi dsi source, big or little vop */
static int rk_mipi_dsi_source_select(struct udevice *dev)
{
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 1527f96..2ea7340 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -20,8 +20,6 @@
#include <asm/arch/grf_rk3288.h>
#include <dt-bindings/clock/rk3288-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MAX_CR_LOOP 5
#define MAX_EQ_LOOP 5
#define DP_LINK_STATUS_SIZE 6
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index c0ce199..8824f47 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct simple_panel_priv {
struct udevice *reg;
struct udevice *backlight;
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 4164fa1..0c6882c 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -22,8 +22,6 @@
#include <dm/uclass-internal.h>
#include "displayport.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* return in 1000ths of a Hertz */
static int tegra_dc_calc_refresh(const struct display_timing *timing)
{
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index 95d743d..09e5aa7 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -18,8 +18,6 @@
#include "sor.h"
#include "displayport.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DO_FAST_LINK_TRAINING 1
struct tegra_dp_plat {
diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 700ab25..a91643a 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -17,8 +17,6 @@
#include "displayport.h"
#include "sor.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DEBUG_SOR 0
#define APBDEV_PMC_DPD_SAMPLE 0x20
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index aab077e..3539844 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -14,8 +14,6 @@
#define WDT_AST2500 2500
#define WDT_AST2400 2400
-DECLARE_GLOBAL_DATA_PTR;
-
struct ast_wdt_priv {
struct ast_wdt *regs;
};
diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c
index ded80c4..5d2b624 100644
--- a/drivers/watchdog/mpc8xx_wdt.c
+++ b/drivers/watchdog/mpc8xx_wdt.c
@@ -9,8 +9,6 @@
#include <asm/cpm_8xx.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void hw_watchdog_reset(void)
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
diff --git a/drivers/watchdog/sandbox_wdt.c b/drivers/watchdog/sandbox_wdt.c
index 02b57f3..5ec32b2 100644
--- a/drivers/watchdog/sandbox_wdt.c
+++ b/drivers/watchdog/sandbox_wdt.c
@@ -9,8 +9,6 @@
#include <wdt.h>
#include <asm/state.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
{
struct sandbox_state *state = state_get_current();
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index 72ec694..17fe670 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -40,8 +40,6 @@ struct wdog_regs {
#define WDG_32KHZ_CLK (0x2)
#define WDG_EXT_CLK (0x3)
-DECLARE_GLOBAL_DATA_PTR;
-
void hw_watchdog_set_timeout(u16 val)
{
/* setting timeout value */
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 8a30f02..1eb5721 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -11,8 +11,6 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
{
const struct wdt_ops *ops = device_get_ops(dev);