diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-17 17:18:05 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-01 07:03:01 -0600 |
commit | a821c4af79e4f5ce9b629b20473863397bbe9b10 (patch) | |
tree | 7b5da59e0db526cf6ace38b03639789996cf9b43 /drivers/gpio | |
parent | d6ffb00a438ef8ba714feb2c72a7ddbdebad2b2e (diff) | |
download | u-boot-a821c4af79e4f5ce9b629b20473863397bbe9b10.tar.gz |
dm: Rename dev_addr..() functions
These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing functions to avoid confusion.
In the end we will have:
1. dev_read_addr...() - works on devices, supports flat/live tree
2. devfdt_get_addr...() - current functions, flat tree only
3. of_get_address() etc. - new functions, live tree only
All drivers will be written to use 1. That function will in turn call
either 2 or 3 depending on whether the flat or live tree is in use.
Note this involves changing some dead code - the imx_lpi2c.c file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/altera_pio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/at91_gpio.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/bcm6345_gpio.c | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-uniphier.c | 2 | ||||
-rw-r--r-- | drivers/gpio/imx_rgpio2p.c | 2 | ||||
-rw-r--r-- | drivers/gpio/msm_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/mvebu_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/mxc_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/omap_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/pm8916_gpio.c | 4 | ||||
-rw-r--r-- | drivers/gpio/rk_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/s5p_gpio.c | 4 | ||||
-rw-r--r-- | drivers/gpio/stm32f7_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/sunxi_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/tegra186_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/tegra_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/vybrid_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/zynq_gpio.c | 2 |
20 files changed, 23 insertions, 23 deletions
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c index 92849c5295..d17245ac23 100644 --- a/drivers/gpio/altera_pio.c +++ b/drivers/gpio/altera_pio.c @@ -89,7 +89,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_get_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/at91_gpio.c b/drivers/gpio/at91_gpio.c index 98dbd8210e..174d5610aa 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -587,7 +587,7 @@ static int at91_gpio_probe(struct udevice *dev) uc_priv->gpio_count = GPIO_PER_BANK; #if CONFIG_IS_ENABLED(OF_CONTROL) - plat->base_addr = (uint32_t)dev_get_addr_ptr(dev); + plat->base_addr = (uint32_t)devfdt_get_addr_ptr(dev); #endif port->regs = (struct at91_port *)plat->base_addr; diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 81c3047551..73a5c54bef 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_get_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 cd5480ee09..beaa21853a 100644 --- a/drivers/gpio/bcm2835_gpio.c +++ b/drivers/gpio/bcm2835_gpio.c @@ -130,7 +130,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_get_addr(dev); + addr = devfdt_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c index 1d752130df..009e2fc5a2 100644 --- a/drivers/gpio/bcm6345_gpio.c +++ b/drivers/gpio/bcm6345_gpio.c @@ -92,11 +92,11 @@ static int bcm6345_gpio_probe(struct udevice *dev) fdt_addr_t data_addr, dirout_addr; fdt_size_t data_size, dirout_size; - dirout_addr = dev_get_addr_size_index(dev, 0, &dirout_size); + dirout_addr = devfdt_get_addr_size_index(dev, 0, &dirout_size); if (dirout_addr == FDT_ADDR_T_NONE) return -EINVAL; - data_addr = dev_get_addr_size_index(dev, 1, &data_size); + data_addr = devfdt_get_addr_size_index(dev, 1, &data_size); if (data_addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index a10116c215..c11e95355b 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -95,7 +95,7 @@ static int uniphier_gpio_probe(struct udevice *dev) fdt_addr_t addr; unsigned int tmp; - addr = dev_get_addr(dev); + addr = devfdt_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 886b16188e..5abc88ba54 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -166,7 +166,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) if (plat) return 0; - addr = dev_get_addr_index(dev, 1); + addr = devfdt_get_addr_index(dev, 1); if (addr == FDT_ADDR_T_NONE) return -ENODEV; diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c index 01ce1d6fa0..ff38fc5bd3 100644 --- a/drivers/gpio/msm_gpio.c +++ b/drivers/gpio/msm_gpio.c @@ -97,7 +97,7 @@ static int msm_gpio_probe(struct udevice *dev) { struct msm_gpio_bank *priv = dev_get_priv(dev); - priv->base = dev_get_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 75dc73e586..85dea14c51 100644 --- a/drivers/gpio/mvebu_gpio.c +++ b/drivers/gpio/mvebu_gpio.c @@ -92,7 +92,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 = (struct mvebu_gpio_regs *)dev_get_addr(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 70fe5b6a4e..0eb6c600f1 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -302,7 +302,7 @@ static int mxc_gpio_bind(struct udevice *dev) if (plat) return 0; - addr = dev_get_addr(dev); + addr = devfdt_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -ENODEV; diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 5338552179..b423e34ca4 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -305,7 +305,7 @@ static int omap_gpio_bind(struct udevice *dev) if (plat) return 0; - base_addr = dev_get_addr(dev); + base_addr = devfdt_get_addr(dev); if (base_addr == FDT_ADDR_T_NONE) return -ENODEV; diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c index e38cee8869..8dea69f281 100644 --- a/drivers/gpio/pm8916_gpio.c +++ b/drivers/gpio/pm8916_gpio.c @@ -173,7 +173,7 @@ static int pm8916_gpio_probe(struct udevice *dev) struct pm8916_gpio_bank *priv = dev_get_priv(dev); int reg; - priv->pid = dev_get_addr(dev); + priv->pid = devfdt_get_addr(dev); if (priv->pid == FDT_ADDR_T_NONE) return -EINVAL; @@ -259,7 +259,7 @@ static int pm8941_pwrkey_probe(struct udevice *dev) struct pm8916_gpio_bank *priv = dev_get_priv(dev); int reg; - priv->pid = dev_get_addr(dev); + priv->pid = devfdt_get_addr(dev); if (priv->pid == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c index 5dbd228203..6f7366acba 100644 --- a/drivers/gpio/rk_gpio.c +++ b/drivers/gpio/rk_gpio.c @@ -104,7 +104,7 @@ static int rockchip_gpio_probe(struct udevice *dev) int ret; /* This only supports RK3288 at present */ - priv->regs = (struct rockchip_gpio_regs *)dev_get_addr(dev); + priv->regs = (struct rockchip_gpio_regs *)devfdt_get_addr(dev); ret = uclass_first_device_err(UCLASS_PINCTRL, &priv->pinctrl); if (ret) return ret; diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 042996e559..5c894a26d7 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 = (struct s5p_gpio_bank *)dev_get_addr(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_get_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/stm32f7_gpio.c b/drivers/gpio/stm32f7_gpio.c index 5e0546357f..653e9bef4b 100644 --- a/drivers/gpio/stm32f7_gpio.c +++ b/drivers/gpio/stm32f7_gpio.c @@ -84,7 +84,7 @@ static int gpio_stm32_probe(struct udevice *dev) fdt_addr_t addr; char *name; - addr = dev_get_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 3f40e83830..f0c9ea0794 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -296,7 +296,7 @@ static int gpio_sunxi_bind(struct udevice *parent) if (plat) return 0; - ctlr = (struct sunxi_gpio_reg *)dev_get_addr(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/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c index b0c22e5bfe..cb2524e9bf 100644 --- a/drivers/gpio/tegra186_gpio.c +++ b/drivers/gpio/tegra186_gpio.c @@ -179,7 +179,7 @@ static int tegra186_gpio_bind(struct udevice *parent) if (parent_plat) return 0; - regs = (uint32_t *)dev_get_addr_name(parent, "gpio"); + regs = (uint32_t *)devfdt_get_addr_name(parent, "gpio"); if (regs == (uint32_t *)FDT_ADDR_T_NONE) return -ENODEV; diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index b01968a304..fb79f7fa58 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -341,7 +341,7 @@ static int gpio_tegra_bind(struct udevice *parent) &len)) return -EINVAL; bank_count = len / 3 / sizeof(u32); - ctlr = (struct gpio_ctlr *)dev_get_addr(parent); + ctlr = (struct gpio_ctlr *)devfdt_get_addr(parent); } #endif for (bank = 0; bank < bank_count; bank++) { diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c index 458104e8b0..b7a1b6a45b 100644 --- a/drivers/gpio/vybrid_gpio.c +++ b/drivers/gpio/vybrid_gpio.c @@ -113,7 +113,7 @@ static int vybrid_gpio_bind(struct udevice *dev) if (plat) return 0; - base_addr = dev_get_addr(dev); + base_addr = devfdt_get_addr(dev); if (base_addr == FDT_ADDR_T_NONE) return -ENODEV; diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c index 64579a1b6c..4cb75a8627 100644 --- a/drivers/gpio/zynq_gpio.c +++ b/drivers/gpio/zynq_gpio.c @@ -375,7 +375,7 @@ static int zynq_gpio_ofdata_to_platdata(struct udevice *dev) { struct zynq_gpio_privdata *priv = dev_get_priv(dev); - priv->base = dev_get_addr(dev); + priv->base = devfdt_get_addr(dev); return 0; } |