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/mmc | |
parent | d6ffb00a438ef8ba714feb2c72a7ddbdebad2b2e (diff) |
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/mmc')
-rw-r--r-- | drivers/mmc/atmel_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/bcm2835_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/gen_atmel_mci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/meson_gx_mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/msm_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/omap_hsmmc.c | 3 | ||||
-rw-r--r-- | drivers/mmc/rockchip_dw_mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/rockchip_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/sdhci-cadence.c | 2 | ||||
-rw-r--r-- | drivers/mmc/socfpga_dw_mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/sti_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/tangier_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/tegra_mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/uniphier-sd.c | 2 | ||||
-rw-r--r-- | drivers/mmc/xenon_sdhci.c | 4 | ||||
-rw-r--r-- | drivers/mmc/zynq_sdhci.c | 2 |
17 files changed, 19 insertions, 18 deletions
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index 86e36a9c28..c19a1f36b6 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b/drivers/mmc/atmel_sdhci.c @@ -72,7 +72,7 @@ static int atmel_sdhci_probe(struct udevice *dev) return ret; host->name = dev->name; - host->ioaddr = (void *)dev_get_addr(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 b6e2fc6897..3157354d2a 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -179,7 +179,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev) int emmc_freq; int ret; - base = dev_get_addr(dev); + base = devfdt_get_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index f3c63585a8..3b3110f58b 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -963,7 +963,7 @@ static int fsl_esdhc_probe(struct udevice *dev) unsigned int val; int ret; - addr = dev_get_addr(dev); + addr = devfdt_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index d883da30a1..e9f061e55d 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -576,7 +576,7 @@ static int atmel_mci_probe(struct udevice *dev) if (ret) return ret; - priv->mci = (struct atmel_mci *)dev_get_addr_ptr(dev); + priv->mci = (struct atmel_mci *)devfdt_get_addr_ptr(dev); atmel_mci_setup_cfg(priv); diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 18b072d81f..4652fab45e 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -221,7 +221,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_get_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 7a7e67f6f3..9117ab6bf9 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 = (void *)dev_get_addr(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/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 0b21ec6efc..bb10caaf32 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -808,7 +808,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev) int node = dev_of_offset(dev); int val; - plat->base_addr = map_physmem(dev_get_addr(dev), sizeof(struct hsmmc *), + plat->base_addr = map_physmem(devfdt_get_addr(dev), + sizeof(struct hsmmc *), MAP_NOCACHE) + data->reg_offset; cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS; diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index 2885ef2497..25a21e29d0 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -58,7 +58,7 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev) struct dwmci_host *host = &priv->host; host->name = dev->name; - host->ioaddr = (void *)dev_get_addr(dev); + host->ioaddr = (void *)devfdt_get_addr(dev); host->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", 4); host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk; diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index bdde831ffd..8985878d7e 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -83,7 +83,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev) struct sdhci_host *host = dev_get_priv(dev); host->name = dev->name; - host->ioaddr = dev_get_addr_ptr(dev); + host->ioaddr = devfdt_get_addr_ptr(dev); #endif return 0; diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index eca1b3b5bb..4452be048c 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -127,7 +127,7 @@ static int sdhci_cdns_probe(struct udevice *dev) fdt_addr_t base; int ret; - base = dev_get_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 d0c3c5155a..759686ccd6 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -78,7 +78,7 @@ static int socfpga_dwmmc_ofdata_to_platdata(struct udevice *dev) } host->name = dev->name; - host->ioaddr = (void *)dev_get_addr(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 2a07082036..f85f6b4db6 100644 --- a/drivers/mmc/sti_sdhci.c +++ b/drivers/mmc/sti_sdhci.c @@ -108,7 +108,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 = (void *)dev_get_addr(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 77b18e75f0..bafe85bf64 100644 --- a/drivers/mmc/tangier_sdhci.c +++ b/drivers/mmc/tangier_sdhci.c @@ -36,7 +36,7 @@ static int sdhci_tangier_probe(struct udevice *dev) fdt_addr_t base; int ret; - base = dev_get_addr(dev); + base = devfdt_get_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index 9037ffb381..cc70078984 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -616,7 +616,7 @@ static int tegra_mmc_probe(struct udevice *dev) priv->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; - priv->reg = (void *)dev_get_addr(dev); + priv->reg = (void *)devfdt_get_addr(dev); ret = reset_get_by_name(dev, "sdhci", &priv->reset_ctl); if (ret) { diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index 195419ecda..3c462bd583 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -673,7 +673,7 @@ static int uniphier_sd_probe(struct udevice *dev) struct clk clk; int ret; - base = dev_get_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 2a0d8b46c6..6cd176f9f8 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -452,10 +452,10 @@ static int xenon_sdhci_ofdata_to_platdata(struct udevice *dev) const char *name; host->name = dev->name; - host->ioaddr = (void *)dev_get_addr(dev); + host->ioaddr = (void *)devfdt_get_addr(dev); if (of_device_is_compatible(dev, "marvell,armada-3700-sdhci")) - priv->pad_ctrl_reg = (void *)dev_get_addr_index(dev, 1); + priv->pad_ctrl_reg = (void *)devfdt_get_addr_index(dev, 1); name = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "marvell,pad-type", NULL); diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 28cedf0c46..70ad5734e1 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -81,7 +81,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev) struct sdhci_host *host = dev_get_priv(dev); host->name = dev->name; - host->ioaddr = (void *)dev_get_addr(dev); + host->ioaddr = (void *)devfdt_get_addr(dev); plat->f_max = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "max-frequency", CONFIG_ZYNQ_SDHCI_MAX_FREQ); |