]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
treewide: convert devfdt_get_addr() to dev_read_addr()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 17 Jul 2020 05:36:48 +0000 (14:36 +0900)
committerSimon Glass <sjg@chromium.org>
Mon, 20 Jul 2020 17:37:47 +0000 (11:37 -0600)
When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

  <smpl>
  @@
  expression dev;
  @@
  -devfdt_get_addr(dev)
  +dev_read_addr(dev)
  </smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
120 files changed:
arch/arm/mach-snapdragon/clock-snapdragon.c
arch/arm/mach-snapdragon/pinctrl-snapdragon.c
drivers/ata/dwc_ahci.c
drivers/clk/altera/clk-agilex.c
drivers/clk/altera/clk-arria10.c
drivers/clk/exynos/clk-exynos7420.c
drivers/clk/uniphier/clk-uniphier-core.c
drivers/dma/ti-edma3.c
drivers/gpio/altera_pio.c
drivers/gpio/atmel_pio4.c
drivers/gpio/bcm2835_gpio.c
drivers/gpio/da8xx_gpio.c
drivers/gpio/gpio-rza1.c
drivers/gpio/gpio-uniphier.c
drivers/gpio/msm_gpio.c
drivers/gpio/mxc_gpio.c
drivers/gpio/mxs_gpio.c
drivers/gpio/omap_gpio.c
drivers/gpio/pm8916_gpio.c
drivers/gpio/s5p_gpio.c
drivers/gpio/sifive-gpio.c
drivers/gpio/vybrid_gpio.c
drivers/i2c/i2c-uniphier-f.c
drivers/i2c/i2c-uniphier.c
drivers/i2c/imx_lpi2c.c
drivers/i2c/iproc_i2c.c
drivers/i2c/mxc_i2c.c
drivers/i2c/omap24xx_i2c.c
drivers/mailbox/tegra-hsp.c
drivers/misc/altera_sysid.c
drivers/misc/imx8/scu.c
drivers/misc/microchip_flexcom.c
drivers/mmc/bcm2835_sdhci.c
drivers/mmc/bcm2835_sdhost.c
drivers/mmc/bcmstb_sdhci.c
drivers/mmc/jz_mmc.c
drivers/mmc/meson_gx_mmc.c
drivers/mmc/omap_hsmmc.c
drivers/mmc/sdhci-cadence.c
drivers/mmc/sh_mmcif.c
drivers/mmc/sh_sdhi.c
drivers/mmc/tangier_sdhci.c
drivers/mmc/tmio-common.c
drivers/net/ag7xxx.c
drivers/net/dwc_eth_qos.c
drivers/net/ethoc.c
drivers/net/fec_mxc.c
drivers/net/fsl_mcdmafec.c
drivers/net/ftgmac100.c
drivers/net/ftmac100.c
drivers/net/ks8851_mll.c
drivers/net/mcffec.c
drivers/net/mtk_eth.c
drivers/net/mvgbe.c
drivers/net/mvneta.c
drivers/net/ravb.c
drivers/net/sh_eth.c
drivers/net/smc911x.c
drivers/net/sni_ave.c
drivers/net/sun8i_emac.c
drivers/net/sunxi_emac.c
drivers/net/ti/keystone_net.c
drivers/net/xilinx_axi_emac.c
drivers/net/xilinx_emaclite.c
drivers/pinctrl/ath79/pinctrl_ar933x.c
drivers/pinctrl/ath79/pinctrl_qca953x.c
drivers/pinctrl/exynos/pinctrl-exynos.c
drivers/pinctrl/pinctrl-at91-pio4.c
drivers/pinctrl/renesas/pfc-r7s72100.c
drivers/pinctrl/renesas/pfc.c
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
drivers/reset/reset-uniphier.c
drivers/rtc/mvrtc.c
drivers/serial/altera_jtag_uart.c
drivers/serial/altera_uart.c
drivers/serial/atmel_usart.c
drivers/serial/serial_ar933x.c
drivers/serial/serial_bcm283x_mu.c
drivers/serial/serial_lpuart.c
drivers/serial/serial_mcf.c
drivers/serial/serial_meson.c
drivers/serial/serial_msm.c
drivers/serial/serial_mxc.c
drivers/serial/serial_pl01x.c
drivers/serial/serial_s5p.c
drivers/serial/serial_sh.c
drivers/serial/serial_sti_asc.c
drivers/serial/serial_stm32.c
drivers/serial/serial_uniphier.c
drivers/spi/altera_spi.c
drivers/spi/atcspi200_spi.c
drivers/spi/ath79_spi.c
drivers/spi/cf_spi.c
drivers/spi/davinci_spi.c
drivers/spi/fsl_dspi.c
drivers/spi/mxc_spi.c
drivers/spi/omap3_spi.c
drivers/spi/spi-sunxi.c
drivers/spi/tegra20_sflash.c
drivers/spi/tegra20_slink.c
drivers/spi/ti_qspi.c
drivers/spi/zynqmp_gqspi.c
drivers/spmi/spmi-msm.c
drivers/timer/ag101p_timer.c
drivers/timer/altera_timer.c
drivers/timer/atcpit100_timer.c
drivers/timer/omap-timer.c
drivers/usb/dwc3/dwc3-uniphier.c
drivers/usb/host/ehci-atmel.c
drivers/usb/host/ehci-exynos.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-marvell.c
drivers/usb/host/xhci-exynos5.c
drivers/usb/host/xhci-fsl.c
drivers/usb/host/xhci-mvebu.c
drivers/usb/host/xhci-rcar.c
drivers/video/exynos/exynos_dp.c
drivers/video/exynos/exynos_fb.c
drivers/w1/mxc_w1.c
drivers/watchdog/stm32mp_wdt.c

