From 2548493ab41e8dfa8ed43b64fd0fa66c6f3cddc3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 17 Jul 2020 14:36:48 +0900 Subject: 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: @@ expression dev; @@ -devfdt_get_addr(dev) +dev_read_addr(dev) Signed-off-by: Masahiro Yamada --- drivers/mmc/bcm2835_sdhci.c | 2 +- drivers/mmc/bcm2835_sdhost.c | 2 +- drivers/mmc/bcmstb_sdhci.c | 2 +- drivers/mmc/jz_mmc.c | 2 +- drivers/mmc/meson_gx_mmc.c | 2 +- drivers/mmc/omap_hsmmc.c | 4 ++-- drivers/mmc/sdhci-cadence.c | 2 +- drivers/mmc/sh_mmcif.c | 2 +- drivers/mmc/sh_sdhi.c | 2 +- drivers/mmc/tangier_sdhci.c | 2 +- drivers/mmc/tmio-common.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'drivers/mmc') diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 5cdf3c506f..7a410d1dd3 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 = devfdt_get_addr(dev); + base = dev_read_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 c4876e81f8..b793028ab5 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 = devfdt_get_addr(dev); + host->phys_addr = dev_read_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 c14f8289e6..5269aa77ce 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 = devfdt_get_addr(dev); + base = dev_read_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c index d3f1eddf45..b33f085073 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(devfdt_get_addr(dev), 0x100, MAP_NOCACHE); + priv->regs = map_physmem(dev_read_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 b7f793cd04..719dd1e5e5 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 = devfdt_get_addr(dev); + addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index db1f85125f..715eee0e3e 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(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; diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 7b5010b655..cc99bebc30 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 = devfdt_get_addr(dev); + base = dev_read_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 2e994d0178..ad386909e9 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 = devfdt_get_addr(dev); + base = dev_read_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 772fe943e4..315f95cce8 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 = devfdt_get_addr(dev); + base = dev_read_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c index 0d6e5d6246..879e2c98a2 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 = devfdt_get_addr(dev); + base = dev_read_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 20cd237ef0..c653973676 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 = devfdt_get_addr(dev); + base = dev_read_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; -- cgit