summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/adc/exynos-adc.c2
-rw-r--r--drivers/ata/dwc_ahci.c2
-rw-r--r--drivers/clk/altera/clk-agilex.c2
-rw-r--r--drivers/clk/altera/clk-arria10.c2
-rw-r--r--drivers/clk/exynos/clk-exynos7420.c4
-rw-r--r--drivers/clk/renesas/clk-rcar-gen2.c2
-rw-r--r--drivers/clk/renesas/clk-rcar-gen3.c2
-rw-r--r--drivers/clk/uniphier/clk-uniphier-core.c2
-rw-r--r--drivers/core/device.c3
-rw-r--r--drivers/cpu/bmips_cpu.c8
-rw-r--r--drivers/cpu/cpu-uclass.c8
-rw-r--r--drivers/cpu/cpu_sandbox.c8
-rw-r--r--drivers/cpu/imx8_cpu.c8
-rw-r--r--drivers/cpu/mpc83xx_cpu.c26
-rw-r--r--drivers/cpu/riscv_cpu.c8
-rw-r--r--drivers/dma/ti-edma3.c2
-rw-r--r--drivers/gpio/altera_pio.c2
-rw-r--r--drivers/gpio/atmel_pio4.c2
-rw-r--r--drivers/gpio/bcm2835_gpio.c2
-rw-r--r--drivers/gpio/da8xx_gpio.c2
-rw-r--r--drivers/gpio/gpio-rcar.c2
-rw-r--r--drivers/gpio/gpio-rza1.c2
-rw-r--r--drivers/gpio/gpio-uniphier.c2
-rw-r--r--drivers/gpio/msm_gpio.c2
-rw-r--r--drivers/gpio/mvebu_gpio.c2
-rw-r--r--drivers/gpio/mxc_gpio.c2
-rw-r--r--drivers/gpio/mxs_gpio.c2
-rw-r--r--drivers/gpio/omap_gpio.c4
-rw-r--r--drivers/gpio/pm8916_gpio.c2
-rw-r--r--drivers/gpio/s5p_gpio.c4
-rw-r--r--drivers/gpio/sifive-gpio.c2
-rw-r--r--drivers/gpio/sunxi_gpio.c2
-rw-r--r--drivers/gpio/vybrid_gpio.c2
-rw-r--r--drivers/i2c/at91_i2c.c2
-rw-r--r--drivers/i2c/davinci_i2c.c2
-rw-r--r--drivers/i2c/exynos_hs_i2c.c2
-rw-r--r--drivers/i2c/i2c-uniphier-f.c2
-rw-r--r--drivers/i2c/i2c-uniphier.c2
-rw-r--r--drivers/i2c/imx_lpi2c.c2
-rw-r--r--drivers/i2c/iproc_i2c.c2
-rw-r--r--drivers/i2c/mxc_i2c.c2
-rw-r--r--drivers/i2c/omap24xx_i2c.c2
-rw-r--r--drivers/i2c/s3c24x0_i2c.c2
-rw-r--r--drivers/input/tegra-kbc.c2
-rw-r--r--drivers/mailbox/tegra-hsp.c2
-rw-r--r--drivers/misc/altera_sysid.c2
-rw-r--r--drivers/misc/imx8/scu.c2
-rw-r--r--drivers/misc/microchip_flexcom.c2
-rw-r--r--drivers/mmc/aspeed_sdhci.c2
-rw-r--r--drivers/mmc/atmel_sdhci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhost.c2
-rw-r--r--drivers/mmc/bcmstb_sdhci.c2
-rw-r--r--drivers/mmc/ftsdc010_mci.c2
-rw-r--r--drivers/mmc/hi6220_dw_mmc.c2
-rw-r--r--drivers/mmc/iproc_sdhci.c2
-rw-r--r--drivers/mmc/jz_mmc.c2
-rw-r--r--drivers/mmc/meson_gx_mmc.c2
-rw-r--r--drivers/mmc/msm_sdhci.c2
-rw-r--r--drivers/mmc/mv_sdhci.c2
-rw-r--r--drivers/mmc/omap_hsmmc.c4
-rw-r--r--drivers/mmc/sdhci-cadence.c2
-rw-r--r--drivers/mmc/sh_mmcif.c2
-rw-r--r--drivers/mmc/sh_sdhi.c2
-rw-r--r--drivers/mmc/socfpga_dw_mmc.c2
-rw-r--r--drivers/mmc/sti_sdhci.c2
-rw-r--r--drivers/mmc/tangier_sdhci.c2
-rw-r--r--drivers/mmc/tmio-common.c2
-rw-r--r--drivers/mmc/xenon_sdhci.c2
-rw-r--r--drivers/net/ag7xxx.c2
-rw-r--r--drivers/net/dwc_eth_qos.c4
-rw-r--r--drivers/net/ethoc.c2
-rw-r--r--drivers/net/fec_mxc.c2
-rw-r--r--drivers/net/fsl_mcdmafec.c2
-rw-r--r--drivers/net/ftgmac100.c2
-rw-r--r--drivers/net/ftmac100.c2
-rw-r--r--drivers/net/ks8851_mll.c2
-rw-r--r--drivers/net/mcffec.c2
-rw-r--r--drivers/net/mtk_eth.c2
-rw-r--r--drivers/net/mvgbe.c2
-rw-r--r--drivers/net/mvneta.c2
-rw-r--r--drivers/net/ravb.c2
-rw-r--r--drivers/net/sh_eth.c2
-rw-r--r--drivers/net/smc911x.c2
-rw-r--r--drivers/net/sni_ave.c2
-rw-r--r--drivers/net/sun8i_emac.c2
-rw-r--r--drivers/net/sunxi_emac.c2
-rw-r--r--drivers/net/ti/keystone_net.c2
-rw-r--r--drivers/net/xilinx_axi_emac.c2
-rw-r--r--drivers/net/xilinx_emaclite.c2
-rw-r--r--drivers/pci_endpoint/pcie-cadence-ep.c2
-rw-r--r--drivers/pinctrl/ath79/pinctrl_ar933x.c2
-rw-r--r--drivers/pinctrl/ath79/pinctrl_qca953x.c2
-rw-r--r--drivers/pinctrl/exynos/pinctrl-exynos.c2
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c2
-rw-r--r--drivers/pinctrl/pinctrl-at91-pio4.c2
-rw-r--r--drivers/pinctrl/renesas/pfc-r7s72100.c2
-rw-r--r--drivers/pinctrl/renesas/pfc.c2
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-core.c2
-rw-r--r--drivers/pwm/exynos_pwm.c2
-rw-r--r--drivers/pwm/pwm-imx.c2
-rw-r--r--drivers/pwm/pwm-mtk.c2
-rw-r--r--drivers/pwm/sunxi_pwm.c2
-rw-r--r--drivers/reset/reset-uniphier.c2
-rw-r--r--drivers/rtc/mvrtc.c2
-rw-r--r--drivers/serial/altera_jtag_uart.c2
-rw-r--r--drivers/serial/altera_uart.c2
-rw-r--r--drivers/serial/atmel_usart.c2
-rw-r--r--drivers/serial/serial_ar933x.c2
-rw-r--r--drivers/serial/serial_arc.c2
-rw-r--r--drivers/serial/serial_bcm283x_mu.c2
-rw-r--r--drivers/serial/serial_lpuart.c2
-rw-r--r--drivers/serial/serial_mcf.c2
-rw-r--r--drivers/serial/serial_meson.c2
-rw-r--r--drivers/serial/serial_msm.c2
-rw-r--r--drivers/serial/serial_mxc.c2
-rw-r--r--drivers/serial/serial_pl01x.c2
-rw-r--r--drivers/serial/serial_s5p.c2
-rw-r--r--drivers/serial/serial_sh.c2
-rw-r--r--drivers/serial/serial_sti_asc.c2
-rw-r--r--drivers/serial/serial_stm32.c2
-rw-r--r--drivers/serial/serial_uniphier.c2
-rw-r--r--drivers/serial/serial_xuartlite.c2
-rw-r--r--drivers/soc/Kconfig16
-rw-r--r--drivers/soc/Makefile3
-rw-r--r--drivers/soc/soc-uclass.c102
-rw-r--r--drivers/soc/soc_sandbox.c56
-rw-r--r--drivers/soc/soc_ti_k3.c124
-rw-r--r--drivers/spi/altera_spi.c2
-rw-r--r--drivers/spi/atcspi200_spi.c2
-rw-r--r--drivers/spi/ath79_spi.c2
-rw-r--r--drivers/spi/atmel_spi.c2
-rw-r--r--drivers/spi/cf_spi.c2
-rw-r--r--drivers/spi/davinci_spi.c2
-rw-r--r--drivers/spi/designware_spi.c2
-rw-r--r--drivers/spi/exynos_spi.c2
-rw-r--r--drivers/spi/fsl_dspi.c2
-rw-r--r--drivers/spi/kirkwood_spi.c2
-rw-r--r--drivers/spi/mtk_snfi_spi.c2
-rw-r--r--drivers/spi/mvebu_a3700_spi.c2
-rw-r--r--drivers/spi/mxc_spi.c2
-rw-r--r--drivers/spi/omap3_spi.c2
-rw-r--r--drivers/spi/spi-sunxi.c2
-rw-r--r--drivers/spi/tegra20_sflash.c2
-rw-r--r--drivers/spi/tegra20_slink.c2
-rw-r--r--drivers/spi/ti_qspi.c2
-rw-r--r--drivers/spi/zynq_spi.c2
-rw-r--r--drivers/spi/zynqmp_gqspi.c4
-rw-r--r--drivers/spmi/spmi-msm.c2
-rw-r--r--drivers/timer/ag101p_timer.c2
-rw-r--r--drivers/timer/altera_timer.c2
-rw-r--r--drivers/timer/atcpit100_timer.c2
-rw-r--r--drivers/timer/omap-timer.c2
-rw-r--r--drivers/usb/dwc3/dwc3-uniphier.c2
-rw-r--r--drivers/usb/host/ehci-atmel.c2
-rw-r--r--drivers/usb/host/ehci-exynos.c2
-rw-r--r--drivers/usb/host/ehci-fsl.c2
-rw-r--r--drivers/usb/host/ehci-marvell.c2
-rw-r--r--drivers/usb/host/ehci-mx5.c2
-rw-r--r--drivers/usb/host/ehci-mx6.c4
-rw-r--r--drivers/usb/host/ehci-omap.c2
-rw-r--r--drivers/usb/host/ehci-vf.c2
-rw-r--r--drivers/usb/host/ohci-da8xx.c2
-rw-r--r--drivers/usb/host/ohci-generic.c2
-rw-r--r--drivers/usb/host/xhci-exynos5.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-rcar.c2
-rw-r--r--drivers/video/atmel_hlcdfb.c2
-rw-r--r--drivers/video/exynos/exynos_dp.c2
-rw-r--r--drivers/video/exynos/exynos_fb.c2
-rw-r--r--drivers/video/tegra.c2
-rw-r--r--drivers/w1/mxc_w1.c2
-rw-r--r--drivers/watchdog/omap_wdt.c2
-rw-r--r--drivers/watchdog/stm32mp_wdt.c2
175 files changed, 203 insertions, 507 deletions
diff --git a/drivers/adc/exynos-adc.c b/drivers/adc/exynos-adc.c
index b459b57050..12c49fc8ce 100644
--- a/drivers/adc/exynos-adc.c
+++ b/drivers/adc/exynos-adc.c
@@ -106,7 +106,7 @@ int exynos_adc_ofdata_to_platdata(struct udevice *dev)
struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
struct exynos_adc_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct exynos_adc_v2 *)devfdt_get_addr(dev);
if (priv->regs == (struct exynos_adc_v2 *)FDT_ADDR_T_NONE) {
pr_err("Dev: %s - can't get address!", dev->name);
return -ENODATA;
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 825fe57f85..017650ae46 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -34,7 +34,7 @@ static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
struct dwc_ahci_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- priv->base = map_physmem(dev_read_addr(dev), sizeof(void *),
+ priv->base = map_physmem(devfdt_get_addr(dev), sizeof(void *),
MAP_NOCACHE);
addr = devfdt_get_addr_index(dev, 1);
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 9927ada201..0042958f4c 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -553,7 +553,7 @@ static int socfpga_clk_ofdata_to_platdata(struct udevice *dev)
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
plat->regs = (void __iomem *)addr;
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index 732ed4d79b..ede0be299d 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -285,7 +285,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
socfpga_a10_handoff_workaround(dev);
if (!fdt_node_check_compatible(fdt, offset, "altr,clk-mgr")) {
- plat->regs = dev_read_addr(dev);
+ plat->regs = devfdt_get_addr(dev);
} else {
pdev = dev_get_parent(dev);
if (!pdev)
diff --git a/drivers/clk/exynos/clk-exynos7420.c b/drivers/clk/exynos/clk-exynos7420.c
index 4a023ea736..aa86c7ca44 100644
--- a/drivers/clk/exynos/clk-exynos7420.c
+++ b/drivers/clk/exynos/clk-exynos7420.c
@@ -95,7 +95,7 @@ static int exynos7420_clk_topc_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
@@ -149,7 +149,7 @@ static int exynos7420_clk_top0_probe(struct udevice *dev)
if (!priv)
return -EINVAL;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 16da10c8dd..3ed0aa92cb 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -283,7 +283,7 @@ int gen2_clk_probe(struct udevice *dev)
u32 cpg_mode;
int ret;
- priv->base = dev_read_addr_ptr(dev);
+ priv->base = (struct gen2_base *)devfdt_get_addr(dev);
if (!priv->base)
return -EINVAL;
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index 30a101fe86..15e3833756 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -359,7 +359,7 @@ int gen3_clk_probe(struct udevice *dev)
u32 cpg_mode;
int ret;
- priv->base = dev_read_addr_ptr(dev);
+ priv->base = (struct gen3_base *)devfdt_get_addr(dev);
if (!priv->base)
return -EINVAL;
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 4e25db354e..c9ec523080 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -253,7 +253,7 @@ static int uniphier_clk_probe(struct udevice *dev)
struct uniphier_clk_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev->parent);
+ addr = devfdt_get_addr(dev->parent);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 355dbd147a..476133f172 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -82,8 +82,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
* This is just a 'requested' sequence, and will be
* resolved (and ->seq updated) when the device is probed.
*/
- if (CONFIG_IS_ENABLED(OF_CONTROL) &&
- !CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
if (uc->uc_drv->name && ofnode_valid(node))
dev_read_alias_seq(dev, &dev->req_seq);
#if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index 421cc7a9a4..2649c5c6e9 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -379,7 +379,7 @@ static const struct bmips_cpu_hw bmips_cpu_bcm6838 = {
};
/* Generic CPU Ops */
-static int bmips_cpu_get_desc(const struct udevice *dev, char *buf, int size)
+static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@@ -387,7 +387,7 @@ static int bmips_cpu_get_desc(const struct udevice *dev, char *buf, int size)
return hw->get_cpu_desc(priv, buf, size);
}
-static int bmips_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
+static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@@ -400,7 +400,7 @@ static int bmips_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
return 0;
}
-static int bmips_cpu_get_count(const struct udevice *dev)
+static int bmips_cpu_get_count(struct udevice *dev)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@@ -408,7 +408,7 @@ static int bmips_cpu_get_count(const struct udevice *dev)
return hw->get_cpu_count(priv);
}
-static int bmips_cpu_get_vendor(const struct udevice *dev, char *buf, int size)
+static int bmips_cpu_get_vendor(struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "Broadcom");
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 37e3cf2d8f..cbb4419ec0 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -69,7 +69,7 @@ struct udevice *cpu_get_current_dev(void)
return cpu;
}
-int cpu_get_desc(const struct udevice *dev, char *buf, int size)
+int cpu_get_desc(struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@@ -79,7 +79,7 @@ int cpu_get_desc(const struct udevice *dev, char *buf, int size)
return ops->get_desc(dev, buf, size);
}
-int cpu_get_info(const struct udevice *dev, struct cpu_info *info)
+int cpu_get_info(struct udevice *dev, struct cpu_info *info)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@@ -92,7 +92,7 @@ int cpu_get_info(const struct udevice *dev, struct cpu_info *info)
return ops->get_info(dev, info);
}
-int cpu_get_count(const struct udevice *dev)
+int cpu_get_count(struct udevice *dev)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@@ -102,7 +102,7 @@ int cpu_get_count(const struct udevice *dev)
return ops->get_count(dev);
}
-int cpu_get_vendor(const struct udevice *dev, char *buf, int size)
+int cpu_get_vendor(struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);
diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c
index caa26e50f2..30a12e5a53 100644
--- a/drivers/cpu/cpu_sandbox.c
+++ b/drivers/cpu/cpu_sandbox.c
@@ -8,14 +8,14 @@
#include <dm.h>
#include <cpu.h>
-int cpu_sandbox_get_desc(const struct udevice *dev, char *buf, int size)
+int cpu_sandbox_get_desc(struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "LEG Inc. SuperMegaUltraTurbo CPU No. 1");
return 0;
}
-int cpu_sandbox_get_info(const struct udevice *dev, struct cpu_info *info)
+int cpu_sandbox_get_info(struct udevice *dev, struct cpu_info *info)
{
info->cpu_freq = 42 * 42 * 42 * 42 * 42;
info->features = 0x42424242;
@@ -24,12 +24,12 @@ int cpu_sandbox_get_info(const struct udevice *dev, struct cpu_info *info)
return 0;
}
-int cpu_sandbox_get_count(const struct udevice *dev)
+int cpu_sandbox_get_count(struct udevice *dev)
{
return 42;
}
-int cpu_sandbox_get_vendor(const struct udevice *dev, char *buf, int size)
+int cpu_sandbox_get_vendor(struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "Languid Example Garbage Inc.");
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 502c8ebb43..6345cd0815 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -100,7 +100,7 @@ static int cpu_imx_get_temp(struct cpu_imx_platdata *plat)
}
#endif
-int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
+int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
int ret, temp;
@@ -126,7 +126,7 @@ int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
return 0;
}
-static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
+static int cpu_imx_get_info(struct udevice *dev, struct cpu_info *info)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
@@ -135,7 +135,7 @@ static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
return 0;
}
-static int cpu_imx_get_count(const struct udevice *dev)
+static int cpu_imx_get_count(struct udevice *dev)
{
ofnode node;
int num = 0;
@@ -157,7 +157,7 @@ static int cpu_imx_get_count(const struct udevice *dev)
return num;
}
-static int cpu_imx_get_vendor(const struct udevice *dev, char *buf, int size)
+static int cpu_imx_get_vendor(struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "NXP");
return 0;
diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c
index 5f1592f9ad..f8a84bae9d 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -60,7 +60,7 @@ static inline u32 get_spridr(void)
* determine_type() - Determine CPU family of MPC83xx device
* @dev: CPU device from which to read CPU family from
*/
-static inline void determine_family(const struct udevice *dev)
+static inline void determine_family(struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 12 bits of PARTID field (bits 0-23 in SPRIDR) */
@@ -95,7 +95,7 @@ static inline void determine_family(const struct udevice *dev)
* determine_type() - Determine CPU type of MPC83xx device
* @dev: CPU device from which to read CPU type from
*/
-static inline void determine_type(const struct udevice *dev)
+static inline void determine_type(struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 16 bits of PVR (Processor Version Register) */
@@ -169,7 +169,7 @@ static inline void determine_type(const struct udevice *dev)
* determine_e300_type() - Determine e300 core type of MPC83xx device
* @dev: CPU device from which to read e300 core type from
*/
-static inline void determine_e300_type(const struct udevice *dev)
+static inline void determine_e300_type(struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 16 bits of PVR (Processor Version Register) */
@@ -198,7 +198,7 @@ static inline void determine_e300_type(const struct udevice *dev)
* determine_revid() - Determine revision ID of CPU device
* @dev: CPU device from which to read revision ID
*/
-static inline void determine_revid(const struct udevice *dev)
+static inline void determine_revid(struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
u32 REVID_MAJOR_MASK;
@@ -221,7 +221,7 @@ static inline void determine_revid(const struct udevice *dev)
* determine_cpu_data() - Determine CPU information from hardware
* @dev: CPU device from which to read information
*/
-static void determine_cpu_data(const struct udevice *dev)
+static void determine_cpu_data(struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
const u32 E_FLAG_MASK = 0x00010000;
@@ -239,7 +239,7 @@ static void determine_cpu_data(const struct udevice *dev)
priv->is_e_processor = !bitfield_extract_by_mask(spridr, E_FLAG_MASK);
}
-static int mpc83xx_cpu_get_desc(const struct udevice *dev, char *buf, int size)
+static int mpc83xx_cpu_get_desc(struct udevice *dev, char *buf, int size)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
struct clk core_clk;
@@ -248,14 +248,14 @@ static int mpc83xx_cpu_get_desc(const struct udevice *dev, char *buf, int size)
char csb_freq[32];
int ret;
- ret = clk_get_by_index((struct udevice *)dev, 0, &core_clk);
+ ret = clk_get_by_index(dev, 0, &core_clk);
if (ret) {
debug("%s: Failed to get core clock (err = %d)\n",
dev->name, ret);
return ret;
}
- ret = clk_get_by_index((struct udevice *)dev, 1, &csb_clk);
+ ret = clk_get_by_index(dev, 1, &csb_clk);
if (ret) {
debug("%s: Failed to get CSB clock (err = %d)\n",
dev->name, ret);
@@ -278,14 +278,13 @@ static int mpc83xx_cpu_get_desc(const struct udevice *dev, char *buf, int size)
return 0;
}
-static int mpc83xx_cpu_get_info(const struct udevice *dev,
- struct cpu_info *info)
+static int mpc83xx_cpu_get_info(struct udevice *dev, struct cpu_info *info)
{
struct clk clock;
int ret;
ulong freq;
- ret = clk_get_by_index((struct udevice *)dev, 0, &clock);
+ ret = clk_get_by_index(dev, 0, &clock);
if (ret) {
debug("%s: Failed to get core clock (err = %d)\n",
dev->name, ret);
@@ -304,14 +303,13 @@ static int mpc83xx_cpu_get_info(const struct udevice *dev,
return 0;
}
-static int mpc83xx_cpu_get_count(const struct udevice *dev)
+static int mpc83xx_cpu_get_count(struct udevice *dev)
{
/* We have one e300cX core */
return 1;
}
-static int mpc83xx_cpu_get_vendor(const struct udevice *dev, char *buf,
- int size)
+static int mpc83xx_cpu_get_vendor(struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "NXP");
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index 93ce708f65..100fe5542e 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -17,7 +17,7 @@
DECLARE_GLOBAL_DATA_PTR;
-static int riscv_cpu_get_desc(const struct udevice *dev, char *buf, int size)
+static int riscv_cpu_get_desc(struct udevice *dev, char *buf, int size)
{
const char *isa;
@@ -30,7 +30,7 @@ static int riscv_cpu_get_desc(const struct udevice *dev, char *buf, int size)
return 0;
}
-static int riscv_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
+static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info)
{
int ret;
struct clk clk;
@@ -39,7 +39,7 @@ static int riscv_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
u32 d_cache_size;
/* First try getting the frequency from the assigned clock */
- ret = clk_get_by_index((struct udevice *)dev, 0, &clk);
+ ret = clk_get_by_index(dev, 0, &clk);
if (!ret) {
ret = clk_get_rate(&clk);
if (!IS_ERR_VALUE(ret))
@@ -67,7 +67,7 @@ static int riscv_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
return 0;
}
-static int riscv_cpu_get_count(const struct udevice *dev)
+static int riscv_cpu_get_count(struct udevice *dev)
{
ofnode node;
int num = 0;
diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c
index 13ab967089..77c4ba9530 100644
--- a/drivers/dma/ti-edma3.c
+++ b/drivers/dma/ti-edma3.c
@@ -546,7 +546,7 @@ static int ti_edma3_ofdata_to_platdata(struct udevice *dev)
{
struct ti_edma3_priv *priv = dev_get_priv(dev);
- priv->base = dev_read_addr(dev);
+ priv->base = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index 75800d9f31..324f9c29a8 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -88,7 +88,7 @@ static int altera_pio_ofdata_to_platdata(struct udevice *dev)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct altera_pio_regs),
MAP_NOCACHE);
plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 18f365fa41..455944d547 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -299,7 +299,7 @@ static int atmel_pio4_probe(struct udevice *dev)
clk_free(&clk);
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index 0dff9ac711..f4b67f1cf0 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -121,7 +121,7 @@ static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index f875888510..ab0a5cfd33 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -545,7 +545,7 @@ static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index a993fd4d70..c49a041059 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -148,7 +148,7 @@ static int rcar_gpio_probe(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (void __iomem *)devfdt_get_addr(dev);
uc_priv->bank_name = dev->name;
ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, node, "gpio-ranges",
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index 86804ac2f5..21a87d645c 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -112,7 +112,7 @@ static int r7s72100_gpio_probe(struct udevice *dev)
uc_priv->bank_name = dev->name;
dev = dev_get_parent(dev);
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 54a38da0f1..30392bccaa 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -142,7 +142,7 @@ static int uniphier_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c
index fe6b33e1df..ac5d20c1b9 100644
--- a/drivers/gpio/msm_gpio.c
+++ b/drivers/gpio/msm_gpio.c
@@ -96,7 +96,7 @@ static int msm_gpio_probe(struct udevice *dev)
{
struct msm_gpio_bank *priv = dev_get_priv(dev);
- priv->base = dev_read_addr(dev);
+ priv->base = devfdt_get_addr(dev);
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
}
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 65eaa71c20..770cbf6b60 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -90,7 +90,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct mvebu_gpio_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct mvebu_gpio_regs *)devfdt_get_addr(dev);
uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
priv->name[0] = 'A' + dev->req_seq;
uc_priv->bank_name = priv->name;
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index a16f5719ed..90d36fb87b 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -300,7 +300,7 @@ static int mxc_gpio_ofdata_to_platdata(struct udevice *dev)
fdt_addr_t addr;
struct mxc_gpio_plat *plat = dev_get_platdata(dev);
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 2c16517e72..cb797261b7 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -275,7 +275,7 @@ static int mxs_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
- plat->bank = dev_read_addr(dev);
+ plat->bank = devfdt_get_addr(dev);
if (plat->bank == FDT_ADDR_T_NONE) {
printf("%s: No 'reg' property defined!\n", __func__);
return -EINVAL;
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index 6eaa0a08a2..c986ef0380 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -308,7 +308,7 @@ static int omap_gpio_bind(struct udevice *dev)
if (plat)
return 0;
- base_addr = dev_read_addr(dev);
+ base_addr = devfdt_get_addr(dev);
if (base_addr == FDT_ADDR_T_NONE)
return -EINVAL;
@@ -347,7 +347,7 @@ static int omap_gpio_ofdata_to_platdata(struct udevice *dev)
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 58f044678b..51df5367ea 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -256,7 +256,7 @@ static int pm8941_pwrkey_probe(struct udevice *dev)
struct pm8916_gpio_bank *priv = dev_get_priv(dev);
int reg;
- priv->pid = dev_read_addr(dev);
+ priv->pid = devfdt_get_addr(dev);
if (priv->pid == FDT_ADDR_T_NONE)
return log_msg_ret("bad address", -EINVAL);
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index c78227f4da..258f13395d 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -316,7 +316,7 @@ static int gpio_exynos_bind(struct udevice *parent)
if (plat)
return 0;
- base = dev_read_addr_ptr(parent);
+ base = (struct s5p_gpio_bank *)devfdt_get_addr(parent);
for (node = fdt_first_subnode(blob, dev_of_offset(parent)), bank = base;
node > 0;
node = fdt_next_subnode(blob, node), bank++) {
@@ -339,7 +339,7 @@ static int gpio_exynos_bind(struct udevice *parent)
dev_set_of_offset(dev, node);
- reg = dev_read_addr(dev);
+ reg = devfdt_get_addr(dev);
if (reg != FDT_ADDR_T_NONE)
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c
index bf3537b76b..24da3b3c23 100644
--- a/drivers/gpio/sifive-gpio.c
+++ b/drivers/gpio/sifive-gpio.c
@@ -159,7 +159,7 @@ static int sifive_gpio_ofdata_to_platdata(struct udevice *dev)
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index 3efccf496f..9c3a4428e1 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -293,7 +293,7 @@ static int gpio_sunxi_bind(struct udevice *parent)
if (plat)
return 0;
- ctlr = dev_read_addr_ptr(parent);
+ ctlr = (struct sunxi_gpio_reg *)devfdt_get_addr(parent);
for (bank = 0; bank < soc_data->no_banks; bank++) {
struct sunxi_gpio_platdata *plat;
struct udevice *dev;
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 4efff5c364..d2c1d7d859 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -109,7 +109,7 @@ static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t base_addr;
- base_addr = dev_read_addr(dev);
+ base_addr = devfdt_get_addr(dev);
if (base_addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index 9d6c6d80e2..c817ed6bf9 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -225,7 +225,7 @@ static int at91_i2c_ofdata_to_platdata(struct udevice *dev)
struct at91_i2c_bus *bus = dev_get_priv(dev);
int node = dev_of_offset(dev);
- bus->regs = dev_read_addr_ptr(dev);
+ bus->regs = (struct at91_i2c_regs *)devfdt_get_addr(dev);
bus->pdata = (struct at91_i2c_pdata *)dev_get_driver_data(dev);
bus->clock_frequency = fdtdec_get_int(blob, node,
"clock-frequency", 100000);
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index a54f2151fd..f8e9d003e6 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -471,7 +471,7 @@ static int davinci_i2c_probe(struct udevice *dev)
struct i2c_bus *i2c_bus = dev_get_priv(dev);
i2c_bus->id = dev->seq;
- i2c_bus->regs = dev_read_addr_ptr(dev);
+ i2c_bus->regs = (struct i2c_regs *)devfdt_get_addr(dev);
i2c_bus->speed = 100000;
_davinci_i2c_init(i2c_bus->regs, i2c_bus->speed, 0);
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 5785adedb6..4fc9d90580 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -525,7 +525,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
node = dev_of_offset(dev);
- i2c_bus->hsregs = dev_read_addr_ptr(dev);
+ i2c_bus->hsregs = (struct exynos5_hsi2c *)devfdt_get_addr(dev);
i2c_bus->id = pinmux_decode_periph_id(blob, node);
diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c
index a110fe9e8d..d8b4a683bc 100644
--- a/drivers/i2c/i2c-uniphier-f.c
+++ b/drivers/i2c/i2c-uniphier-f.c
@@ -94,7 +94,7 @@ static int uniphier_fi2c_probe(struct udevice *dev)
fdt_addr_t addr;
struct uniphier_fi2c_priv *priv = dev_get_priv(dev);
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c
index e7f44e14e9..f06523ab99 100644
--- a/drivers/i2c/i2c-uniphier.c
+++ b/drivers/i2c/i2c-uniphier.c
@@ -50,7 +50,7 @@ static int uniphier_i2c_probe(struct udevice *dev)
fdt_addr_t addr;
struct uniphier_i2c_priv *priv = dev_get_priv(dev);
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index feeed1e9a2..b7b2aafc7f 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -447,7 +447,7 @@ static int imx_lpi2c_probe(struct udevice *bus)
i2c_bus->driver_data = dev_get_driver_data(bus);
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/i2c/iproc_i2c.c b/drivers/i2c/iproc_i2c.c
index b7e9ced898..a846e0a1fe 100644
--- a/drivers/i2c/iproc_i2c.c
+++ b/drivers/i2c/iproc_i2c.c
@@ -678,7 +678,7 @@ static int iproc_i2c_ofdata_to_platdata(struct udevice *bus)
int node = dev_of_offset(bus);
const void *blob = gd->fdt_blob;
- bus_prvdata->base = map_physmem(dev_read_addr(bus),
+ bus_prvdata->base = map_physmem(devfdt_get_addr(bus),
sizeof(void *),
MAP_NOCACHE);
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 1a1de67252..3b0d27e6cd 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -899,7 +899,7 @@ static int mxc_i2c_probe(struct udevice *bus)
i2c_bus->driver_data = dev_get_driver_data(bus);
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 0af4e333c4..8592a819c4 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -1067,7 +1067,7 @@ static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
{
struct omap_i2c_platdata *plat = dev_get_platdata(bus);
- plat->base = dev_read_addr(bus);
+ plat->base = devfdt_get_addr(bus);
plat->speed = dev_read_u32_default(bus, "clock-frequency",
I2C_SPEED_STANDARD_RATE);
plat->ip_rev = dev_get_driver_data(bus);
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index cb45d3c100..5907217981 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -310,7 +310,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
node = dev_of_offset(dev);
- i2c_bus->regs = dev_read_addr_ptr(dev);
+ i2c_bus->regs = (struct s3c24x0_i2c *)devfdt_get_addr(dev);
i2c_bus->id = pinmux_decode_periph_id(blob, node);
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index f07a51dc30..3409bb61d5 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -291,7 +291,7 @@ static int tegra_kbd_probe(struct udevice *dev)
struct input_config *input = &uc_priv->input;
int ret;
- priv->kbc = dev_read_addr_ptr(dev);
+ priv->kbc = (struct kbc_tegra *)devfdt_get_addr(dev);
if ((fdt_addr_t)priv->kbc == FDT_ADDR_T_NONE) {
debug("%s: No keyboard register found\n", __func__);
return -EINVAL;
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index e91dac201d..f82e6d3d16 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -153,7 +153,7 @@ static int tegra_hsp_probe(struct udevice *dev)
debug("%s(dev=%p)\n", __func__, dev);
- thsp->regs = dev_read_addr(dev);
+ thsp->regs = devfdt_get_addr(dev);
if (thsp->regs == FDT_ADDR_T_NONE)
return -ENODEV;
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index c6502650b7..387c70b070 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -73,7 +73,7 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
{
struct altera_sysid_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct altera_sysid_regs),
MAP_NOCACHE);
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index 223aac8518..ee635eb947 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -187,7 +187,7 @@ static int imx8_scu_probe(struct udevice *dev)
debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c
index 64cc4ae7b6..44a8b180a4 100644
--- a/drivers/misc/microchip_flexcom.c
+++ b/drivers/misc/microchip_flexcom.c
@@ -26,7 +26,7 @@ static int microchip_flexcom_ofdata_to_platdata(struct udevice *dev)
struct microchip_flexcom_platdata *plat = dev_get_platdata(dev);
int ret;
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct microchip_flexcom_regs),
MAP_NOCACHE);
diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c
index 543c65a8e3..8929e603f3 100644
--- a/drivers/mmc/aspeed_sdhci.c
+++ b/drivers/mmc/aspeed_sdhci.c
@@ -34,7 +34,7 @@ static int aspeed_sdhci_probe(struct udevice *dev)
goto free;
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
max_clk = clk_get_rate(&clk);
if (IS_ERR_VALUE(max_clk)) {
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index 0c53caf448..2b797c9bd4 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -69,7 +69,7 @@ static int atmel_sdhci_probe(struct udevice *dev)
return ret;
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
host->bus_width = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 7a410d1dd3..5cdf3c506f 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -182,7 +182,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
int ret;
int clock_id = (int)dev_get_driver_data(dev);
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index b793028ab5..c4876e81f8 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -766,7 +766,7 @@ static int bcm2835_probe(struct udevice *dev)
upriv->mmc = &plat->mmc;
plat->cfg.name = dev->name;
- host->phys_addr = dev_read_addr(dev);
+ host->phys_addr = devfdt_get_addr(dev);
if (host->phys_addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/bcmstb_sdhci.c b/drivers/mmc/bcmstb_sdhci.c
index 5269aa77ce..c14f8289e6 100644
--- a/drivers/mmc/bcmstb_sdhci.c
+++ b/drivers/mmc/bcmstb_sdhci.c
@@ -62,7 +62,7 @@ static int sdhci_bcmstb_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index bc0d5ffed5..fb28f0166f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -395,7 +395,7 @@ static int ftsdc010_mmc_ofdata_to_platdata(struct udevice *dev)
struct ftsdc_priv *priv = dev_get_priv(dev);
struct ftsdc010_chip *chip = &priv->chip;
chip->name = dev->name;
- chip->ioaddr = dev_read_addr_ptr(dev);
+ chip->ioaddr = (void *)devfdt_get_addr(dev);
chip->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);
chip->priv = dev;
diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index 67d6a05b3b..6de7924383 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -33,7 +33,7 @@ static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev)
struct dwmci_host *host = &priv->host;
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index 9f530638e3..91e2e3f0b8 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -188,7 +188,7 @@ static int iproc_sdhci_probe(struct udevice *dev)
iproc_host->shadow_blk = 0;
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->voltages = MMC_VDD_165_195 |
MMC_VDD_32_33 | MMC_VDD_33_34;
host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index b33f085073..d3f1eddf45 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -450,7 +450,7 @@ static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
struct mmc_config *cfg;
int ret;
- priv->regs = map_physmem(dev_read_addr(dev), 0x100, MAP_NOCACHE);
+ priv->regs = map_physmem(devfdt_get_addr(dev), 0x100, MAP_NOCACHE);
cfg = &plat->cfg;
cfg->name = "MSC";
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index 719dd1e5e5..b7f793cd04 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -228,7 +228,7 @@ static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 56c3e35c9e..da3ae2ec35 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -171,7 +171,7 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
host->name = strdup(dev->name);
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->bus_width = fdtdec_get_int(gd->fdt_blob, node, "bus-width", 4);
host->index = fdtdec_get_uint(gd->fdt_blob, node, "index", 0);
priv->base = (void *)fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 9b3dfa13e6..f5f3e43247 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -112,7 +112,7 @@ static int mv_sdhci_probe(struct udevice *dev)
int ret;
host->name = MVSDH_NAME;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD;
host->mmc = &plat->mmc;
host->mmc->dev = dev;
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 715eee0e3e..db1f85125f 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -1911,7 +1911,7 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
- plat->base_addr = map_physmem(dev_read_addr(dev),
+ plat->base_addr = map_physmem(devfdt_get_addr(dev),
sizeof(struct hsmmc *),
MAP_NOCACHE);
@@ -1933,7 +1933,7 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
plat->controller_flags |= of_data->controller_flags;
#ifdef CONFIG_OMAP54XX
- fixups = platform_fixups_mmc(dev_read_addr(dev));
+ fixups = platform_fixups_mmc(devfdt_get_addr(dev));
if (fixups) {
plat->hw_rev = fixups->hw_rev;
cfg->host_caps &= ~fixups->unsupported_caps;
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index cc99bebc30..7b5010b655 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -260,7 +260,7 @@ static int sdhci_cdns_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index ad386909e9..2e994d0178 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -680,7 +680,7 @@ static int sh_mmcif_dm_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 315f95cce8..772fe943e4 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -834,7 +834,7 @@ static int sh_sdhi_dm_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 0022f943bd..892222d27d 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -109,7 +109,7 @@ static int socfpga_dwmmc_ofdata_to_platdata(struct udevice *dev)
}
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);
host->clksel = socfpga_dwmci_clksel;
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index 5578feebef..9bcd8ce5f6 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -116,7 +116,7 @@ static int sti_sdhci_ofdata_to_platdata(struct udevice *dev)
struct sdhci_host *host = dev_get_priv(dev);
host->name = strdup(dev->name);
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
host->bus_width = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);
diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c
index 879e2c98a2..0d6e5d6246 100644
--- a/drivers/mmc/tangier_sdhci.c
+++ b/drivers/mmc/tangier_sdhci.c
@@ -35,7 +35,7 @@ static int sdhci_tangier_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index c653973676..20cd237ef0 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -722,7 +722,7 @@ int tmio_sd_probe(struct udevice *dev, u32 quirks)
ulong mclk;
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 356dd9846d..e765dd384a 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -455,7 +455,7 @@ static int xenon_sdhci_ofdata_to_platdata(struct udevice *dev)
const char *name;
host->name = dev->name;
- host->ioaddr = dev_read_addr_ptr(dev);
+ host->ioaddr = (void *)devfdt_get_addr(dev);
if (device_is_compatible(dev, "marvell,armada-3700-sdhci"))
priv->pad_ctrl_reg = (void *)devfdt_get_addr_index(dev, 1);
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index ccba3947ac..3b5d11f956 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -1256,7 +1256,7 @@ static int ag7xxx_eth_ofdata_to_platdata(struct udevice *dev)
const char *phy_mode;
int ret;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
/* Decoding of convoluted PHY wiring on Atheros MIPS. */
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 1d9eefbb3e..62941bb175 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1995,9 +1995,9 @@ static int eqos_probe(struct udevice *dev)
eqos->dev = dev;
eqos->config = (void *)dev_get_driver_data(dev);
- eqos->regs = dev_read_addr(dev);
+ eqos->regs = devfdt_get_addr(dev);
if (eqos->regs == FDT_ADDR_T_NONE) {
- pr_err("dev_read_addr() failed");
+ pr_err("devfdt_get_addr() failed");
return -ENODEV;
}
eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index b9d80a5b08..fd589a0764 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -690,7 +690,7 @@ static int ethoc_ofdata_to_platdata(struct udevice *dev)
struct ethoc_eth_pdata *pdata = dev_get_platdata(dev);
fdt_addr_t addr;
- pdata->eth_pdata.iobase = dev_read_addr(dev);
+ pdata->eth_pdata.iobase = devfdt_get_addr(dev);
addr = devfdt_get_addr_index(dev, 1);
if (addr != FDT_ADDR_T_NONE)
pdata->packet_base = addr;
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index bb55be9a26..b3d4acb106 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1534,7 +1534,7 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
struct fec_priv *priv = dev_get_priv(dev);
const char *phy_mode;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
priv->eth = (struct ethernet_regs *)pdata->iobase;
pdata->phy_interface = -1;
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index e27f7e5321..f33529cb67 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -570,7 +570,7 @@ static int mcdmafec_ofdata_to_platdata(struct udevice *dev)
struct eth_pdata *pdata = dev_get_platdata(dev);
const u32 *val;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
/* Default to 10Mbit/s */
pdata->max_speed = 10;
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 5676a5b3ba..e4d08f2ba0 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -517,7 +517,7 @@ static int ftgmac100_ofdata_to_platdata(struct udevice *dev)
struct ftgmac100_data *priv = dev_get_priv(dev);
const char *phy_mode;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
phy_mode = dev_read_string(dev, "phy-mode");
if (phy_mode)
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 292690de96..79c64ec89a 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -398,7 +398,7 @@ static int ftmac100_ofdata_to_platdata(struct udevice *dev)
struct ftmac100_data *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_platdata(dev);
const char *mac;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
priv->iobase = pdata->iobase;
mac = dtbmacaddr(0);
if (mac)
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index d22668446d..1773c7671f 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -642,7 +642,7 @@ static int ks8851_ofdata_to_platdata(struct udevice *dev)
struct ks_net *ks = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_platdata(dev);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
ks->iobase = pdata->iobase;
return 0;
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index f94a2d8123..1a8351be1c 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -589,7 +589,7 @@ static int mcffec_ofdata_to_platdata(struct udevice *dev)
struct eth_pdata *pdata = dev_get_platdata(dev);
const u32 *val;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
/* Default to 10Mbit/s */
pdata->max_speed = 10;
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index a06a15772c..86f1360ae3 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1418,7 +1418,7 @@ static int mtk_eth_ofdata_to_platdata(struct udevice *dev)
priv->soc = dev_get_driver_data(dev);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
/* get corresponding ethsys phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 2f9464b961..86b1b8cee5 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -997,7 +997,7 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev)
int pnode;
unsigned long addr;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
pnode = fdt_node_offset_by_compatible(blob, node,
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 4c7d06ca40..092f619bd5 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -1796,7 +1796,7 @@ static int mvneta_ofdata_to_platdata(struct udevice *dev)
struct eth_pdata *pdata = dev_get_platdata(dev);
const char *phy_mode;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
/* Get phy-mode / phy_interface from DT */
pdata->phy_interface = -1;
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 886f53ee82..393ee9bb81 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -651,7 +651,7 @@ int ravb_ofdata_to_platdata(struct udevice *dev)
const fdt32_t *cell;
int ret = 0;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
NULL);
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 4cbffb14c5..8823769edd 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -918,7 +918,7 @@ int sh_ether_ofdata_to_platdata(struct udevice *dev)
const fdt32_t *cell;
int ret = 0;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
NULL);
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 09372d7f6b..9c5dc46483 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -612,7 +612,7 @@ static int smc911x_ofdata_to_platdata(struct udevice *dev)
struct smc911x_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_platdata(dev);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
priv->iobase = pdata->iobase;
return 0;
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 0f7ada8c3e..0784635689 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -746,7 +746,7 @@ static int ave_ofdata_to_platdata(struct udevice *dev)
if (!priv->data)
return -EINVAL;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
pdata->phy_interface = -1;
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
NULL);
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 546cc6ccb6..e2b05ace8f 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -919,7 +919,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
#endif
int ret;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
if (pdata->iobase == FDT_ADDR_T_NONE) {
debug("%s: Cannot find MAC base address\n", __func__);
return -EINVAL;
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index df18ecc064..6364beb9f2 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -594,7 +594,7 @@ static int sunxi_emac_eth_ofdata_to_platdata(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_platdata(dev);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 50f0d33a83..e3ac40ca0d 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -787,7 +787,7 @@ static int ks2_eth_ofdata_to_platdata(struct udevice *dev)
ks2_eth_parse_slave_interface(dev_of_offset(dev), gbe_0, priv, pdata);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 99d4d85c52..2cd5596768 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -722,7 +722,7 @@ static int axi_emac_ofdata_to_platdata(struct udevice *dev)
int offset = 0;
const char *phy_mode;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
priv->iobase = (struct axi_regs *)pdata->iobase;
offset = fdtdec_lookup_phandle(gd->fdt_blob, node,
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 64c18bae74..9bdb6798b6 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -599,7 +599,7 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
struct xemaclite *emaclite = dev_get_priv(dev);
int offset = 0;
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
0x10000);
diff --git a/drivers/pci_endpoint/pcie-cadence-ep.c b/drivers/pci_endpoint/pcie-cadence-ep.c
index 74dfdde154..59231d340a 100644
--- a/drivers/pci_endpoint/pcie-cadence-ep.c
+++ b/drivers/pci_endpoint/pcie-cadence-ep.c
@@ -144,7 +144,7 @@ static int cdns_pci_ep_probe(struct udevice *dev)
{
struct cdns_pcie *pdata = dev_get_priv(dev);
- pdata->reg_base = dev_read_addr_ptr(dev);
+ pdata->reg_base = (void __iomem *)devfdt_get_addr(dev);
if (!pdata->reg_base)
return -ENOMEM;
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index 61e8081874..a0625d7c83 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -111,7 +111,7 @@ static int ar933x_pinctrl_probe(struct udevice *dev)
struct ar933x_pinctrl_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index 2d5a4a3ab2..c9f9608c92 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -131,7 +131,7 @@ static int qca953x_pinctrl_probe(struct udevice *dev)
struct qca953x_pinctrl_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos.c b/drivers/pinctrl/exynos/pinctrl-exynos.c
index 4cdc071d55..e3ac5a6e49 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos.c
@@ -127,7 +127,7 @@ int exynos_pinctrl_probe(struct udevice *dev)
if (!priv)
return -EINVAL;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index fb497803b9..2dee79af17 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -592,7 +592,7 @@ int armada_37xx_pinctrl_probe(struct udevice *dev)
info->data = (struct armada_37xx_pin_data *)dev_get_driver_data(dev);
pin_data = info->data;
- info->base = dev_read_addr_ptr(dev);
+ info->base = (void __iomem *)devfdt_get_addr(dev);
if (!info->base) {
pr_err("unable to find regmap\n");
return -ENODEV;
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index fdb7920b55..801d14253c 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -158,7 +158,7 @@ static int atmel_pinctrl_probe(struct udevice *dev)
fdt_addr_t addr_base;
dev = dev_get_parent(dev);
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 9d7814a5f2..5055780bf7 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -112,7 +112,7 @@ static int r7s72100_pfc_probe(struct udevice *dev)
fdt_addr_t addr_base;
ofnode node;
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 340c8c0a74..1179afd2e7 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -817,7 +817,7 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev)
enum sh_pfc_model model = dev_get_driver_data(dev);
fdt_addr_t base;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index 631bb1f963..8545b9d070 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -422,7 +422,7 @@ int uniphier_pinctrl_probe(struct udevice *dev,
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev->parent);
+ addr = devfdt_get_addr(dev->parent);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index e55fcceafd..fed1583796 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -92,7 +92,7 @@ static int exynos_pwm_ofdata_to_platdata(struct udevice *dev)
{
struct exynos_pwm_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct s5p_timer *)devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 77a1907fd3..f5b9544cb8 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -130,7 +130,7 @@ static int imx_pwm_ofdata_to_platdata(struct udevice *dev)
{
struct imx_pwm_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct pwm_regs *)devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/pwm/pwm-mtk.c b/drivers/pwm/pwm-mtk.c
index 7bd82518d6..97ed477025 100644
--- a/drivers/pwm/pwm-mtk.c
+++ b/drivers/pwm/pwm-mtk.c
@@ -130,7 +130,7 @@ static int mtk_pwm_probe(struct udevice *dev)
int i;
priv->soc = (struct mtk_pwm_soc *)dev_get_driver_data(dev);
- priv->base = dev_read_addr_ptr(dev);
+ priv->base = (void __iomem *)devfdt_get_addr(dev);
if (!priv->base)
return -EINVAL;
ret = clk_get_by_name(dev, "top", &priv->top_clk);
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index e2ae1a8009..56215dbf6c 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -152,7 +152,7 @@ static int sunxi_pwm_ofdata_to_platdata(struct udevice *dev)
{
struct sunxi_pwm_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct sunxi_pwm *)devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index fe1bd5541b..06079d2a9c 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -247,7 +247,7 @@ static int uniphier_reset_probe(struct udevice *dev)
struct uniphier_reset_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev->parent);
+ addr = devfdt_get_addr(dev->parent);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c
index ed057f7bc4..6f49505d4e 100644
--- a/drivers/rtc/mvrtc.c
+++ b/drivers/rtc/mvrtc.c
@@ -172,7 +172,7 @@ static int mv_rtc_ofdata_to_platdata(struct udevice *dev)
{
struct mvrtc_pdata *pdata = dev_get_platdata(dev);
- pdata->iobase = dev_read_addr(dev);
+ pdata->iobase = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 35b76f53f9..7a86161a0d 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -95,7 +95,7 @@ static int altera_jtaguart_ofdata_to_platdata(struct udevice *dev)
{
struct altera_jtaguart_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct altera_jtaguart_regs),
MAP_NOCACHE);
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 0be5cd75c8..f88a293d56 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -87,7 +87,7 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev)
{
struct altera_uart_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct altera_uart_regs),
MAP_NOCACHE);
plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0);
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f759ea8893..71cb31ff75 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -268,7 +268,7 @@ static int atmel_serial_probe(struct udevice *dev)
#if CONFIG_IS_ENABLED(OF_CONTROL)
fdt_addr_t addr_base;
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -ENODEV;
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 9de94b69bd..382c3b3d34 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -150,7 +150,7 @@ static int ar933x_serial_probe(struct udevice *dev)
fdt_addr_t addr;
u32 val;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index 04063fbe39..70dbc6d6b5 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -114,7 +114,7 @@ static int arc_serial_ofdata_to_platdata(struct udevice *dev)
struct arc_serial_platdata *plat = dev_get_platdata(dev);
DECLARE_GLOBAL_DATA_PTR;
- plat->reg = dev_read_addr_ptr(dev);
+ plat->reg = (struct arc_serial_regs *)devfdt_get_addr(dev);
plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"clock-frequency", 0);
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 8a4af87eb6..0102b10ed2 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -171,7 +171,7 @@ static int bcm283x_mu_serial_probe(struct udevice *dev)
* since we need the soc simple-bus to be probed so that the 'ranges'
* property is used.
*/
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 95cbe63b3d..0c63c41270 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -518,7 +518,7 @@ static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index 402fd5343c..b599064b48 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -145,7 +145,7 @@ static int coldfire_ofdata_to_platdata(struct udevice *dev)
struct coldfire_serial_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr_base;
- addr_base = dev_read_addr(dev);
+ addr_base = devfdt_get_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -ENODEV;
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 8cf849f8fe..439057b1b9 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -106,7 +106,7 @@ static int meson_serial_ofdata_to_platdata(struct udevice *dev)
struct meson_serial_platdata *plat = dev->platdata;
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index a1c9abcfbb..0cc1aadce4 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -219,7 +219,7 @@ static int msm_serial_ofdata_to_platdata(struct udevice *dev)
{
struct msm_serial_data *priv = dev_get_priv(dev);
- priv->base = dev_read_addr(dev);
+ priv->base = devfdt_get_addr(dev);
if (priv->base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index de6cefcd3a..42abb96a26 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -330,7 +330,7 @@ static int mxc_serial_ofdata_to_platdata(struct udevice *dev)
struct mxc_serial_platdata *plat = dev->platdata;
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 2772c25f1d..6e5d81ce34 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -354,7 +354,7 @@ int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
fdt_addr_t addr;
int ret;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 9bb2be21e7..e3160cf1bd 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -181,7 +181,7 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
struct s5p_serial_platdata *plat = dev->platdata;
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 13b179f03d..5f45d58e58 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -211,7 +211,7 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev)
fdt_addr_t addr;
int ret;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (!addr)
return -EINVAL;
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index 33ff396bff..5fbbfac820 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -171,7 +171,7 @@ static int sti_asc_serial_probe(struct udevice *dev)
unsigned long val;
fdt_addr_t base;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index cab0db2c96..e77b90670a 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -221,7 +221,7 @@ static int stm32_serial_ofdata_to_platdata(struct udevice *dev)
{
struct stm32x7_serial_platdata *plat = dev_get_platdata(dev);
- plat->base = dev_read_addr(dev);
+ plat->base = devfdt_get_addr(dev);
if (plat->base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index 4004cb8d48..ad691b66da 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -115,7 +115,7 @@ static int uniphier_serial_probe(struct udevice *dev)
fdt_addr_t base;
u32 tmp;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5116d13751..f29a9a0b56 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -85,7 +85,7 @@ static int uartlite_serial_ofdata_to_platdata(struct udevice *dev)
{
struct uartlite_platdata *plat = dev_get_platdata(dev);
- plat->regs = dev_read_addr_ptr(dev);
+ plat->regs = (struct uartlite *)devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index 864d00a885..7b4e4d6130 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -1,21 +1,5 @@
menu "SOC (System On Chip) specific Drivers"
-config SOC_DEVICE
- bool "Enable SoC Device ID drivers using Driver Model"
- help
- This allows drivers to be provided for SoCs to help in identifying
- the SoC in use and matching SoC attributes for selecting SoC
- specific data. This is useful for other device drivers that may
- need different parameters or quirks enabled depending on the
- specific device variant in use.
-
-config SOC_DEVICE_TI_K3
- depends on SOC_DEVICE
- bool "Enable SoC Device ID driver for TI K3 SoCs"
- help
- This allows Texas Instruments Keystone 3 SoCs to identify
- specifics about the SoC in use.
-
source "drivers/soc/ti/Kconfig"
endmenu
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
index 9ef20ca506..ce253b7aa8 100644
--- a/drivers/soc/Makefile
+++ b/drivers/soc/Makefile
@@ -3,6 +3,3 @@
# Makefile for the U-Boot SOC specific device drivers.
obj-$(CONFIG_SOC_TI) += ti/
-obj-$(CONFIG_SOC_DEVICE) += soc-uclass.o
-obj-$(CONFIG_SOC_DEVICE_TI_K3) += soc_ti_k3.o
-obj-$(CONFIG_SANDBOX) += soc_sandbox.o
diff --git a/drivers/soc/soc-uclass.c b/drivers/soc/soc-uclass.c
deleted file mode 100644
index c32d647864..0000000000
--- a/drivers/soc/soc-uclass.c
+++ /dev/null
@@ -1,102 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2020 - Texas Instruments Incorporated - http://www.ti.com/
- * Dave Gerlach <d-gerlach@ti.com>
- */
-
-#include <common.h>
-#include <soc.h>
-#include <dm.h>
-#include <errno.h>
-#include <dm/lists.h>
-#include <dm/root.h>
-
-int soc_get(struct udevice **devp)
-{
- return uclass_first_device_err(UCLASS_SOC, devp);
-}
-
-int soc_get_machine(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_machine)
- return -ENOSYS;
-
- return ops->get_machine(dev, buf, size);
-}
-
-int soc_get_family(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_family)
- return -ENOSYS;
-
- return ops->get_family(dev, buf, size);
-}
-
-int soc_get_revision(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_revision)
- return -ENOSYS;
-
- return ops->get_revision(dev, buf, size);
-}
-
-const struct soc_attr *
-soc_device_match(const struct soc_attr *matches)
-{
- bool match;
- struct udevice *soc;
- char str[SOC_MAX_STR_SIZE];
-
- if (!matches)
- return NULL;
-
- if (soc_get(&soc))
- return NULL;
-
- while (1) {
- if (!(matches->machine || matches->family ||
- matches->revision))
- break;
-
- match = true;
-
- if (matches->machine) {
- if (!soc_get_machine(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->machine, str))
- match = false;
- }
- }
-
- if (matches->family) {
- if (!soc_get_family(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->family, str))
- match = false;
- }
- }
-
- if (matches->revision) {
- if (!soc_get_revision(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->revision, str))
- match = false;
- }
- }
-
- if (match)
- return matches;
-
- matches++;
- }
-
- return NULL;
-}
-
-UCLASS_DRIVER(soc) = {
- .id = UCLASS_SOC,
- .name = "soc",
-};
diff --git a/drivers/soc/soc_sandbox.c b/drivers/soc/soc_sandbox.c
deleted file mode 100644
index 5c82ad84fc..0000000000
--- a/drivers/soc/soc_sandbox.c
+++ /dev/null
@@ -1,56 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Sandbox driver for the SOC uclass
- *
- * (C) Copyright 2020 - Texas Instruments Incorporated - http://www.ti.com/
- * Dave Gerlach <d-gerlach@ti.com>
- */
-
-#include <common.h>
-#include <dm.h>
-#include <soc.h>
-
-int soc_sandbox_get_family(struct udevice *dev, char *buf, int size)
-{
- snprintf(buf, size, "SANDBOX1xx");
-
- return 0;
-}
-
-int soc_sandbox_get_machine(struct udevice *dev, char *buf, int size)
-{
- snprintf(buf, size, "SANDBOX123");
-
- return 0;
-}
-
-int soc_sandbox_get_revision(struct udevice *dev, char *buf, int size)
-{
- snprintf(buf, size, "1.0");
-
- return 0;
-}
-
-static const struct soc_ops soc_sandbox_ops = {
- .get_family = soc_sandbox_get_family,
- .get_revision = soc_sandbox_get_revision,
- .get_machine = soc_sandbox_get_machine,
-};
-
-int soc_sandbox_probe(struct udevice *dev)
-{
- return 0;
-}
-
-static const struct udevice_id soc_sandbox_ids[] = {
- { .compatible = "sandbox,soc" },
- { }
-};
-
-U_BOOT_DRIVER(soc_sandbox) = {
- .name = "soc_sandbox",
- .id = UCLASS_SOC,
- .ops = &soc_sandbox_ops,
- .of_match = soc_sandbox_ids,
- .probe = soc_sandbox_probe,
-};
diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c
deleted file mode 100644
index ae23ef7475..0000000000
--- a/drivers/soc/soc_ti_k3.c
+++ /dev/null
@@ -1,124 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
- * Dave Gerlach <d-gerlach@ti.com>
- */
-
-#include <common.h>
-#include <dm.h>
-#include <soc.h>
-
-#include <asm/io.h>
-
-#define AM65X 0xbb5a
-#define J721E 0xbb64
-
-#define REV_SR1_0 0
-#define REV_SR2_0 1
-
-#define JTAG_ID_VARIANT_SHIFT 28
-#define JTAG_ID_VARIANT_MASK (0xf << 28)
-#define JTAG_ID_PARTNO_SHIFT 12
-#define JTAG_ID_PARTNO_MASK (0xffff << 12)
-
-struct soc_ti_k3_platdata {
- const char *family;
- const char *revision;
-};
-
-static const char *get_family_string(u32 idreg)
-{
- const char *family;
- u32 soc;
-
- soc = (idreg & JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT;
-
- switch (soc) {
- case AM65X:
- family = "AM65X";
- break;
- case J721E:
- family = "J721E";
- break;
- default:
- family = "Unknown Silicon";
- };
-
- return family;
-}
-
-static const char *get_rev_string(u32 idreg)
-{
- const char *revision;
- u32 rev;
-
- rev = (idreg & JTAG_ID_VARIANT_MASK) >> JTAG_ID_VARIANT_SHIFT;
-
- switch (rev) {
- case REV_SR1_0:
- revision = "1.0";
- break;
- case REV_SR2_0:
- revision = "2.0";
- break;
- default:
- revision = "Unknown Revision";
- };
-
- return revision;
-}
-
-static int soc_ti_k3_get_family(struct udevice *dev, char *buf, int size)
-{
- struct soc_ti_k3_platdata *plat = dev_get_platdata(dev);
-
- snprintf(buf, size, "%s", plat->family);
-
- return 0;
-}
-
-static int soc_ti_k3_get_revision(struct udevice *dev, char *buf, int size)
-{
- struct soc_ti_k3_platdata *plat = dev_get_platdata(dev);
-
- snprintf(buf, size, "SR%s", plat->revision);
-
- return 0;
-}
-
-static const struct soc_ops soc_ti_k3_ops = {
- .get_family = soc_ti_k3_get_family,
- .get_revision = soc_ti_k3_get_revision,
-};
-
-int soc_ti_k3_probe(struct udevice *dev)
-{
- struct soc_ti_k3_platdata *plat = dev_get_platdata(dev);
- u32 idreg;
- void *idreg_addr;
-
- idreg_addr = dev_read_addr_ptr(dev);
- if (!idreg_addr)
- return -EINVAL;
-
- idreg = readl(idreg_addr);
-
- plat->family = get_family_string(idreg);
- plat->revision = get_rev_string(idreg);
-
- return 0;
-}
-
-static const struct udevice_id soc_ti_k3_ids[] = {
- { .compatible = "ti,am654-chipid" },
- { }
-};
-
-U_BOOT_DRIVER(soc_ti_k3) = {
- .name = "soc_ti_k3",
- .id = UCLASS_SOC,
- .ops = &soc_ti_k3_ops,
- .of_match = soc_ti_k3_ids,
- .probe = soc_ti_k3_probe,
- .platdata_auto_alloc_size = sizeof(struct soc_ti_k3_platdata),
-};
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index 61372c52b0..3aa7a40b77 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -173,7 +173,7 @@ static int altera_spi_ofdata_to_platdata(struct udevice *bus)
{
struct altera_spi_platdata *plat = dev_get_platdata(bus);
- plat->regs = map_physmem(dev_read_addr(bus),
+ plat->regs = map_physmem(devfdt_get_addr(bus),
sizeof(struct altera_spi_regs),
MAP_NOCACHE);
diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c
index 39c6e226ba..328b16c277 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -378,7 +378,7 @@ static int atcspi200_ofdata_to_platadata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
- ns->regs = map_physmem(dev_read_addr(bus),
+ ns->regs = map_physmem(devfdt_get_addr(bus),
sizeof(struct atcspi200_spi_regs),
MAP_NOCACHE);
if (!ns->regs) {
diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c
index 70bedc7fbe..f64a28c6e0 100644
--- a/drivers/spi/ath79_spi.c
+++ b/drivers/spi/ath79_spi.c
@@ -178,7 +178,7 @@ static int ath79_spi_probe(struct udevice *bus)
struct ath79_spi_priv *priv = dev_get_priv(bus);
fdt_addr_t addr;
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index c65733c87a..b120664661 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -351,7 +351,7 @@ static int atmel_spi_probe(struct udevice *bus)
if (ret)
return ret;
- bus_plat->regs = dev_read_addr_ptr(bus);
+ bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus);
#if CONFIG_IS_ENABLED(DM_GPIO)
struct atmel_spi_priv *priv = dev_get_priv(bus);
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 8fa6d35107..dec92df69b 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -392,7 +392,7 @@ static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus)
int node = dev_of_offset(bus);
int *ctar, len;
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -ENOMEM;
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index a11433db1e..e1e9b45cc9 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -396,7 +396,7 @@ static int davinci_ofdata_to_platadata(struct udevice *bus)
struct davinci_spi_platdata *plat = bus->platdata;
fdt_addr_t addr;
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 2559aac2e9..c9b14f9029 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -157,7 +157,7 @@ static int dw_spi_ofdata_to_platdata(struct udevice *bus)
{
struct dw_spi_platdata *plat = bus->platdata;
- plat->regs = dev_read_addr_ptr(bus);
+ plat->regs = (struct dw_spi *)devfdt_get_addr(bus);
/* Use 500KHz as a suitable default */
plat->frequency = dev_read_u32_default(bus, "spi-max-frequency",
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index d338ff5a0b..746686a18a 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -257,7 +257,7 @@ static int exynos_spi_ofdata_to_platdata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
- plat->regs = dev_read_addr_ptr(bus);
+ plat->regs = (struct exynos_spi *)devfdt_get_addr(bus);
plat->periph_id = pinmux_decode_periph_id(blob, node);
if (plat->periph_id == PERIPH_ID_NONE) {
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index 9396c3826f..78ad61ca37 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -534,7 +534,7 @@ static int fsl_dspi_ofdata_to_platdata(struct udevice *bus)
plat->num_chipselect =
fdtdec_get_int(blob, node, "num-cs", FSL_DSPI_MAX_CHIPSELECT);
- addr = dev_read_addr(bus);
+ addr = devfdt_get_addr(bus);
if (addr == FDT_ADDR_T_NONE) {
debug("DSPI: Can't get base address or size\n");
return -ENOMEM;
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index dc7d2bc1f0..92dc2e13c5 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -236,7 +236,7 @@ static int mvebu_spi_ofdata_to_platdata(struct udevice *bus)
const struct mvebu_spi_dev *drvdata =
(struct mvebu_spi_dev *)dev_get_driver_data(bus);
- plat->spireg = dev_read_addr_ptr(bus);
+ plat->spireg = (struct kwspi_registers *)devfdt_get_addr(bus);
plat->is_errata_50mhz_ac = drvdata->is_errata_50mhz_ac;
return 0;
diff --git a/drivers/spi/mtk_snfi_spi.c b/drivers/spi/mtk_snfi_spi.c
index c30c8f4ff6..2a89476515 100644
--- a/drivers/spi/mtk_snfi_spi.c
+++ b/drivers/spi/mtk_snfi_spi.c
@@ -253,7 +253,7 @@ static int mtk_snfi_spi_probe(struct udevice *bus)
struct mtk_snfi_priv *priv = dev_get_priv(bus);
int ret;
- priv->base = dev_read_addr_ptr(bus);
+ priv->base = (void __iomem *)devfdt_get_addr(bus);
if (!priv->base)
return -EINVAL;
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index e860b9ec64..2302e62be4 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -255,7 +255,7 @@ static int mvebu_spi_ofdata_to_platdata(struct udevice *bus)
struct mvebu_spi_platdata *plat = dev_get_platdata(bus);
int ret;
- plat->spireg = dev_read_addr_ptr(bus);
+ plat->spireg = (struct spi_reg *)devfdt_get_addr(bus);
ret = clk_get_by_index(bus, 0, &plat->clk);
if (ret) {
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index e90a06a66d..aad3780365 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -537,7 +537,7 @@ static int mxc_spi_probe(struct udevice *bus)
}
}
- mxcs->base = dev_read_addr(bus);
+ mxcs->base = devfdt_get_addr(bus);
if (mxcs->base == FDT_ADDR_T_NONE)
return -ENODEV;
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index fbf9575851..39e6813469 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -488,7 +488,7 @@ static int omap3_spi_probe(struct udevice *dev)
struct omap2_mcspi_platform_config* data =
(struct omap2_mcspi_platform_config*)dev_get_driver_data(dev);
- priv->regs = (struct mcspi *)(dev_read_addr(dev) + data->regs_offset);
+ priv->regs = (struct mcspi *)(devfdt_get_addr(dev) + data->regs_offset);
if (fdtdec_get_bool(blob, node, "ti,pindir-d0-out-d1-in"))
priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
else
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index cd2e17bfd1..d2dccd67e5 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -519,7 +519,7 @@ static int sun4i_spi_ofdata_to_platdata(struct udevice *bus)
struct sun4i_spi_platdata *plat = dev_get_platdata(bus);
int node = dev_of_offset(bus);
- plat->base = dev_read_addr(bus);
+ plat->base = devfdt_get_addr(bus);
plat->variant = (struct sun4i_spi_variant *)dev_get_driver_data(bus);
plat->max_hz = fdtdec_get_int(gd->fdt_blob, node,
"spi-max-frequency",
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 771744dfe4..22a0304bfc 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -93,7 +93,7 @@ static int tegra20_sflash_ofdata_to_platdata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
- plat->base = dev_read_addr(bus);
+ plat->base = devfdt_get_addr(bus);
plat->periph_id = clock_decode_periph_id(bus);
if (plat->periph_id == PERIPH_ID_NONE) {
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index f9846ee366..3679cf06a0 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -99,7 +99,7 @@ static int tegra30_spi_ofdata_to_platdata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
- plat->base = dev_read_addr(bus);
+ plat->base = devfdt_get_addr(bus);
plat->periph_id = clock_decode_periph_id(bus);
if (plat->periph_id == PERIPH_ID_NONE) {
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 5fdbb49442..0db0de8f1b 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -461,7 +461,7 @@ static int ti_qspi_ofdata_to_platdata(struct udevice *bus)
fdt_addr_t mmap_size;
priv->ctrl_mod_mmap = map_syscon_chipselects(bus);
- priv->base = map_physmem(dev_read_addr(bus),
+ priv->base = map_physmem(devfdt_get_addr(bus),
sizeof(struct ti_qspi_regs), MAP_NOCACHE);
mmap_addr = devfdt_get_addr_size_index(bus, 1, &mmap_size);
priv->memory_map = map_physmem(mmap_addr, mmap_size, MAP_NOCACHE);
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index 9923931e36..78ffd3e2fe 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -77,7 +77,7 @@ static int zynq_spi_ofdata_to_platdata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
- plat->regs = dev_read_addr_ptr(bus);
+ plat->regs = (struct zynq_spi_regs *)devfdt_get_addr(bus);
/* FIXME: Use 250MHz as a suitable default */
plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index a72986be90..c3a5b3e301 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -181,10 +181,10 @@ static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus)
debug("%s\n", __func__);
- plat->regs = (struct zynqmp_qspi_regs *)(dev_read_addr(bus) +
+ plat->regs = (struct zynqmp_qspi_regs *)(devfdt_get_addr(bus) +
GQSPI_REG_OFFSET);
plat->dma_regs = (struct zynqmp_qspi_dma_regs *)
- (dev_read_addr(bus) + GQSPI_DMA_REG_OFFSET);
+ (devfdt_get_addr(bus) + GQSPI_DMA_REG_OFFSET);
return 0;
}
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 2f430aed9c..ed93faffcb 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -156,7 +156,7 @@ static int msm_spmi_probe(struct udevice *dev)
bool is_v1;
int i;
- priv->arb_chnl = dev_read_addr(dev);
+ priv->arb_chnl = devfdt_get_addr(dev);
priv->spmi_core = fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
dev_of_offset(parent), node, "reg", 1, NULL, false);
priv->spmi_obs = fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
diff --git a/drivers/timer/ag101p_timer.c b/drivers/timer/ag101p_timer.c
index c011906b93..6e20b4fc33 100644
--- a/drivers/timer/ag101p_timer.c
+++ b/drivers/timer/ag101p_timer.c
@@ -92,7 +92,7 @@ static int atftmr_timer_probe(struct udevice *dev)
static int atftme_timer_ofdata_to_platdata(struct udevice *dev)
{
struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct atftmr_timer_regs),
MAP_NOCACHE);
return 0;
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 6cb2923e0b..6ca9501eb1 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -69,7 +69,7 @@ static int altera_timer_ofdata_to_platdata(struct udevice *dev)
{
struct altera_timer_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev),
+ plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct altera_timer_regs),
MAP_NOCACHE);
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index 5d4ae68509..c5d43b4a4a 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -89,7 +89,7 @@ static int atcpit_timer_probe(struct udevice *dev)
static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
{
struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
- plat->regs = map_physmem(dev_read_addr(dev), 0x100 , MAP_NOCACHE);
+ plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
return 0;
}
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index cf3d27b96b..700c349f37 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -79,7 +79,7 @@ static int omap_timer_ofdata_to_platdata(struct udevice *dev)
{
struct omap_timer_priv *priv = dev_get_priv(dev);
- priv->regs = map_physmem(dev_read_addr(dev),
+ priv->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct omap_gptimer_regs), MAP_NOCACHE);
return 0;
diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c
index 54b52dcd66..88317b19ac 100644
--- a/drivers/usb/dwc3/dwc3-uniphier.c
+++ b/drivers/usb/dwc3/dwc3-uniphier.c
@@ -70,7 +70,7 @@ static int uniphier_dwc3_probe(struct udevice *dev)
int (*init)(void __iomem *regs);
int ret;
- base = dev_read_addr(dev);
+ base = devfdt_get_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 3b208e8eb2..f9083d9a64 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -95,7 +95,7 @@ static int ehci_atmel_probe(struct udevice *dev)
/*
* Get the base address for EHCI controller from the device node
*/
- hcd_base = dev_read_addr(dev);
+ hcd_base = devfdt_get_addr(dev);
if (hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the EHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 6a37c5d982..0b0b2137c7 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -53,7 +53,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
/*
* Get the base address for XHCI controller from the device node
*/
- plat->hcd_base = dev_read_addr(dev);
+ plat->hcd_base = devfdt_get_addr(dev);
if (plat->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the XHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 5423d10abe..ac6c5b5845 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -105,7 +105,7 @@ static int ehci_fsl_probe(struct udevice *dev)
/*
* Get the base address for EHCI controller from the device node
*/
- priv->hcd_base = dev_read_addr(dev);
+ priv->hcd_base = devfdt_get_addr(dev);
if (priv->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the EHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 62414bb110..8fe685af26 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -109,7 +109,7 @@ static int ehci_mvebu_probe(struct udevice *dev)
/*
* Get the base address for EHCI controller from the device node
*/
- priv->hcd_base = dev_read_addr(dev);
+ priv->hcd_base = devfdt_get_addr(dev);
if (priv->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the EHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index caafa68899..212b362332 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -306,7 +306,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
static int ehci_usb_probe(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_platdata(dev);
- struct usb_ehci *ehci = dev_read_addr_ptr(dev);
+ struct usb_ehci *ehci = (struct usb_ehci *)devfdt_get_addr(dev);
struct ehci_mx5_priv_data *priv = dev_get_priv(dev);
enum usb_init_type type = plat->init_type;
struct ehci_hccr *hccr;
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 37b59758bb..5f84c7b91d 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -473,7 +473,7 @@ static const struct ehci_ops mx6_ehci_ops = {
static int ehci_usb_phy_mode(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_platdata(dev);
- void *__iomem addr = dev_read_addr_ptr(dev);
+ void *__iomem addr = (void *__iomem)devfdt_get_addr(dev);
void *__iomem phy_ctrl, *__iomem phy_status;
const void *blob = gd->fdt_blob;
int offset = dev_of_offset(dev), phy_off;
@@ -580,7 +580,7 @@ static int ehci_usb_bind(struct udevice *dev)
static int ehci_usb_probe(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_platdata(dev);
- struct usb_ehci *ehci = dev_read_addr_ptr(dev);
+ struct usb_ehci *ehci = (struct usb_ehci *)devfdt_get_addr(dev);
struct ehci_mx6_priv_data *priv = dev_get_priv(dev);
enum usb_init_type type = plat->init_type;
struct ehci_hccr *hccr;
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 82b99eeef1..93ab83941d 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -382,7 +382,7 @@ static int omap_ehci_probe(struct udevice *dev)
struct ehci_hccr *hccr;
struct ehci_hcor *hcor;
- priv->ehci = dev_read_addr_ptr(dev);
+ priv->ehci = (struct omap_ehci *)devfdt_get_addr(dev);
priv->portnr = dev->seq;
priv->init_type = plat->init_type;
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 2768d40974..562207d3d2 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -224,7 +224,7 @@ static int vf_usb_ofdata_to_platdata(struct udevice *dev)
priv->portnr = dev->seq;
- priv->ehci = dev_read_addr_ptr(dev);
+ priv->ehci = (struct usb_ehci *)devfdt_get_addr(dev);
mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
if (mode) {
if (0 == strcmp(mode, "host")) {
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 22e7b565b5..692018243c 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -89,7 +89,7 @@ int usb_cpu_init_fail(void)
#if CONFIG_IS_ENABLED(DM_USB)
static int ohci_da8xx_probe(struct udevice *dev)
{
- struct ohci_regs *regs = dev_read_addr_ptr(dev);
+ struct ohci_regs *regs = (struct ohci_regs *)devfdt_get_addr(dev);
struct da8xx_ohci *priv = dev_get_priv(dev);
int i, err, ret, clock_nb;
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index b84bf8ac0f..631711a9e8 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -79,7 +79,7 @@ static int ohci_shutdown_phy(struct udevice *dev)
static int ohci_usb_probe(struct udevice *dev)
{
- struct ohci_regs *regs = dev_read_addr_ptr(dev);
+ struct ohci_regs *regs = (struct ohci_regs *)devfdt_get_addr(dev);
struct generic_ohci *priv = dev_get_priv(dev);
int i, err, ret, clock_nb, reset_nb;
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 6fb7a7f6e0..1705accbde 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -62,7 +62,7 @@ static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
/*
* Get the base address for XHCI controller from the device node
*/
- plat->hcd_base = dev_read_addr(dev);
+ plat->hcd_base = devfdt_get_addr(dev);
if (plat->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the XHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index 0a2da70e20..d8fb2c5345 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -120,7 +120,7 @@ static int xhci_fsl_probe(struct udevice *dev)
/*
* Get the base address for XHCI controller from the device node
*/
- priv->hcd_base = dev_read_addr(dev);
+ priv->hcd_base = devfdt_get_addr(dev);
if (priv->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the XHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index f2e338f6fb..5fb74848c2 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -72,7 +72,7 @@ static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
/*
* Get the base address for XHCI controller from the device node
*/
- plat->hcd_base = dev_read_addr(dev);
+ plat->hcd_base = devfdt_get_addr(dev);
if (plat->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the XHCI register base address\n");
return -ENXIO;
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 8fc51df3d1..4964697f27 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -136,7 +136,7 @@ static int xhci_rcar_ofdata_to_platdata(struct udevice *dev)
{
struct rcar_xhci_platdata *plat = dev_get_platdata(dev);
- plat->hcd_base = dev_read_addr(dev);
+ plat->hcd_base = devfdt_get_addr(dev);
if (plat->hcd_base == FDT_ADDR_T_NONE) {
debug("Can't get the XHCI register base address\n");
return -ENXIO;
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 38def2816b..35a56a8eab 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -507,7 +507,7 @@ static int atmel_hlcdc_ofdata_to_platdata(struct udevice *dev)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct atmel_hlcd_regs *)devfdt_get_addr(dev);
if (!priv->regs) {
debug("%s: No display controller address\n", __func__);
return -EINVAL;
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 999ee1c14a..749bde862e 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -884,7 +884,7 @@ static int exynos_dp_ofdata_to_platdata(struct udevice *dev)
unsigned int node = dev_of_offset(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE) {
debug("Can't get the DP base address\n");
return -EINVAL;
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index 979b909182..d5b13a6723 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -486,7 +486,7 @@ int exynos_fb_ofdata_to_platdata(struct udevice *dev)
const void *blob = gd->fdt_blob;
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE) {
debug("Can't get the FIMD base address\n");
return -EINVAL;
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 827ea13d13..1208d91286 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -346,7 +346,7 @@ static int tegra_lcd_ofdata_to_platdata(struct udevice *dev)
int rgb;
int ret;
- priv->disp = dev_read_addr_ptr(dev);
+ priv->disp = (struct disp_ctlr *)devfdt_get_addr(dev);
if (!priv->disp) {
debug("%s: No display controller address\n", __func__);
return -EINVAL;
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 8e6372f0be..5bf08653a9 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -171,7 +171,7 @@ static int mxc_w1_ofdata_to_platdata(struct udevice *dev)
struct mxc_w1_pdata *pdata = dev_get_platdata(dev);
fdt_addr_t addr;
- addr = dev_read_addr(dev);
+ addr = devfdt_get_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 9059a4c610..ed8b2199c2 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -237,7 +237,7 @@ static int omap3_wdt_probe(struct udevice *dev)
{
struct omap3_wdt_priv *priv = dev_get_priv(dev);
- priv->regs = dev_read_addr_ptr(dev);
+ priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
if (!priv->regs)
return -EINVAL;
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index f673fce327..2d8bfc09a0 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -92,7 +92,7 @@ static int stm32mp_wdt_probe(struct udevice *dev)
debug("IWDG init\n");
- priv->base = dev_read_addr(dev);
+ priv->base = devfdt_get_addr(dev);
if (priv->base == FDT_ADDR_T_NONE)
return -EINVAL;