index 85526186c609850df29523ce5fe57d593026bd70..69d65c82e3ec42c849e1f64b59db9abdda7d18f7 100644 (file)
@@ -114,7 +114,7 @@ static int msm_clk_probe(struct udevice *dev)
 {
        struct msm_clk_priv *priv = dev_get_priv(dev);
 
-       priv->base = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
        if (priv->base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 442d236255011f8d88d6b641990012221730fe8e..4c2af213082ba0969249d217be1d63d9d1d72b93 100644 (file)
@@ -56,7 +56,7 @@ static int msm_pinctrl_probe(struct udevice *dev)
 {
        struct msm_pinctrl_priv *priv = dev_get_priv(dev);
 
-       priv->base = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
        priv->data = (struct msm_pinctrl_data *)dev->driver_data;
 
        return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
index 017650ae468301fd274ed098cfbcb811219dacb8..825fe57f85222536649dcd7277f8a944e52cd8df 100644 (file)
@@ -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(devfdt_get_addr(dev), sizeof(void *),
+       priv->base = map_physmem(dev_read_addr(dev), sizeof(void *),
                                 MAP_NOCACHE);
 
        addr = devfdt_get_addr_index(dev, 1);
index 0042958f4c428306302136205f01c9e51221c34c..9927ada201f0e87195e620c0647feda3c398fdc0 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
        plat->regs = (void __iomem *)addr;
index ede0be299dfcbaa2c89f91ab04f1834d9c7d5571..732ed4d79b9f25677eb6add4e7af0eecfd66d96b 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+               plat->regs = dev_read_addr(dev);
        } else {
                pdev = dev_get_parent(dev);
                if (!pdev)
index aa86c7ca4457e498492520779c8e481a0d0adb64..4a023ea736b402d29a394e14538eec0d5a8b9363 100644 (file)
@@ -95,7 +95,7 @@ static int exynos7420_clk_topc_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_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 = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index c9ec523080d7bea66c34f72a113895227aaa5e60..4e25db354e0c0b5e1764482291dcf5875afc5405 100644 (file)
@@ -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 = devfdt_get_addr(dev->parent);
+       addr = dev_read_addr(dev->parent);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 77c4ba953075958444eb8dae88beb50933c3a2de..13ab967089042943280414899c89949a46f5307c 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
 
        return 0;
 }
index 324f9c29a82e5ba914ecbbb84825bc43d49c3735..75800d9f31c60293fbe0032e555584ef5faba88d 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_pio_regs),
                                 MAP_NOCACHE);
        plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
index 455944d547a224476d752a33b9e4e32c1c611515..18f365fa4116102163e49510b93e0abbfcac8fda 100644 (file)
@@ -299,7 +299,7 @@ static int atmel_pio4_probe(struct udevice *dev)
 
        clk_free(&clk);
 
-       addr_base = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index f4b67f1cf0aff523a19bcaf6bcf64833f0c1abca..0dff9ac711d724d51d207db9a98b4e8d32472dd5 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index ab0a5cfd330c3473483f7f8c81a0bc692fc3d5d6..f875888510101157e39cde0d4651a36e0bbd70bf 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 21a87d645cdbec7af1eca164ddd4f701bf25af9d..86804ac2f5ff626e3177c9196e370f705b64fe7b 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 30392bccaaa0b9ac73996bc4e0d51cb8d51f4473..54a38da0f10429ea66637bbec019aac45f352bdd 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index ac5d20c1b95f66dfb58add6084cae65adb9953a3..fe6b33e1dffa6fd32177f2e98f57e61c1ad0d7e4 100644 (file)
@@ -96,7 +96,7 @@ static int msm_gpio_probe(struct udevice *dev)
 {
        struct msm_gpio_bank *priv = dev_get_priv(dev);
 
-       priv->base = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
 
        return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
 }
index 90d36fb87bb116451ee88a725756c288bc81e430..a16f5719edebcd68649b17ec1e41ab81c4de57fc 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index cb797261b7f368f0f69bd02f151a970fcb9324f7..2c16517e724667c8f43d825be6bcc8d27ab6196d 100644 (file)
@@ -275,7 +275,7 @@ static int mxs_ofdata_to_platdata(struct udevice *dev)
        int node = dev_of_offset(dev);
        int ret;
 
-       plat->bank = devfdt_get_addr(dev);
+       plat->bank = dev_read_addr(dev);
        if (plat->bank == FDT_ADDR_T_NONE) {
                printf("%s: No 'reg' property defined!\n", __func__);
                return -EINVAL;
index c986ef03805cc817141d7a02d85d8da99942bb34..6eaa0a08a26a914462e425f959aeb092467690c9 100644 (file)
@@ -308,7 +308,7 @@ static int omap_gpio_bind(struct udevice *dev)
        if (plat)
                return 0;
 
-       base_addr = devfdt_get_addr(dev);
+       base_addr = dev_read_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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 51df5367ea7e6daa60efdf0e9cffb22224cc6441..58f044678b7de49e3764e311adae46a5a3d59b5e 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->pid = dev_read_addr(dev);
        if (priv->pid == FDT_ADDR_T_NONE)
                return log_msg_ret("bad address", -EINVAL);
 
index 4a68f44704ba420867c3149444fb8aebf9ae84cf..c78227f4da3bcd7e1fcf4f1f575f3d3cda1fc6d0 100644 (file)
@@ -339,7 +339,7 @@ static int gpio_exynos_bind(struct udevice *parent)
 
                dev_set_of_offset(dev, node);
 
-               reg = devfdt_get_addr(dev);
+               reg = dev_read_addr(dev);
                if (reg != FDT_ADDR_T_NONE)
                        bank = (struct s5p_gpio_bank *)((ulong)base + reg);
 
index 24da3b3c230dc7d4a696bef64e10a7dd0d452c0b..bf3537b76bdbdc49cbf346d3d29dd8af018806c4 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index d2c1d7d859013da212ce19cf80f25d1653e31fc2..4efff5c3643810a071af38b7110411c9c7bb95c7 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       base_addr = dev_read_addr(dev);
        if (base_addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index d8b4a683bcedebb945d95e4e87a119d3ebabaa35..a110fe9e8d95b85266fbe85f652a203af7c146bb 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index f06523ab99b2fa6ea826e6521e7fa952c45ace73..e7f44e14e9c2e3428d445dd8e45df009bbd70e31 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index b7b2aafc7f673db0b5b660881122ffa1281f0a2a..feeed1e9a2f95ec43d348a19c14a00abfe75f8cd 100644 (file)
@@ -447,7 +447,7 @@ static int imx_lpi2c_probe(struct udevice *bus)
 
        i2c_bus->driver_data = dev_get_driver_data(bus);
 
-       addr = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index a846e0a1fe00fdfd03a183dade8c920a4804769a..b7e9ced898310490d73e8ad1ccaaf79e2f9a179f 100644 (file)
@@ -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(devfdt_get_addr(bus),
+       bus_prvdata->base = map_physmem(dev_read_addr(bus),
                                        sizeof(void *),
                                        MAP_NOCACHE);
 
index 3b0d27e6cdb4316416368fe5bcb64dfae7670402..1a1de672524178aa1e6c3b57346a08db9cbd66df 100644 (file)
@@ -899,7 +899,7 @@ static int mxc_i2c_probe(struct udevice *bus)
 
        i2c_bus->driver_data = dev_get_driver_data(bus);
 
-       addr = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 8592a819c40a6fe54bc2092e6dc15ff14c0a0c61..0af4e333c412799c56a70f8e95a28671e4fd82e6 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       plat->base = dev_read_addr(bus);
        plat->speed = dev_read_u32_default(bus, "clock-frequency",
                                           I2C_SPEED_STANDARD_RATE);
        plat->ip_rev = dev_get_driver_data(bus);
index f82e6d3d16684ebf1077c9e6104f0ea1a1dc0cde..e91dac201d2ab613ed811bec5cda95c09f128949 100644 (file)
@@ -153,7 +153,7 @@ static int tegra_hsp_probe(struct udevice *dev)
 
        debug("%s(dev=%p)\n", __func__, dev);
 
-       thsp->regs = devfdt_get_addr(dev);
+       thsp->regs = dev_read_addr(dev);
        if (thsp->regs == FDT_ADDR_T_NONE)
                return -ENODEV;
 
index 387c70b07049bc468f9a230b7918827f2d41dd80..c6502650b75d08a9d52ebf449f686e91e2292458 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_sysid_regs),
                                 MAP_NOCACHE);
 
index ee635eb947104ab5f093b9cca7b7377e21af5967..223aac8518a624bcacb192c79da599706b9b060b 100644 (file)
@@ -187,7 +187,7 @@ static int imx8_scu_probe(struct udevice *dev)
 
        debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
 
-       addr = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 44a8b180a4393a12770a51dd0ef9704b514576e8..64cc4ae7b61ead62855b7b5b9cdb48bb0ab90025 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct microchip_flexcom_regs),
                                MAP_NOCACHE);
 
