diff options
author | Masahiro Yamada | 2020-07-17 14:36:48 +0900 |
---|---|---|
committer | Simon Glass | 2020-07-25 14:46:57 -0600 |
commit | 2548493ab41e8dfa8ed43b64fd0fa66c6f3cddc3 (patch) | |
tree | b2fa5f24d61dc8a3a6e80831d08d192b99a70fbc /drivers/gpio | |
parent | cf081a52ad830127a12715a7a8c64c2bc9b7dfeb (diff) |
treewide: convert devfdt_get_addr() to dev_read_addr()
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/altera_pio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/atmel_pio4.c | 2 | ||||
-rw-r--r-- | drivers/gpio/bcm2835_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/da8xx_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-rza1.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-uniphier.c | 2 | ||||
-rw-r--r-- | drivers/gpio/msm_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/mxc_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/mxs_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/omap_gpio.c | 4 | ||||
-rw-r--r-- | drivers/gpio/pm8916_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/s5p_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/sifive-gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/vybrid_gpio.c | 2 |
14 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c index 324f9c29a82..75800d9f31c 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(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), diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 455944d547a..18f365fa411 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 = devfdt_get_addr(dev); + addr_base = dev_read_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 f4b67f1cf0a..0dff9ac711d 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 = devfdt_get_addr(dev); + addr = dev_read_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 ab0a5cfd330..f8758885101 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 = devfdt_get_addr(dev); + addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c index 21a87d645cd..86804ac2f5f 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 = devfdt_get_addr(dev); + addr_base = dev_read_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 30392bccaaa..54a38da0f10 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 = devfdt_get_addr(dev); + addr = dev_read_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 ac5d20c1b95..fe6b33e1dff 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 = devfdt_get_addr(dev); + priv->base = dev_read_addr(dev); return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0; } diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 90d36fb87bb..a16f5719ede 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 = devfdt_get_addr(dev); + addr = dev_read_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 cb797261b7f..2c16517e724 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 = 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; diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index c986ef03805..6eaa0a08a26 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 = 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; diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c index 51df5367ea7..58f044678b7 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 = devfdt_get_addr(dev); + priv->pid = dev_read_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 4a68f44704b..c78227f4da3 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -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); diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c index 24da3b3c230..bf3537b76bd 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 = devfdt_get_addr(dev); + addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c index d2c1d7d8590..4efff5c3643 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 = devfdt_get_addr(dev); + base_addr = dev_read_addr(dev); if (base_addr == FDT_ADDR_T_NONE) return -EINVAL; |