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>
This commit is contained in:
parent
6f25e274da
commit
60e7fa8b3b
@ -114,7 +114,7 @@ static int msm_clk_probe(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct msm_clk_priv *priv = dev_get_priv(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)
|
if (priv->base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ static int msm_pinctrl_probe(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct msm_pinctrl_priv *priv = dev_get_priv(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;
|
priv->data = (struct msm_pinctrl_data *)dev->driver_data;
|
||||||
|
|
||||||
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
|
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
|
||||||
|
@ -34,7 +34,7 @@ static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct dwc_ahci_priv *priv = dev_get_priv(dev);
|
struct dwc_ahci_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
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);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
addr = devfdt_get_addr_index(dev, 1);
|
addr = devfdt_get_addr_index(dev, 1);
|
||||||
|
@ -553,7 +553,7 @@ static int socfpga_clk_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
|
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
plat->regs = (void __iomem *)addr;
|
plat->regs = (void __iomem *)addr;
|
||||||
|
@ -285,7 +285,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
|
|||||||
socfpga_a10_handoff_workaround(dev);
|
socfpga_a10_handoff_workaround(dev);
|
||||||
|
|
||||||
if (!fdt_node_check_compatible(fdt, offset, "altr,clk-mgr")) {
|
if (!fdt_node_check_compatible(fdt, offset, "altr,clk-mgr")) {
|
||||||
plat->regs = devfdt_get_addr(dev);
|
plat->regs = dev_read_addr(dev);
|
||||||
} else {
|
} else {
|
||||||
pdev = dev_get_parent(dev);
|
pdev = dev_get_parent(dev);
|
||||||
if (!pdev)
|
if (!pdev)
|
||||||
|
@ -95,7 +95,7 @@ static int exynos7420_clk_topc_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ static int exynos7420_clk_top0_probe(struct udevice *dev)
|
|||||||
if (!priv)
|
if (!priv)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ static int uniphier_clk_probe(struct udevice *dev)
|
|||||||
struct uniphier_clk_priv *priv = dev_get_priv(dev);
|
struct uniphier_clk_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev->parent);
|
addr = dev_read_addr(dev->parent);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ static int ti_edma3_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct ti_edma3_priv *priv = dev_get_priv(dev);
|
struct ti_edma3_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
priv->base = devfdt_get_addr(dev);
|
priv->base = dev_read_addr(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ static int altera_pio_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct altera_pio_platdata *plat = dev_get_platdata(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),
|
sizeof(struct altera_pio_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
|
plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
|
||||||
|
@ -299,7 +299,7 @@ static int atmel_pio4_probe(struct udevice *dev)
|
|||||||
|
|
||||||
clk_free(&clk);
|
clk_free(&clk);
|
||||||
|
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
|
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -545,7 +545,7 @@ static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
|
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ static int r7s72100_gpio_probe(struct udevice *dev)
|
|||||||
|
|
||||||
uc_priv->bank_name = dev->name;
|
uc_priv->bank_name = dev->name;
|
||||||
dev = dev_get_parent(dev);
|
dev = dev_get_parent(dev);
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ static int uniphier_gpio_probe(struct udevice *dev)
|
|||||||
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
|
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ static int msm_gpio_probe(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct msm_gpio_bank *priv = dev_get_priv(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;
|
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ static int mxc_gpio_ofdata_to_platdata(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
struct mxc_gpio_plat *plat = dev_get_platdata(dev);
|
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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ static int mxs_ofdata_to_platdata(struct udevice *dev)
|
|||||||
int node = dev_of_offset(dev);
|
int node = dev_of_offset(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
plat->bank = devfdt_get_addr(dev);
|
plat->bank = dev_read_addr(dev);
|
||||||
if (plat->bank == FDT_ADDR_T_NONE) {
|
if (plat->bank == FDT_ADDR_T_NONE) {
|
||||||
printf("%s: No 'reg' property defined!\n", __func__);
|
printf("%s: No 'reg' property defined!\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -308,7 +308,7 @@ static int omap_gpio_bind(struct udevice *dev)
|
|||||||
if (plat)
|
if (plat)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
base_addr = devfdt_get_addr(dev);
|
base_addr = dev_read_addr(dev);
|
||||||
if (base_addr == FDT_ADDR_T_NONE)
|
if (base_addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
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);
|
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ static int pm8941_pwrkey_probe(struct udevice *dev)
|
|||||||
struct pm8916_gpio_bank *priv = dev_get_priv(dev);
|
struct pm8916_gpio_bank *priv = dev_get_priv(dev);
|
||||||
int reg;
|
int reg;
|
||||||
|
|
||||||
priv->pid = devfdt_get_addr(dev);
|
priv->pid = dev_read_addr(dev);
|
||||||
if (priv->pid == FDT_ADDR_T_NONE)
|
if (priv->pid == FDT_ADDR_T_NONE)
|
||||||
return log_msg_ret("bad address", -EINVAL);
|
return log_msg_ret("bad address", -EINVAL);
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ static int gpio_exynos_bind(struct udevice *parent)
|
|||||||
|
|
||||||
dev_set_of_offset(dev, node);
|
dev_set_of_offset(dev, node);
|
||||||
|
|
||||||
reg = devfdt_get_addr(dev);
|
reg = dev_read_addr(dev);
|
||||||
if (reg != FDT_ADDR_T_NONE)
|
if (reg != FDT_ADDR_T_NONE)
|
||||||
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
|
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ static int sifive_gpio_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
|
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
|
|||||||
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
|
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t base_addr;
|
fdt_addr_t base_addr;
|
||||||
|
|
||||||
base_addr = devfdt_get_addr(dev);
|
base_addr = dev_read_addr(dev);
|
||||||
if (base_addr == FDT_ADDR_T_NONE)
|
if (base_addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ static int uniphier_fi2c_probe(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
struct uniphier_fi2c_priv *priv = dev_get_priv(dev);
|
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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static int uniphier_i2c_probe(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
struct uniphier_i2c_priv *priv = dev_get_priv(dev);
|
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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ static int imx_lpi2c_probe(struct udevice *bus)
|
|||||||
|
|
||||||
i2c_bus->driver_data = dev_get_driver_data(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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ static int iproc_i2c_ofdata_to_platdata(struct udevice *bus)
|
|||||||
int node = dev_of_offset(bus);
|
int node = dev_of_offset(bus);
|
||||||
const void *blob = gd->fdt_blob;
|
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 *),
|
sizeof(void *),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
|
@ -899,7 +899,7 @@ static int mxc_i2c_probe(struct udevice *bus)
|
|||||||
|
|
||||||
i2c_bus->driver_data = dev_get_driver_data(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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -1067,7 +1067,7 @@ static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
|
|||||||
{
|
{
|
||||||
struct omap_i2c_platdata *plat = dev_get_platdata(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",
|
plat->speed = dev_read_u32_default(bus, "clock-frequency",
|
||||||
I2C_SPEED_STANDARD_RATE);
|
I2C_SPEED_STANDARD_RATE);
|
||||||
plat->ip_rev = dev_get_driver_data(bus);
|
plat->ip_rev = dev_get_driver_data(bus);
|
||||||
|
@ -153,7 +153,7 @@ static int tegra_hsp_probe(struct udevice *dev)
|
|||||||
|
|
||||||
debug("%s(dev=%p)\n", __func__, 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)
|
if (thsp->regs == FDT_ADDR_T_NONE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct altera_sysid_platdata *plat = dev_get_platdata(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),
|
sizeof(struct altera_sysid_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ static int imx8_scu_probe(struct udevice *dev)
|
|||||||
|
|
||||||
debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
|
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)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ static int microchip_flexcom_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct microchip_flexcom_platdata *plat = dev_get_platdata(dev);
|
struct microchip_flexcom_platdata *plat = dev_get_platdata(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
plat->regs = map_physmem(devfdt_get_addr(dev),
|
plat->regs = map_physmem(dev_read_addr(dev),
|
||||||
sizeof(struct microchip_flexcom_regs),
|
sizeof(struct microchip_flexcom_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
int clock_id = (int)dev_get_driver_data(dev);
|
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)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@ static int bcm2835_probe(struct udevice *dev)
|
|||||||
upriv->mmc = &plat->mmc;
|
upriv->mmc = &plat->mmc;
|
||||||
plat->cfg.name = dev->name;
|
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)
|
if (host->phys_addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ static int sdhci_bcmstb_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct mmc_config *cfg;
|
struct mmc_config *cfg;
|
||||||
int ret;
|
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 = &plat->cfg;
|
||||||
|
|
||||||
cfg->name = "MSC";
|
cfg->name = "MSC";
|
||||||
|
@ -228,7 +228,7 @@ static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
|
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -1911,7 +1911,7 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
int node = dev_of_offset(dev);
|
int node = dev_of_offset(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
plat->base_addr = map_physmem(devfdt_get_addr(dev),
|
plat->base_addr = map_physmem(dev_read_addr(dev),
|
||||||
sizeof(struct hsmmc *),
|
sizeof(struct hsmmc *),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
@ -1933,7 +1933,7 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
plat->controller_flags |= of_data->controller_flags;
|
plat->controller_flags |= of_data->controller_flags;
|
||||||
|
|
||||||
#ifdef CONFIG_OMAP54XX
|
#ifdef CONFIG_OMAP54XX
|
||||||
fixups = platform_fixups_mmc(devfdt_get_addr(dev));
|
fixups = platform_fixups_mmc(dev_read_addr(dev));
|
||||||
if (fixups) {
|
if (fixups) {
|
||||||
plat->hw_rev = fixups->hw_rev;
|
plat->hw_rev = fixups->hw_rev;
|
||||||
cfg->host_caps &= ~fixups->unsupported_caps;
|
cfg->host_caps &= ~fixups->unsupported_caps;
|
||||||
|
@ -260,7 +260,7 @@ static int sdhci_cdns_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ static int sh_mmcif_dm_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -834,7 +834,7 @@ static int sh_sdhi_dm_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ static int sdhci_tangier_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -722,7 +722,7 @@ int tmio_sd_probe(struct udevice *dev, u32 quirks)
|
|||||||
ulong mclk;
|
ulong mclk;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -1256,7 +1256,7 @@ static int ag7xxx_eth_ofdata_to_platdata(struct udevice *dev)
|
|||||||
const char *phy_mode;
|
const char *phy_mode;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
|
|
||||||
/* Decoding of convoluted PHY wiring on Atheros MIPS. */
|
/* Decoding of convoluted PHY wiring on Atheros MIPS. */
|
||||||
|
@ -1995,9 +1995,9 @@ static int eqos_probe(struct udevice *dev)
|
|||||||
eqos->dev = dev;
|
eqos->dev = dev;
|
||||||
eqos->config = (void *)dev_get_driver_data(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) {
|
if (eqos->regs == FDT_ADDR_T_NONE) {
|
||||||
pr_err("devfdt_get_addr() failed");
|
pr_err("dev_read_addr() failed");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
|
eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
|
||||||
|
@ -690,7 +690,7 @@ static int ethoc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct ethoc_eth_pdata *pdata = dev_get_platdata(dev);
|
struct ethoc_eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr;
|
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);
|
addr = devfdt_get_addr_index(dev, 1);
|
||||||
if (addr != FDT_ADDR_T_NONE)
|
if (addr != FDT_ADDR_T_NONE)
|
||||||
pdata->packet_base = addr;
|
pdata->packet_base = addr;
|
||||||
|
@ -1534,7 +1534,7 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct fec_priv *priv = dev_get_priv(dev);
|
struct fec_priv *priv = dev_get_priv(dev);
|
||||||
const char *phy_mode;
|
const char *phy_mode;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
priv->eth = (struct ethernet_regs *)pdata->iobase;
|
priv->eth = (struct ethernet_regs *)pdata->iobase;
|
||||||
|
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
|
@ -570,7 +570,7 @@ static int mcdmafec_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
const u32 *val;
|
const u32 *val;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
/* Default to 10Mbit/s */
|
/* Default to 10Mbit/s */
|
||||||
pdata->max_speed = 10;
|
pdata->max_speed = 10;
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ static int ftgmac100_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct ftgmac100_data *priv = dev_get_priv(dev);
|
struct ftgmac100_data *priv = dev_get_priv(dev);
|
||||||
const char *phy_mode;
|
const char *phy_mode;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
phy_mode = dev_read_string(dev, "phy-mode");
|
phy_mode = dev_read_string(dev, "phy-mode");
|
||||||
if (phy_mode)
|
if (phy_mode)
|
||||||
|
@ -398,7 +398,7 @@ static int ftmac100_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct ftmac100_data *priv = dev_get_priv(dev);
|
struct ftmac100_data *priv = dev_get_priv(dev);
|
||||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
const char *mac;
|
const char *mac;
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
priv->iobase = pdata->iobase;
|
priv->iobase = pdata->iobase;
|
||||||
mac = dtbmacaddr(0);
|
mac = dtbmacaddr(0);
|
||||||
if (mac)
|
if (mac)
|
||||||
|
@ -642,7 +642,7 @@ static int ks8851_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct ks_net *ks = dev_get_priv(dev);
|
struct ks_net *ks = dev_get_priv(dev);
|
||||||
struct eth_pdata *pdata = dev_get_platdata(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;
|
ks->iobase = pdata->iobase;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -589,7 +589,7 @@ static int mcffec_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
const u32 *val;
|
const u32 *val;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
/* Default to 10Mbit/s */
|
/* Default to 10Mbit/s */
|
||||||
pdata->max_speed = 10;
|
pdata->max_speed = 10;
|
||||||
|
|
||||||
|
@ -1418,7 +1418,7 @@ static int mtk_eth_ofdata_to_platdata(struct udevice *dev)
|
|||||||
|
|
||||||
priv->soc = dev_get_driver_data(dev);
|
priv->soc = dev_get_driver_data(dev);
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
|
|
||||||
/* get corresponding ethsys phandle */
|
/* get corresponding ethsys phandle */
|
||||||
ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
|
ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
|
||||||
|
@ -997,7 +997,7 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev)
|
|||||||
int pnode;
|
int pnode;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
|
|
||||||
pnode = fdt_node_offset_by_compatible(blob, node,
|
pnode = fdt_node_offset_by_compatible(blob, node,
|
||||||
|
@ -1796,7 +1796,7 @@ static int mvneta_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
const char *phy_mode;
|
const char *phy_mode;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
|
|
||||||
/* Get phy-mode / phy_interface from DT */
|
/* Get phy-mode / phy_interface from DT */
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
|
@ -651,7 +651,7 @@ int ravb_ofdata_to_platdata(struct udevice *dev)
|
|||||||
const fdt32_t *cell;
|
const fdt32_t *cell;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -918,7 +918,7 @@ int sh_ether_ofdata_to_platdata(struct udevice *dev)
|
|||||||
const fdt32_t *cell;
|
const fdt32_t *cell;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -612,7 +612,7 @@ static int smc911x_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct smc911x_priv *priv = dev_get_priv(dev);
|
struct smc911x_priv *priv = dev_get_priv(dev);
|
||||||
struct eth_pdata *pdata = dev_get_platdata(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;
|
priv->iobase = pdata->iobase;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -746,7 +746,7 @@ static int ave_ofdata_to_platdata(struct udevice *dev)
|
|||||||
if (!priv->data)
|
if (!priv->data)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
pdata->phy_interface = -1;
|
pdata->phy_interface = -1;
|
||||||
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -919,7 +919,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
|
|||||||
#endif
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
if (pdata->iobase == FDT_ADDR_T_NONE) {
|
if (pdata->iobase == FDT_ADDR_T_NONE) {
|
||||||
debug("%s: Cannot find MAC base address\n", __func__);
|
debug("%s: Cannot find MAC base address\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -594,7 +594,7 @@ static int sunxi_emac_eth_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -722,7 +722,7 @@ static int axi_emac_ofdata_to_platdata(struct udevice *dev)
|
|||||||
int offset = 0;
|
int offset = 0;
|
||||||
const char *phy_mode;
|
const char *phy_mode;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
priv->iobase = (struct axi_regs *)pdata->iobase;
|
priv->iobase = (struct axi_regs *)pdata->iobase;
|
||||||
|
|
||||||
offset = fdtdec_lookup_phandle(gd->fdt_blob, node,
|
offset = fdtdec_lookup_phandle(gd->fdt_blob, node,
|
||||||
|
@ -599,7 +599,7 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct xemaclite *emaclite = dev_get_priv(dev);
|
struct xemaclite *emaclite = dev_get_priv(dev);
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
|
emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
|
||||||
0x10000);
|
0x10000);
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ static int ar933x_pinctrl_probe(struct udevice *dev)
|
|||||||
struct ar933x_pinctrl_priv *priv = dev_get_priv(dev);
|
struct ar933x_pinctrl_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ static int qca953x_pinctrl_probe(struct udevice *dev)
|
|||||||
struct qca953x_pinctrl_priv *priv = dev_get_priv(dev);
|
struct qca953x_pinctrl_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ int exynos_pinctrl_probe(struct udevice *dev)
|
|||||||
if (!priv)
|
if (!priv)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ static int atmel_pinctrl_probe(struct udevice *dev)
|
|||||||
fdt_addr_t addr_base;
|
fdt_addr_t addr_base;
|
||||||
|
|
||||||
dev = dev_get_parent(dev);
|
dev = dev_get_parent(dev);
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ static int r7s72100_pfc_probe(struct udevice *dev)
|
|||||||
fdt_addr_t addr_base;
|
fdt_addr_t addr_base;
|
||||||
ofnode node;
|
ofnode node;
|
||||||
|
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev)
|
|||||||
enum sh_pfc_model model = dev_get_driver_data(dev);
|
enum sh_pfc_model model = dev_get_driver_data(dev);
|
||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ int uniphier_pinctrl_probe(struct udevice *dev,
|
|||||||
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
|
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev->parent);
|
addr = dev_read_addr(dev->parent);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ static int uniphier_reset_probe(struct udevice *dev)
|
|||||||
struct uniphier_reset_priv *priv = dev_get_priv(dev);
|
struct uniphier_reset_priv *priv = dev_get_priv(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev->parent);
|
addr = dev_read_addr(dev->parent);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ static int mv_rtc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct mvrtc_pdata *pdata = dev_get_platdata(dev);
|
struct mvrtc_pdata *pdata = dev_get_platdata(dev);
|
||||||
|
|
||||||
pdata->iobase = devfdt_get_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ static int altera_jtaguart_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct altera_jtaguart_platdata *plat = dev_get_platdata(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),
|
sizeof(struct altera_jtaguart_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct altera_uart_platdata *plat = dev_get_platdata(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),
|
sizeof(struct altera_uart_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0);
|
plat->uartclk = dev_read_u32_default(dev, "clock-frequency", 0);
|
||||||
|
@ -268,7 +268,7 @@ static int atmel_serial_probe(struct udevice *dev)
|
|||||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
fdt_addr_t addr_base;
|
fdt_addr_t addr_base;
|
||||||
|
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static int ar933x_serial_probe(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -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'
|
* since we need the soc simple-bus to be probed so that the 'ranges'
|
||||||
* property is used.
|
* property is used.
|
||||||
*/
|
*/
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -518,7 +518,7 @@ static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
int node = dev_of_offset(dev);
|
int node = dev_of_offset(dev);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ static int coldfire_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct coldfire_serial_platdata *plat = dev_get_platdata(dev);
|
struct coldfire_serial_platdata *plat = dev_get_platdata(dev);
|
||||||
fdt_addr_t addr_base;
|
fdt_addr_t addr_base;
|
||||||
|
|
||||||
addr_base = devfdt_get_addr(dev);
|
addr_base = dev_read_addr(dev);
|
||||||
if (addr_base == FDT_ADDR_T_NONE)
|
if (addr_base == FDT_ADDR_T_NONE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ static int meson_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct meson_serial_platdata *plat = dev->platdata;
|
struct meson_serial_platdata *plat = dev->platdata;
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ static int msm_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct msm_serial_data *priv = dev_get_priv(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)
|
if (priv->base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ static int mxc_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct mxc_serial_platdata *plat = dev->platdata;
|
struct mxc_serial_platdata *plat = dev->platdata;
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
struct s5p_serial_platdata *plat = dev->platdata;
|
struct s5p_serial_platdata *plat = dev->platdata;
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
addr = devfdt_get_addr(dev);
|
addr = dev_read_addr(dev);
|
||||||
if (!addr)
|
if (!addr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ static int sti_asc_serial_probe(struct udevice *dev)
|
|||||||
unsigned long val;
|
unsigned long val;
|
||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ static int stm32_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
{
|
{
|
||||||
struct stm32x7_serial_platdata *plat = dev_get_platdata(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)
|
if (plat->base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ static int uniphier_serial_probe(struct udevice *dev)
|
|||||||
fdt_addr_t base;
|
fdt_addr_t base;
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
|
|
||||||
base = devfdt_get_addr(dev);
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE)
|
if (base == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ static int altera_spi_ofdata_to_platdata(struct udevice *bus)
|
|||||||
{
|
{
|
||||||
struct altera_spi_platdata *plat = dev_get_platdata(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),
|
sizeof(struct altera_spi_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ static int atcspi200_ofdata_to_platadata(struct udevice *bus)
|
|||||||
const void *blob = gd->fdt_blob;
|
const void *blob = gd->fdt_blob;
|
||||||
int node = dev_of_offset(bus);
|
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),
|
sizeof(struct atcspi200_spi_regs),
|
||||||
MAP_NOCACHE);
|
MAP_NOCACHE);
|
||||||
if (!ns->regs) {
|
if (!ns->regs) {
|
||||||
|
@ -178,7 +178,7 @@ static int ath79_spi_probe(struct udevice *bus)
|
|||||||
struct ath79_spi_priv *priv = dev_get_priv(bus);
|
struct ath79_spi_priv *priv = dev_get_priv(bus);
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(bus);
|
addr = dev_read_addr(bus);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus)
|
|||||||
int node = dev_of_offset(bus);
|
int node = dev_of_offset(bus);
|
||||||
int *ctar, len;
|
int *ctar, len;
|
||||||
|
|
||||||
addr = devfdt_get_addr(bus);
|
addr = dev_read_addr(bus);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ static int davinci_ofdata_to_platadata(struct udevice *bus)
|
|||||||
struct davinci_spi_platdata *plat = bus->platdata;
|
struct davinci_spi_platdata *plat = bus->platdata;
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = devfdt_get_addr(bus);
|
addr = dev_read_addr(bus);
|
||||||
if (addr == FDT_ADDR_T_NONE)
|
if (addr == FDT_ADDR_T_NONE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ static int fsl_dspi_ofdata_to_platdata(struct udevice *bus)
|
|||||||
plat->num_chipselect =
|
plat->num_chipselect =
|
||||||
fdtdec_get_int(blob, node, "num-cs", FSL_DSPI_MAX_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) {
|
if (addr == FDT_ADDR_T_NONE) {
|
||||||
debug("DSPI: Can't get base address or size\n");
|
debug("DSPI: Can't get base address or size\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -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)
|
if (mxcs->base == FDT_ADDR_T_NONE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ static int omap3_spi_probe(struct udevice *dev)
|
|||||||
struct omap2_mcspi_platform_config* data =
|
struct omap2_mcspi_platform_config* data =
|
||||||
(struct omap2_mcspi_platform_config*)dev_get_driver_data(dev);
|
(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"))
|
if (fdtdec_get_bool(blob, node, "ti,pindir-d0-out-d1-in"))
|
||||||
priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
|
priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
|
||||||
else
|
else
|
||||||
|
@ -519,7 +519,7 @@ static int sun4i_spi_ofdata_to_platdata(struct udevice *bus)
|
|||||||
struct sun4i_spi_platdata *plat = dev_get_platdata(bus);
|
struct sun4i_spi_platdata *plat = dev_get_platdata(bus);
|
||||||
int node = dev_of_offset(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->variant = (struct sun4i_spi_variant *)dev_get_driver_data(bus);
|
||||||
plat->max_hz = fdtdec_get_int(gd->fdt_blob, node,
|
plat->max_hz = fdtdec_get_int(gd->fdt_blob, node,
|
||||||
"spi-max-frequency",
|
"spi-max-frequency",
|
||||||
|
@ -93,7 +93,7 @@ static int tegra20_sflash_ofdata_to_platdata(struct udevice *bus)
|
|||||||
const void *blob = gd->fdt_blob;
|
const void *blob = gd->fdt_blob;
|
||||||
int node = dev_of_offset(bus);
|
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);
|
plat->periph_id = clock_decode_periph_id(bus);
|
||||||
|
|
||||||
if (plat->periph_id == PERIPH_ID_NONE) {
|
if (plat->periph_id == PERIPH_ID_NONE) {
|
||||||
|
@ -99,7 +99,7 @@ static int tegra30_spi_ofdata_to_platdata(struct udevice *bus)
|
|||||||
const void *blob = gd->fdt_blob;
|
const void *blob = gd->fdt_blob;
|
||||||
int node = dev_of_offset(bus);
|
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);
|
plat->periph_id = clock_decode_periph_id(bus);
|
||||||
|
|
||||||
if (plat->periph_id == PERIPH_ID_NONE) {
|
if (plat->periph_id == PERIPH_ID_NONE) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user