index 5cdf3c506fe3f326bdd65b75f3f5309dca162bbd..7a410d1dd361b97cf38d7bb1d2aa5826f81e8e85 100644 (file)
@@ -182,7 +182,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
        int ret;
        int clock_id = (int)dev_get_driver_data(dev);
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index c4876e81f8cfdf931c594b274ec1673a040ebec3..b793028ab53edb965f986777ad3542710f67ced3 100644 (file)
@@ -766,7 +766,7 @@ static int bcm2835_probe(struct udevice *dev)
        upriv->mmc = &plat->mmc;
        plat->cfg.name = dev->name;
 
-       host->phys_addr = devfdt_get_addr(dev);
+       host->phys_addr = dev_read_addr(dev);
        if (host->phys_addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index c14f8289e6c6d0860c8bebd10012e58a60aa040d..5269aa77cebdd98fd0a994aa7e2f67fae6a59ae2 100644 (file)
@@ -62,7 +62,7 @@ static int sdhci_bcmstb_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index d3f1eddf4506e74f9fc4e07b32c93c25fca32009..b33f0850738c1eab54cdedd014393b906981fb48 100644 (file)
@@ -450,7 +450,7 @@ static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
        struct mmc_config *cfg;
        int ret;
 
-       priv->regs = map_physmem(devfdt_get_addr(dev), 0x100, MAP_NOCACHE);
+       priv->regs = map_physmem(dev_read_addr(dev), 0x100, MAP_NOCACHE);
        cfg = &plat->cfg;
 
        cfg->name = "MSC";
index b7f793cd0479d88d84c089a8947748427777d2b0..719dd1e5e5706132ecd62ac94f1560e43c419926 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index db1f85125f9a57d67e66b232db4b48e50b7e2014..715eee0e3e0da1b8ec33d91c44834394b2553db1 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->base_addr = map_physmem(dev_read_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(devfdt_get_addr(dev));
+       fixups = platform_fixups_mmc(dev_read_addr(dev));
        if (fixups) {
                plat->hw_rev = fixups->hw_rev;
                cfg->host_caps &= ~fixups->unsupported_caps;
index 7b5010b6558953a3a785011ef25430eb94020efd..cc99bebc3058828458254cdea2f681db154b81e0 100644 (file)
@@ -260,7 +260,7 @@ static int sdhci_cdns_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 2e994d0178d9ff8186294134c38cfbf221e95818..ad386909e9041328c350082e70e73764defd324c 100644 (file)
@@ -680,7 +680,7 @@ static int sh_mmcif_dm_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 772fe943e4d9496379cedd1089b5e0275dbc167c..315f95cce8291e81606fa54042837568fffa89c6 100644 (file)
@@ -834,7 +834,7 @@ static int sh_sdhi_dm_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 0d6e5d62460b375c7b0a16934fd78a623e82a340..879e2c98a21d2be752f3d06d338f73950e85ffa2 100644 (file)
@@ -35,7 +35,7 @@ static int sdhci_tangier_probe(struct udevice *dev)
        fdt_addr_t base;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 20cd237ef0ebccbe2bbcfb1157ca1582fdd54e65..c65397367662e1fae7a9a579ed525e5b68384f38 100644 (file)
@@ -722,7 +722,7 @@ int tmio_sd_probe(struct udevice *dev, u32 quirks)
        ulong mclk;
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 3b5d11f956d184fd6ce061b5e37e5d2574bfa412..ccba3947ac56dd2934a4532533acc27f5b27769d 100644 (file)
@@ -1256,7 +1256,7 @@ static int ag7xxx_eth_ofdata_to_platdata(struct udevice *dev)
        const char *phy_mode;
        int ret;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
 
        /* Decoding of convoluted PHY wiring on Atheros MIPS. */
index 62941bb1753067d7bf8d90fa694c3fdd6af940a3..1d9eefbb3e80f0c4853a64e38a319918fd5cf868 100644 (file)
@@ -1995,9 +1995,9 @@ static int eqos_probe(struct udevice *dev)
        eqos->dev = dev;
        eqos->config = (void *)dev_get_driver_data(dev);
 
-       eqos->regs = devfdt_get_addr(dev);
+       eqos->regs = dev_read_addr(dev);
        if (eqos->regs == FDT_ADDR_T_NONE) {
-               pr_err("devfdt_get_addr() failed");
+               pr_err("dev_read_addr() failed");
                return -ENODEV;
        }
        eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
index fd589a0764c7cc9025ace234b4a6c933ac3bf04a..b9d80a5b08a4dfc0e3fdef7c3dab1680bd194ddb 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->eth_pdata.iobase = dev_read_addr(dev);
        addr = devfdt_get_addr_index(dev, 1);
        if (addr != FDT_ADDR_T_NONE)
                pdata->packet_base = addr;
index a3f6e3adaf65c0df30ec76afff393c3cd489e160..bb55be9a26799a525597077e5f3121871999bd40 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        priv->eth = (struct ethernet_regs *)pdata->iobase;
 
        pdata->phy_interface = -1;
index 4c9a62ad508b40bcea211b9ed667abb6aa9ca42d..e27f7e5321ad5e3cef84d412b92f975cd1099a22 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        /* Default to 10Mbit/s */
        pdata->max_speed = 10;
 
index e4d08f2ba0131155beef9837e40f93acd28ce047..5676a5b3ba938d34f3d935e6b8fe5f5f636afb23 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
        phy_mode = dev_read_string(dev, "phy-mode");
        if (phy_mode)
index 79c64ec89ae84c8d8e109719d051edea45ca3d38..292690de9615949367a89b4b2369aed0ad707f5c 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        priv->iobase = pdata->iobase;
        mac = dtbmacaddr(0);
        if (mac)
index 1773c7671f38e74383bd097129af8ccda90f793b..d22668446da166f7c6ab60d05cffac1d02661c05 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        ks->iobase = pdata->iobase;
 
        return 0;
index d8367b5da8fdc3b79ee0a414a11498398ab3427a..f94a2d8123c37b393f3fd2b677a4f8a2f3f6d99f 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        /* Default to 10Mbit/s */
        pdata->max_speed = 10;
 
index 86f1360ae35a1e3159b5d27b105990abc9e887eb..a06a15772c9bdd726d1ace81629f3cb98c6062cb 100644 (file)
@@ -1418,7 +1418,7 @@ static int mtk_eth_ofdata_to_platdata(struct udevice *dev)
 
        priv->soc = dev_get_driver_data(dev);
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
 
        /* get corresponding ethsys phandle */
        ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
index 86b1b8cee5d287b280f2da0d7bb38abf6f17eacd..2f9464b961a9381399682ca0a7c0613e35be877e 100644 (file)
@@ -997,7 +997,7 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev)
        int pnode;
        unsigned long addr;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
 
        pnode = fdt_node_offset_by_compatible(blob, node,
index 092f619bd5cc75f8019b1da2bd53e31b7af48f54..4c7d06ca40e5da1761d561334570579ea3d3c6b5 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
 
        /* Get phy-mode / phy_interface from DT */
        pdata->phy_interface = -1;
index 393ee9bb816a94283b5d3833bacbf59af5b05b31..886f53ee82741acbc4b6fe613c10f5aa84403605 100644 (file)
@@ -651,7 +651,7 @@ int ravb_ofdata_to_platdata(struct udevice *dev)
        const fdt32_t *cell;
        int ret = 0;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
        phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
                               NULL);
index 8823769eddfd8a0c3444ae14fa6293b72969d989..4cbffb14c517754798125ae619c261eca178c4fa 100644 (file)
@@ -918,7 +918,7 @@ int sh_ether_ofdata_to_platdata(struct udevice *dev)
        const fdt32_t *cell;
        int ret = 0;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
        phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
                               NULL);
index 9c5dc46483f11fb747fb2cd72d184deba84b02a2..09372d7f6ba9d91cbb882a5c13114ddb9974ca87 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        priv->iobase = pdata->iobase;
 
        return 0;
index 078463568950001ed98cd8a56cae556509b1232f..0f7ada8c3e2ca5f85b2f7a33e0d25a5374d47d11 100644 (file)
@@ -746,7 +746,7 @@ static int ave_ofdata_to_platdata(struct udevice *dev)
        if (!priv->data)
                return -EINVAL;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        pdata->phy_interface = -1;
        phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
                               NULL);
index e2b05ace8f7189f89304042ece87b43275c4e25b..546cc6ccb6ef55e778cf15ea8d3e519011e42855 100644 (file)
@@ -919,7 +919,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
 #endif
        int ret;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        if (pdata->iobase == FDT_ADDR_T_NONE) {
                debug("%s: Cannot find MAC base address\n", __func__);
                return -EINVAL;
index 6364beb9f2a8f31655d7f0fe29a7f1dc9d20887f..df18ecc06450bfb5f83b0a76672990995d04dd4e 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
 
        return 0;
 }
index e3ac40ca0d0a008c6ff4ddeb1a2e14b00c15a7fb..50f0d33a83b57069926dfccd120532079e625245 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
 
        return 0;
 }
index 35176c545e579570bb7dc4c078d313d8c924583b..99d4d85c5270357a720a567bdc06eb6b41b107f2 100644 (file)
@@ -722,7 +722,7 @@ static int axi_emac_ofdata_to_platdata(struct udevice *dev)
        int offset = 0;
        const char *phy_mode;
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        priv->iobase = (struct axi_regs *)pdata->iobase;
 
        offset = fdtdec_lookup_phandle(gd->fdt_blob, node,
index e7f7e6ad1d615c35262968b4a7aff63fec20f4f9..64c18bae74b0edbb1044d18535f2cbe16f568256 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
                                                                 0x10000);
 
index a0625d7c835c9b03d42d91d17eed0c3e94f8d0ca..61e80818743d518c3d684e27ee1d76586544b8b7 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index c9f9608c92e8790b3b183dc841ecd9fb23411468..2d5a4a3ab23837ec051ac9b7a22bdc1ccd3b4e09 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index e3ac5a6e498de59c3455759c0b63de47f556dbe9..4cdc071d559db6560b6a18885ccddcb6d910f491 100644 (file)
@@ -127,7 +127,7 @@ int exynos_pinctrl_probe(struct udevice *dev)
        if (!priv)
                return -EINVAL;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 801d14253c10ae771e6f76d53ca9e9d5c26e0f63..fdb7920b558d6a541aba799a5eac6754197bc480 100644 (file)
@@ -158,7 +158,7 @@ static int atmel_pinctrl_probe(struct udevice *dev)
        fdt_addr_t addr_base;
 
        dev = dev_get_parent(dev);
-       addr_base = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 5055780bf75eb3fb5ccd5edc439f5729e2191771..9d7814a5f25dc2608c4f5d08b057c039ae93d4f7 100644 (file)
@@ -112,7 +112,7 @@ static int r7s72100_pfc_probe(struct udevice *dev)
        fdt_addr_t addr_base;
        ofnode node;
 
-       addr_base = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 1179afd2e7b266cbfca0fc36ced03ddaf21bac53..340c8c0a74ff6d8217d81c022244c09fcf2d808f 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 8545b9d0707885aa831e98ea60d41d78a2f97640..631bb1f963b998654ce15542f5350dbce26d37d1 100644 (file)
@@ -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 = devfdt_get_addr(dev->parent);
+       addr = dev_read_addr(dev->parent);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 06079d2a9ce822c15b60657edbac95c6a0d8672c..fe1bd5541bdaf3ad86f28bb5855c16c4b4fdf907 100644 (file)
@@ -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 = devfdt_get_addr(dev->parent);
+       addr = dev_read_addr(dev->parent);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 6f49505d4eb7cd014765528457b014287140de30..ed057f7bc4e41fc770e5f7ea3a98443accfeafbe 100644 (file)
@@ -172,7 +172,7 @@ static int mv_rtc_ofdata_to_platdata(struct udevice *dev)
 {
        struct mvrtc_pdata *pdata = dev_get_platdata(dev);
 
-       pdata->iobase = devfdt_get_addr(dev);
+       pdata->iobase = dev_read_addr(dev);
        return 0;
 }
 
index 7a86161a0dfd219d9c58c08cac236b5f64f670b0..35b76f53f93d06c3a9b5f859dafb3465622926ee 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_jtaguart_regs),
                                 MAP_NOCACHE);
 
index f88a293d56098ba5aba2aa9171b32e4cbd6c7bbd..0be5cd75c8533040ee06a4e2c681b76e7112f244 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_uart_regs),
                                 MAP_NOCACHE);
        plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0);
index 71cb31ff75ed2c12cb4961818cc136d892d7b9d5..f759ea8893d168d8c959dbd022315861b0ae9092 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -ENODEV;
 
index 382c3b3d34a3cc6960a784585a907bd59c17f168..9de94b69bd04e5350f4e98990bd6204ad87265aa 100644 (file)
@@ -150,7 +150,7 @@ static int ar933x_serial_probe(struct udevice *dev)
        fdt_addr_t addr;
        u32 val;
 
-       addr = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 0102b10ed25abd2a72150dee82f0c19339bac3b9..8a4af87eb6404abc3c210f6e14aff29751be855b 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 0c63c41270eb43172df11e7fe32f3c943a531f7a..95cbe63b3d14240c2d21fc5dda8fc2afa5354dd5 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index b599064b48807403adf6e2ab53f42d277b754f45..402fd5343c1330d6ca52888329b010ffc2ee2783 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr_base = dev_read_addr(dev);
        if (addr_base == FDT_ADDR_T_NONE)
                return -ENODEV;
 
index 439057b1b9afcb20323ec5fac87a9a0304614aba..8cf849f8fe7e21c2dcdef6a348f0bc3983891c1c 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 0cc1aadce4a5b677b5137995059850cb8f4984fc..a1c9abcfbba267c3a4b4761498c935dfe4694cd4 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
        if (priv->base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 42abb96a26f4e15a5fa3b20698f479712b49c6ea..de6cefcd3acf2d5228e709b02897e8917c99aa87 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 6e5d81ce34a422663b41d5716ee0755b6bc1b034..2772c25f1d2d4f3706029c661fff9a3c8bb1f21e 100644 (file)
@@ -354,7 +354,7 @@ int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
        fdt_addr_t addr;
        int ret;
 
-       addr = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index e3160cf1bd76104ea45b92b9a37cae53c1d8879a..9bb2be21e7b8751f3b0758be57c2d83eaee30926 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 5f45d58e5800bc0bd79af480ecb754b5bb2c76db..13b179f03ded3a768e99b85181ae1fd2942e0b15 100644 (file)
@@ -211,7 +211,7 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev)
        fdt_addr_t addr;
        int ret;
 
-       addr = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (!addr)
                return -EINVAL;
 
index 5fbbfac82078debf6ef55b9f38215d8508954082..33ff396bff7e372614981665d31e6414fd2d69c9 100644 (file)
@@ -171,7 +171,7 @@ static int sti_asc_serial_probe(struct udevice *dev)
        unsigned long val;
        fdt_addr_t base;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index e77b90670a3944ab817b571992fe84653c4e9a9a..cab0db2c96a32ba5a03ff183ac5403ae8dfb8332 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       plat->base = dev_read_addr(dev);
        if (plat->base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index ad691b66daacdecface9bf8bfc7164b2fb4469ad..4004cb8d48a4b443bb7990598ed41b14ab8136fd 100644 (file)
@@ -115,7 +115,7 @@ static int uniphier_serial_probe(struct udevice *dev)
        fdt_addr_t base;
        u32 tmp;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 3aa7a40b77e93d87bfc6f292374ecc03ca2c02bf..61372c52b050b871ab4255cb0c0d4abff5af619a 100644 (file)
@@ -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(devfdt_get_addr(bus),
+       plat->regs = map_physmem(dev_read_addr(bus),
                                 sizeof(struct altera_spi_regs),
                                 MAP_NOCACHE);
 
index 328b16c277f32540a65b73e22ee730e68153cc99..39c6e226ba7548920081f1156486e96f03faa09b 100644 (file)
@@ -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(devfdt_get_addr(bus),
+       ns->regs = map_physmem(dev_read_addr(bus),
                                 sizeof(struct atcspi200_spi_regs),
                                 MAP_NOCACHE);
        if (!ns->regs) {
index f64a28c6e0bdfe10d13e50b5148092e3f2389673..70bedc7fbe36f887d81db8c5f75934634889b40a 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index dec92df69bd8986ef2de186d78e65ccc480c9d80..8fa6d35107561ed2564d06b18965d2cad2c3d959 100644 (file)
@@ -392,7 +392,7 @@ static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus)
        int node = dev_of_offset(bus);
        int *ctar, len;
 
-       addr = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -ENOMEM;
 
index e1e9b45cc903dc0978455fe36e6f3bc7f16fc521..a11433db1e9ac96808a662c1fc082cd1cdf1a08b 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 78ad61ca3709555af984b4011b9389584a4f1084..9396c3826f91ec4814ed523d9f033306a545f30a 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       addr = dev_read_addr(bus);
        if (addr == FDT_ADDR_T_NONE) {
                debug("DSPI: Can't get base address or size\n");
                return -ENOMEM;
index aad37803655f539120e430141b8e17b049d40ceb..e90a06a66dec6d4eb8f5b32dbb08a9409e35dc0e 100644 (file)
@@ -537,7 +537,7 @@ static int mxc_spi_probe(struct udevice *bus)
                }
        }
 
-       mxcs->base = devfdt_get_addr(bus);
+       mxcs->base = dev_read_addr(bus);
        if (mxcs->base == FDT_ADDR_T_NONE)
                return -ENODEV;
 
index 39e6813469d452c3742f36e6944402d5fb9ec8f2..fbf9575851a907099a928fd19aee4a0a6ece5f79 100644 (file)
@@ -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 *)(devfdt_get_addr(dev) + data->regs_offset);
+       priv->regs = (struct mcspi *)(dev_read_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
index d2dccd67e5bd221c7541903155c8ed60c5049d59..cd2e17bfd1a208c40d8b045eba0dcfb64ed4c053 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       plat->base = dev_read_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",
index 22a0304bfcb5938a676e0a797ca4ebc9a9803ef8..771744dfe4382055eac859ce630ef4340625a01f 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       plat->base = dev_read_addr(bus);
        plat->periph_id = clock_decode_periph_id(bus);
 
        if (plat->periph_id == PERIPH_ID_NONE) {
index 3679cf06a00662b50e38779b9e621a38afbae6d9..f9846ee3665e7ab5c692dfe18877116bd24c03e1 100644 (file)
@@ -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 = devfdt_get_addr(bus);
+       plat->base = dev_read_addr(bus);
        plat->periph_id = clock_decode_periph_id(bus);
 
        if (plat->periph_id == PERIPH_ID_NONE) {
index 0db0de8f1bf1aa963a69c712a1be695bc8eeb107..5fdbb494420f30a35a11a547d326fcc4f2f764cc 100644 (file)
@@ -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(devfdt_get_addr(bus),
+       priv->base = map_physmem(dev_read_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);
index c3a5b3e3015a326af1d9b44d6407bab381a08f5d..a72986be9078e3d8aad6acfa5fd7178cfcf6dc59 100644 (file)
@@ -181,10 +181,10 @@ static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus)
 
        debug("%s\n", __func__);
 
-       plat->regs = (struct zynqmp_qspi_regs *)(devfdt_get_addr(bus) +
+       plat->regs = (struct zynqmp_qspi_regs *)(dev_read_addr(bus) +
                                                 GQSPI_REG_OFFSET);
        plat->dma_regs = (struct zynqmp_qspi_dma_regs *)
-                         (devfdt_get_addr(bus) + GQSPI_DMA_REG_OFFSET);
+                         (dev_read_addr(bus) + GQSPI_DMA_REG_OFFSET);
 
        return 0;
 }
index ed93faffcb1300618355755403e5ff27352509a4..2f430aed9cb8473aa060aed481198fd93bc76408 100644 (file)
@@ -156,7 +156,7 @@ static int msm_spmi_probe(struct udevice *dev)
        bool is_v1;
        int i;
 
-       priv->arb_chnl = devfdt_get_addr(dev);
+       priv->arb_chnl = dev_read_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,
index 6e20b4fc337bacbd58d46ce665c19490ff1f0cef..c011906b938dc6317b6dc945c2a108b862b0877a 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct atftmr_timer_regs),
                                 MAP_NOCACHE);
        return 0;
index 6ca9501eb173eb46c8337bd9b42c2960adafc456..6cb2923e0b651047de53d4668b149d015180861c 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_timer_regs),
                                 MAP_NOCACHE);
 
index c5d43b4a4ae5e683d89cc9e14dc64fec9e1be98c..5d4ae68509270288be0c413db7aa08d0ba78e967 100644 (file)
@@ -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(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
+       plat->regs = map_physmem(dev_read_addr(dev), 0x100 , MAP_NOCACHE);
        return 0;
 }
 
index 700c349f371631e6a38c47b6f3f3a97cee631a16..cf3d27b96bc2373e88317c64cf710c9414157904 100644 (file)
@@ -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(devfdt_get_addr(dev),
+       priv->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct omap_gptimer_regs), MAP_NOCACHE);
 
        return 0;
index 88317b19ac050ebcf39de98a9d6aa3d28af0a030..54b52dcd66a9f004ca862ca549012796288fc1e2 100644 (file)
@@ -70,7 +70,7 @@ static int uniphier_dwc3_probe(struct udevice *dev)
        int (*init)(void __iomem *regs);
        int ret;
 
-       base = devfdt_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index f9083d9a64ac6d6be08ca3e3db2152ce6114cd51..3b208e8eb228667fc75f63269df70b948286c893 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       hcd_base = dev_read_addr(dev);
        if (hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the EHCI register base address\n");
                return -ENXIO;
index 0b0b2137c76304854b67ae57285a6ea83572fcb6..6a37c5d982a61f7828bc91ff7242fc4002697f54 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       plat->hcd_base = dev_read_addr(dev);
        if (plat->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the XHCI register base address\n");
                return -ENXIO;
index ac6c5b58452ee2fe82c23a0aed280d0afb8225cd..5423d10abe775e944153f3551bd3e37cb9e4aa2d 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->hcd_base = dev_read_addr(dev);
        if (priv->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the EHCI register base address\n");
                return -ENXIO;
index 8fe685af26aa328cae7228c2cb1700b79ad19211..62414bb11028be021247b185b017f42baf2ce9db 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->hcd_base = dev_read_addr(dev);
        if (priv->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the EHCI register base address\n");
                return -ENXIO;
index 1705accbde1ccfb6993237c4713283bfe845b97b..6fb7a7f6e0970b4a42110c2c37c6f84bac63112e 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       plat->hcd_base = dev_read_addr(dev);
        if (plat->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the XHCI register base address\n");
                return -ENXIO;
index d8fb2c53450ec597e5fd7b6575edb92d872a4452..0a2da70e2004d38ac320a07bf5d5435a6c43cdb9 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       priv->hcd_base = dev_read_addr(dev);
        if (priv->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the XHCI register base address\n");
                return -ENXIO;
index 5fb74848c256ec4e5e3d145fdca1e4104a219d03..f2e338f6fbcbef94e9371e955c47faf64e7200b9 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       plat->hcd_base = dev_read_addr(dev);
        if (plat->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the XHCI register base address\n");
                return -ENXIO;
index 4964697f27bc528e0dd41a8bffcba67768313fdd..8fc51df3d111d8333aa1c1085cb488637f480972 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       plat->hcd_base = dev_read_addr(dev);
        if (plat->hcd_base == FDT_ADDR_T_NONE) {
                debug("Can't get the XHCI register base address\n");
                return -ENXIO;
index 749bde862e0db62dba07b57c457fbce2bd8f5b01..999ee1c14af672727f9645d914988f6bf6eac44b 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE) {
                debug("Can't get the DP base address\n");
                return -EINVAL;
index d5b13a6723f0f47366219bb72cd7d36b48d793e9..979b90918271292a2c1420ee012b66210f334201 100644 (file)
@@ -486,7 +486,7 @@ int exynos_fb_ofdata_to_platdata(struct udevice *dev)
        const void *blob = gd->fdt_blob;
        fdt_addr_t addr;
 
-       addr = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE) {
                debug("Can't get the FIMD base address\n");
                return -EINVAL;
index 5bf08653a90225223c047f3a75d5b64540793b74..8e6372f0bede8e5c3d6801f26903c5487f58e1d8 100644 (file)
@@ -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 = devfdt_get_addr(dev);
+       addr = dev_read_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
index 2d8bfc09a0d7b3c83a3fe64a9bb5c9c16d74289c..f673fce327c6ce0591ff58eebafd6edda16d9f8c 100644 (file)
@@ -92,7 +92,7 @@ static int stm32mp_wdt_probe(struct udevice *dev)
 
        debug("IWDG init\n");
 
-       priv->base = devfdt_get_addr(dev);
+       priv->base = dev_read_addr(dev);
        if (priv->base == FDT_ADDR_T_NONE)
                return -EINVAL;