mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
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>
This commit is contained in:
parent
d6ffb00a43
commit
a821c4af79
194 changed files with 281 additions and 279 deletions
|
@ -35,7 +35,7 @@ static int mvebu_ahci_probe(struct udevice *dev)
|
|||
*/
|
||||
board_ahci_enable();
|
||||
|
||||
ahci_init(dev_get_addr_ptr(dev));
|
||||
ahci_init(devfdt_get_addr_ptr(dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void *rockchip_get_cru(void)
|
|||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
priv = dev_get_addr_ptr(dev);
|
||||
priv = devfdt_get_addr_ptr(dev);
|
||||
|
||||
return priv->cru;
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ static int msm_clk_probe(struct udevice *dev)
|
|||
{
|
||||
struct msm_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->base = dev_get_addr(dev);
|
||||
priv->base = devfdt_get_addr(dev);
|
||||
if (priv->base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ int exynos_adc_ofdata_to_platdata(struct udevice *dev)
|
|||
struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
|
||||
struct exynos_adc_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->regs = (struct exynos_adc_v2 *)dev_get_addr(dev);
|
||||
priv->regs = (struct exynos_adc_v2 *)devfdt_get_addr(dev);
|
||||
if (priv->regs == (struct exynos_adc_v2 *)FDT_ADDR_T_NONE) {
|
||||
error("Dev: %s - can't get address!", dev->name);
|
||||
return -ENODATA;
|
||||
|
|
|
@ -36,10 +36,10 @@ static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
|
|||
plat->max_lun = fdtdec_get_uint(gd->fdt_blob, dev->of_offset,
|
||||
"max-lun", CONFIG_SYS_SCSI_MAX_LUN);
|
||||
|
||||
priv->base = map_physmem(dev_get_addr(dev), sizeof(void *),
|
||||
priv->base = map_physmem(devfdt_get_addr(dev), sizeof(void *),
|
||||
MAP_NOCACHE);
|
||||
|
||||
addr = dev_get_addr_index(dev, 1);
|
||||
addr = devfdt_get_addr_index(dev, 1);
|
||||
if (addr != FDT_ADDR_T_NONE) {
|
||||
priv->wrapper_base = map_physmem(addr, sizeof(void *),
|
||||
MAP_NOCACHE);
|
||||
|
|
|
@ -129,7 +129,7 @@ static int sata_ceva_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct scsi_platdata *plat = dev_get_platdata(dev);
|
||||
|
||||
plat->base = dev_get_addr(dev);
|
||||
plat->base = devfdt_get_addr(dev);
|
||||
if (plat->base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ static int ast2500_clk_probe(struct udevice *dev)
|
|||
{
|
||||
struct ast2500_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->scu = dev_get_addr_ptr(dev);
|
||||
priv->scu = devfdt_get_addr_ptr(dev);
|
||||
if (IS_ERR(priv->scu))
|
||||
return PTR_ERR(priv->scu);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ int at91_pmc_core_probe(struct udevice *dev)
|
|||
|
||||
dev = dev_get_parent(dev);
|
||||
|
||||
plat->reg_base = (struct at91_pmc *)dev_get_addr_ptr(dev);
|
||||
plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ int at91_clk_probe(struct udevice *dev)
|
|||
dev_periph_container = dev_get_parent(dev);
|
||||
dev_pmc = dev_get_parent(dev_periph_container);
|
||||
|
||||
plat->reg_base = (struct at91_pmc *)dev_get_addr_ptr(dev_pmc);
|
||||
plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev_pmc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static int bcm63xx_clk_probe(struct udevice *dev)
|
|||
fdt_addr_t addr;
|
||||
fdt_size_t size;
|
||||
|
||||
addr = dev_get_addr_size_index(dev, 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev, 0, &size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static int exynos7420_clk_topc_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;
|
||||
|
||||
|
@ -152,7 +152,7 @@ static int exynos7420_clk_top0_probe(struct udevice *dev)
|
|||
if (!priv)
|
||||
return -EINVAL;
|
||||
|
||||
base = dev_get_addr(dev);
|
||||
base = devfdt_get_addr(dev);
|
||||
if (base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ static int rk3036_clk_probe(struct udevice *dev)
|
|||
{
|
||||
struct rk3036_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->cru = (struct rk3036_cru *)dev_get_addr(dev);
|
||||
priv->cru = (struct rk3036_cru *)devfdt_get_addr(dev);
|
||||
rkclk_init(priv->cru);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -542,7 +542,7 @@ static int rk3188_clk_ofdata_to_platdata(struct udevice *dev)
|
|||
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
struct rk3188_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->cru = (struct rk3188_cru *)dev_get_addr(dev);
|
||||
priv->cru = (struct rk3188_cru *)devfdt_get_addr(dev);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -794,7 +794,7 @@ static int rk3288_clk_ofdata_to_platdata(struct udevice *dev)
|
|||
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
struct rk3288_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->cru = (struct rk3288_cru *)dev_get_addr(dev);
|
||||
priv->cru = (struct rk3288_cru *)devfdt_get_addr(dev);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -555,7 +555,7 @@ static int rk3328_clk_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct rk3328_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->cru = (struct rk3328_cru *)dev_get_addr(dev);
|
||||
priv->cru = (struct rk3328_cru *)devfdt_get_addr(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -970,7 +970,7 @@ static int rk3399_clk_ofdata_to_platdata(struct udevice *dev)
|
|||
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
struct rk3399_clk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->cru = (struct rk3399_cru *)dev_get_addr(dev);
|
||||
priv->cru = (struct rk3399_cru *)devfdt_get_addr(dev);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1154,7 +1154,7 @@ static int rk3399_pmuclk_ofdata_to_platdata(struct udevice *dev)
|
|||
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->pmucru = (struct rk3399_pmucru *)dev_get_addr(dev);
|
||||
priv->pmucru = (struct rk3399_pmucru *)devfdt_get_addr(dev);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ static int uniphier_clk_probe(struct udevice *dev)
|
|||
struct uniphier_clk_priv *priv = dev_get_priv(dev);
|
||||
fdt_addr_t addr;
|
||||
|
||||
addr = dev_get_addr(dev->parent);
|
||||
addr = devfdt_get_addr(dev->parent);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
fdt_addr_t dev_get_addr_index(struct udevice *dev, int index)
|
||||
fdt_addr_t devfdt_get_addr_index(struct udevice *dev, int index)
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
fdt_addr_t addr;
|
||||
|
@ -74,7 +74,7 @@ fdt_addr_t dev_get_addr_index(struct udevice *dev, int index)
|
|||
* Some platforms need a special address translation. Those
|
||||
* platforms (e.g. mvebu in SPL) can configure a translation
|
||||
* offset in the DM by calling dm_set_translation_offset() that
|
||||
* will get added to all addresses returned by dev_get_addr().
|
||||
* will get added to all addresses returned by devfdt_get_addr().
|
||||
*/
|
||||
addr += dm_get_translation_offset();
|
||||
|
||||
|
@ -84,7 +84,7 @@ fdt_addr_t dev_get_addr_index(struct udevice *dev, int index)
|
|||
#endif
|
||||
}
|
||||
|
||||
fdt_addr_t dev_get_addr_size_index(struct udevice *dev, int index,
|
||||
fdt_addr_t devfdt_get_addr_size_index(struct udevice *dev, int index,
|
||||
fdt_size_t *size)
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||
|
@ -100,13 +100,13 @@ fdt_addr_t dev_get_addr_size_index(struct udevice *dev, int index,
|
|||
* Get the base address via the existing function which handles
|
||||
* all Kconfig cases
|
||||
*/
|
||||
return dev_get_addr_index(dev, index);
|
||||
return devfdt_get_addr_index(dev, index);
|
||||
#else
|
||||
return FDT_ADDR_T_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
fdt_addr_t dev_get_addr_name(struct udevice *dev, const char *name)
|
||||
fdt_addr_t devfdt_get_addr_name(struct udevice *dev, const char *name)
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||
int index;
|
||||
|
@ -116,25 +116,25 @@ fdt_addr_t dev_get_addr_name(struct udevice *dev, const char *name)
|
|||
if (index < 0)
|
||||
return index;
|
||||
|
||||
return dev_get_addr_index(dev, index);
|
||||
return devfdt_get_addr_index(dev, index);
|
||||
#else
|
||||
return FDT_ADDR_T_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
fdt_addr_t dev_get_addr(struct udevice *dev)
|
||||
fdt_addr_t devfdt_get_addr(struct udevice *dev)
|
||||
{
|
||||
return dev_get_addr_index(dev, 0);
|
||||
return devfdt_get_addr_index(dev, 0);
|
||||
}
|
||||
|
||||
void *dev_get_addr_ptr(struct udevice *dev)
|
||||
void *devfdt_get_addr_ptr(struct udevice *dev)
|
||||
{
|
||||
return (void *)(uintptr_t)dev_get_addr_index(dev, 0);
|
||||
return (void *)(uintptr_t)devfdt_get_addr_index(dev, 0);
|
||||
}
|
||||
|
||||
void *dev_map_physmem(struct udevice *dev, unsigned long size)
|
||||
void *devfdt_map_physmem(struct udevice *dev, unsigned long size)
|
||||
{
|
||||
fdt_addr_t addr = dev_get_addr(dev);
|
||||
fdt_addr_t addr = devfdt_get_addr(dev);
|
||||
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return NULL;
|
||||
|
|
|
@ -300,7 +300,7 @@ int bmips_cpu_probe(struct udevice *dev)
|
|||
fdt_addr_t addr;
|
||||
fdt_size_t size;
|
||||
|
||||
addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev_get_parent(dev), 0, &size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ static int ti_edma3_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct ti_edma3_priv *priv = dev_get_priv(dev);
|
||||
|
||||
priv->base = dev_get_addr(dev);
|
||||
priv->base = devfdt_get_addr(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ config SYS_I2C_INTEL
|
|||
|
||||
config SYS_I2C_IMX_LPI2C
|
||||
bool "NXP i.MX LPI2C driver"
|
||||
depends on ARCH_MX7ULP
|
||||
help
|
||||
Add support for the NXP i.MX LPI2C driver.
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ static int ast_i2c_ofdata_to_platdata(struct udevice *dev)
|
|||
struct ast_i2c_priv *priv = dev_get_priv(dev);
|
||||
int ret;
|
||||
|
||||
priv->regs = dev_get_addr_ptr(dev);
|
||||
priv->regs = devfdt_get_addr_ptr(dev);
|
||||
if (IS_ERR(priv->regs))
|
||||
return PTR_ERR(priv->regs);
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ static int at91_i2c_ofdata_to_platdata(struct udevice *dev)
|
|||
struct at91_i2c_bus *bus = dev_get_priv(dev);
|
||||
int node = dev_of_offset(dev);
|
||||
|
||||
bus->regs = (struct at91_i2c_regs *)dev_get_addr(dev);
|
||||
bus->regs = (struct at91_i2c_regs *)devfdt_get_addr(dev);
|
||||
bus->pdata = (struct at91_i2c_pdata *)dev_get_driver_data(dev);
|
||||
bus->clock_frequency = fdtdec_get_int(blob, node,
|
||||
"clock-frequency", 100000);
|
||||
|
|
|
@ -470,7 +470,7 @@ static int davinci_i2c_probe(struct udevice *dev)
|
|||
struct i2c_bus *i2c_bus = dev_get_priv(dev);
|
||||
|
||||
i2c_bus->id = dev->seq;
|
||||
i2c_bus->regs = (struct i2c_regs *)dev_get_addr(dev);
|
||||
i2c_bus->regs = (struct i2c_regs *)devfdt_get_addr(dev);
|
||||
|
||||
i2c_bus->speed = 100000;
|
||||
_davinci_i2c_init(i2c_bus->regs, i2c_bus->speed, 0);
|
||||
|
|
|
@ -545,7 +545,7 @@ static int designware_i2c_probe(struct udevice *bus)
|
|||
#endif
|
||||
#endif
|
||||
} else {
|
||||
priv->regs = (struct i2c_regs *)dev_get_addr_ptr(bus);
|
||||
priv->regs = (struct i2c_regs *)devfdt_get_addr_ptr(bus);
|
||||
}
|
||||
|
||||
__dw_i2c_init(priv->regs, 0, 0);
|
||||
|
|
|
@ -524,7 +524,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
node = dev_of_offset(dev);
|
||||
|
||||
i2c_bus->hsregs = (struct exynos5_hsi2c *)dev_get_addr(dev);
|
||||
i2c_bus->hsregs = (struct exynos5_hsi2c *)devfdt_get_addr(dev);
|
||||
|
||||
i2c_bus->id = pinmux_decode_periph_id(blob, node);
|
||||
|
||||
|
|
|
@ -419,7 +419,7 @@ static int cdns_i2c_ofdata_to_platdata(struct udevice *dev)
|
|||
struct cdns_i2c_platform_data *pdata =
|
||||
(struct cdns_i2c_platform_data *)dev_get_driver_data(dev);
|
||||
|
||||
i2c_bus->regs = (struct cdns_i2c_regs *)dev_get_addr(dev);
|
||||
i2c_bus->regs = (struct cdns_i2c_regs *)devfdt_get_addr(dev);
|
||||
if (!i2c_bus->regs)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ static int uniphier_fi2c_probe(struct udevice *dev)
|
|||
struct uniphier_fi2c_dev *priv = dev_get_priv(dev);
|
||||
int ret;
|
||||
|
||||
addr = dev_get_addr(dev);
|
||||
addr = devfdt_get_addr(dev);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static int uniphier_i2c_probe(struct udevice *dev)
|
|||
fdt_addr_t addr;
|
||||
struct uniphier_i2c_dev *priv = dev_get_priv(dev);
|
||||
|
||||
addr = dev_get_addr(dev);
|
||||
addr = devfdt_get_addr(dev);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -25,9 +25,8 @@ int __weak init_i2c_power(unsigned i2c_num)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int imx_lpci2c_check_busy_bus(struct udevice *bus)
|
||||
static int imx_lpci2c_check_busy_bus(const struct imx_lpi2c_reg *regs)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 status;
|
||||
|
||||
|
@ -39,9 +38,8 @@ static int imx_lpci2c_check_busy_bus(struct udevice *bus)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int imx_lpci2c_check_clear_error(struct udevice *bus)
|
||||
static int imx_lpci2c_check_clear_error(struct imx_lpi2c_reg *regs)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 val, status;
|
||||
|
||||
|
@ -71,9 +69,8 @@ static int imx_lpci2c_check_clear_error(struct udevice *bus)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_wait_for_tx_ready(struct udevice *bus)
|
||||
static int bus_i2c_wait_for_tx_ready(struct imx_lpi2c_reg *regs)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 txcount = 0;
|
||||
ulong start_time = get_timer(0);
|
||||
|
@ -81,7 +78,7 @@ static int bus_i2c_wait_for_tx_ready(struct udevice *bus)
|
|||
do {
|
||||
txcount = LPI2C_MFSR_TXCOUNT(readl(®s->mfsr));
|
||||
txcount = LPI2C_FIFO_SIZE - txcount;
|
||||
result = imx_lpci2c_check_clear_error(bus);
|
||||
result = imx_lpci2c_check_clear_error(regs);
|
||||
if (result) {
|
||||
debug("i2c: wait for tx ready: result 0x%x\n", result);
|
||||
return result;
|
||||
|
@ -95,9 +92,8 @@ static int bus_i2c_wait_for_tx_ready(struct udevice *bus)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_send(struct udevice *bus, u8 *txbuf, int len)
|
||||
static int bus_i2c_send(struct imx_lpi2c_reg *regs, u8 *txbuf, int len)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
|
||||
/* empty tx */
|
||||
|
@ -105,7 +101,7 @@ static int bus_i2c_send(struct udevice *bus, u8 *txbuf, int len)
|
|||
return result;
|
||||
|
||||
while (len--) {
|
||||
result = bus_i2c_wait_for_tx_ready(bus);
|
||||
result = bus_i2c_wait_for_tx_ready(regs);
|
||||
if (result) {
|
||||
debug("i2c: send wait fot tx ready: %d\n", result);
|
||||
return result;
|
||||
|
@ -116,9 +112,8 @@ static int bus_i2c_send(struct udevice *bus, u8 *txbuf, int len)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_receive(struct udevice *bus, u8 *rxbuf, int len)
|
||||
static int bus_i2c_receive(struct imx_lpi2c_reg *regs, u8 *rxbuf, int len)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 val;
|
||||
ulong start_time = get_timer(0);
|
||||
|
@ -127,7 +122,7 @@ static int bus_i2c_receive(struct udevice *bus, u8 *rxbuf, int len)
|
|||
if (!len)
|
||||
return result;
|
||||
|
||||
result = bus_i2c_wait_for_tx_ready(bus);
|
||||
result = bus_i2c_wait_for_tx_ready(regs);
|
||||
if (result) {
|
||||
debug("i2c: receive wait fot tx ready: %d\n", result);
|
||||
return result;
|
||||
|
@ -141,9 +136,10 @@ static int bus_i2c_receive(struct udevice *bus, u8 *rxbuf, int len)
|
|||
|
||||
while (len--) {
|
||||
do {
|
||||
result = imx_lpci2c_check_clear_error(bus);
|
||||
result = imx_lpci2c_check_clear_error(regs);
|
||||
if (result) {
|
||||
debug("i2c: receive check clear error: %d\n", result);
|
||||
debug("i2c: receive check clear error: %d\n",
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
if (get_timer(start_time) > LPI2C_TIMEOUT_MS) {
|
||||
|
@ -158,13 +154,12 @@ static int bus_i2c_receive(struct udevice *bus, u8 *rxbuf, int len)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_start(struct udevice *bus, u8 addr, u8 dir)
|
||||
static int bus_i2c_start(struct imx_lpi2c_reg *regs, u8 addr, u8 dir)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 val;
|
||||
|
||||
result = imx_lpci2c_check_busy_bus(bus);
|
||||
result = imx_lpci2c_check_busy_bus(regs);
|
||||
if (result) {
|
||||
debug("i2c: start check busy bus: 0x%x\n", result);
|
||||
return result;
|
||||
|
@ -175,7 +170,7 @@ static int bus_i2c_start(struct udevice *bus, u8 addr, u8 dir)
|
|||
val = readl(®s->mcfgr1) & ~LPI2C_MCFGR1_AUTOSTOP_MASK;
|
||||
writel(val, ®s->mcfgr1);
|
||||
/* wait tx fifo ready */
|
||||
result = bus_i2c_wait_for_tx_ready(bus);
|
||||
result = bus_i2c_wait_for_tx_ready(regs);
|
||||
if (result) {
|
||||
debug("i2c: start wait for tx ready: 0x%x\n", result);
|
||||
return result;
|
||||
|
@ -186,13 +181,13 @@ static int bus_i2c_start(struct udevice *bus, u8 addr, u8 dir)
|
|||
|
||||
return result;
|
||||
}
|
||||
static int bus_i2c_stop(struct udevice *bus)
|
||||
|
||||
static int bus_i2c_stop(struct imx_lpi2c_reg *regs)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
u32 status;
|
||||
|
||||
result = bus_i2c_wait_for_tx_ready(bus);
|
||||
result = bus_i2c_wait_for_tx_ready(regs);
|
||||
if (result) {
|
||||
debug("i2c: stop wait for tx ready: 0x%x\n", result);
|
||||
return result;
|
||||
|
@ -203,7 +198,7 @@ static int bus_i2c_stop(struct udevice *bus)
|
|||
|
||||
while (result == LPI2C_SUCESS) {
|
||||
status = readl(®s->msr);
|
||||
result = imx_lpci2c_check_clear_error(bus);
|
||||
result = imx_lpci2c_check_clear_error(regs);
|
||||
/* stop detect flag */
|
||||
if (status & LPI2C_MSR_SDF_MASK) {
|
||||
/* clear stop flag */
|
||||
|
@ -216,34 +211,34 @@ static int bus_i2c_stop(struct udevice *bus)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_read(struct udevice *bus, u32 chip, u8 *buf, int len)
|
||||
static int bus_i2c_read(struct imx_lpi2c_reg *regs, u32 chip, u8 *buf, int len)
|
||||
{
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
|
||||
result = bus_i2c_start(bus, chip, 1);
|
||||
result = bus_i2c_start(regs, chip, 1);
|
||||
if (result)
|
||||
return result;
|
||||
result = bus_i2c_receive(bus, buf, len);
|
||||
result = bus_i2c_receive(regs, buf, len);
|
||||
if (result)
|
||||
return result;
|
||||
result = bus_i2c_stop(bus);
|
||||
result = bus_i2c_stop(regs);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int bus_i2c_write(struct udevice *bus, u32 chip, u8 *buf, int len)
|
||||
static int bus_i2c_write(struct imx_lpi2c_reg *regs, u32 chip, u8 *buf, int len)
|
||||
{
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
|
||||
result = bus_i2c_start(bus, chip, 0);
|
||||
result = bus_i2c_start(regs, chip, 0);
|
||||
if (result)
|
||||
return result;
|
||||
result = bus_i2c_send(bus, buf, len);
|
||||
result = bus_i2c_send(regs, buf, len);
|
||||
if (result)
|
||||
return result;
|
||||
result = bus_i2c_stop(bus);
|
||||
result = bus_i2c_stop(regs);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
|
@ -253,7 +248,7 @@ static int bus_i2c_write(struct udevice *bus, u32 chip, u8 *buf, int len)
|
|||
|
||||
static int bus_i2c_set_bus_speed(struct udevice *bus, int speed)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
struct imx_lpi2c_reg *regs;
|
||||
u32 val;
|
||||
u32 preescale = 0, best_pre = 0, clkhi = 0;
|
||||
u32 best_clkhi = 0, abs_error = 0, rate;
|
||||
|
@ -262,6 +257,7 @@ static int bus_i2c_set_bus_speed(struct udevice *bus, int speed)
|
|||
bool mode;
|
||||
int i;
|
||||
|
||||
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
||||
clock_rate = imx_get_i2cclk(bus->seq + 4);
|
||||
if (!clock_rate)
|
||||
return -EPERM;
|
||||
|
@ -320,10 +316,11 @@ static int bus_i2c_set_bus_speed(struct udevice *bus, int speed)
|
|||
|
||||
static int bus_i2c_init(struct udevice *bus, int speed)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs = (struct imx_lpi2c_reg *)dev_get_addr(bus);
|
||||
struct imx_lpi2c_reg *regs;
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
||||
/* reset peripheral */
|
||||
writel(LPI2C_MCR_RST_MASK, ®s->mcr);
|
||||
writel(0x0, ®s->mcr);
|
||||
|
@ -356,16 +353,18 @@ static int bus_i2c_init(struct udevice *bus, int speed)
|
|||
static int imx_lpi2c_probe_chip(struct udevice *bus, u32 chip,
|
||||
u32 chip_flags)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs;
|
||||
lpi2c_status_t result = LPI2C_SUCESS;
|
||||
|
||||
result = bus_i2c_start(bus, chip, 0);
|
||||
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
||||
result = bus_i2c_start(regs, chip, 0);
|
||||
if (result) {
|
||||
bus_i2c_stop(bus);
|
||||
bus_i2c_stop(regs);
|
||||
bus_i2c_init(bus, 100000);
|
||||
return result;
|
||||
}
|
||||
|
||||
result = bus_i2c_stop(bus);
|
||||
result = bus_i2c_stop(regs);
|
||||
if (result) {
|
||||
bus_i2c_init(bus, 100000);
|
||||
return -result;
|
||||
|
@ -376,15 +375,16 @@ static int imx_lpi2c_probe_chip(struct udevice *bus, u32 chip,
|
|||
|
||||
static int imx_lpi2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs)
|
||||
{
|
||||
struct imx_lpi2c_reg *regs;
|
||||
int ret = 0;
|
||||
|
||||
regs = (struct imx_lpi2c_reg *)devfdt_get_addr(bus);
|
||||
for (; nmsgs > 0; nmsgs--, msg++) {
|
||||
debug("i2c_xfer: chip=0x%x, len=0x%x\n", msg->addr, msg->len);
|
||||
if (msg->flags & I2C_M_RD)
|
||||
ret = bus_i2c_read(bus, msg->addr, msg->buf,
|
||||
msg->len);
|
||||
ret = bus_i2c_read(regs, msg->addr, msg->buf, msg->len);
|
||||
else {
|
||||
ret = bus_i2c_write(bus, msg->addr, msg->buf,
|
||||
ret = bus_i2c_write(regs, msg->addr, msg->buf,
|
||||
msg->len);
|
||||
if (ret)
|
||||
break;
|
||||
|
@ -410,7 +410,7 @@ static int imx_lpi2c_probe(struct udevice *bus)
|
|||
|
||||
i2c_bus->driver_data = dev_get_driver_data(bus);
|
||||
|
||||
addr = dev_get_addr(bus);
|
||||
addr = devfdt_get_addr(bus);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -579,7 +579,7 @@ static int mv_i2c_probe(struct udevice *bus)
|
|||
{
|
||||
struct mv_i2c_priv *priv = dev_get_priv(bus);
|
||||
|
||||
priv->base = (void *)dev_get_addr_ptr(bus);
|
||||
priv->base = (void *)devfdt_get_addr_ptr(bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -778,7 +778,7 @@ static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus)
|
|||
{
|
||||
struct mvtwsi_i2c_dev *dev = dev_get_priv(bus);
|
||||
|
||||
dev->base = dev_get_addr_ptr(bus);
|
||||
dev->base = devfdt_get_addr_ptr(bus);
|
||||
|
||||
if (!dev->base)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -752,7 +752,7 @@ static int mxc_i2c_probe(struct udevice *bus)
|
|||
|
||||
i2c_bus->driver_data = dev_get_driver_data(bus);
|
||||
|
||||
addr = dev_get_addr(bus);
|
||||
addr = devfdt_get_addr(bus);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -896,7 +896,7 @@ static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
|
|||
{
|
||||
struct omap_i2c *priv = dev_get_priv(bus);
|
||||
|
||||
priv->regs = map_physmem(dev_get_addr(bus), sizeof(void *),
|
||||
priv->regs = map_physmem(devfdt_get_addr(bus), sizeof(void *),
|
||||
MAP_NOCACHE);
|
||||
priv->speed = CONFIG_SYS_OMAP24_I2C_SPEED;
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ static int rockchip_i2c_probe(struct udevice *bus)
|
|||
{
|
||||
struct rk_i2c *priv = dev_get_priv(bus);
|
||||
|
||||
priv->regs = (void *)dev_get_addr(bus);
|
||||
priv->regs = (void *)devfdt_get_addr(bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
node = dev_of_offset(dev);
|
||||
|
||||
i2c_bus->regs = (struct s3c24x0_i2c *)dev_get_addr(dev);
|
||||
i2c_bus->regs = (struct s3c24x0_i2c *)devfdt_get_addr(dev);
|
||||
|
||||
i2c_bus->id = pinmux_decode_periph_id(blob, node);
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ static int tegra_i2c_probe(struct udevice *dev)
|
|||
|
||||
i2c_bus->id = dev->seq;
|
||||
i2c_bus->type = dev_get_driver_data(dev);
|
||||
i2c_bus->regs = (struct i2c_ctlr *)dev_get_addr(dev);
|
||||
i2c_bus->regs = (struct i2c_ctlr *)devfdt_get_addr(dev);
|
||||
|
||||
ret = reset_get_by_name(dev, "i2c", &i2c_bus->reset_ctl);
|
||||
if (ret) {
|
||||
|
|
|
@ -293,7 +293,7 @@ static int tegra_kbd_probe(struct udevice *dev)
|
|||
int node = dev_of_offset(dev);
|
||||
int ret;
|
||||
|
||||
priv->kbc = (struct kbc_tegra *)dev_get_addr(dev);
|
||||
priv->kbc = (struct kbc_tegra *)devfdt_get_addr(dev);
|
||||
if ((fdt_addr_t)priv->kbc == FDT_ADDR_T_NONE) {
|
||||
debug("%s: No keyboard register found\n", __func__);
|
||||
return -EINVAL;
|
||||
|
|
|
@ -158,7 +158,7 @@ static int bcm6328_led_probe(struct udevice *dev)
|
|||
void __iomem *regs;
|
||||
u32 set_bits = 0;
|
||||
|
||||
addr = dev_get_addr_size_index(dev, 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev, 0, &size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -185,7 +185,8 @@ static int bcm6328_led_probe(struct udevice *dev)
|
|||
struct bcm6328_led_priv *priv = dev_get_priv(dev);
|
||||
unsigned int pin;
|
||||
|
||||
addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev_get_parent(dev), 0,
|
||||
&size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ static int bcm6358_led_probe(struct udevice *dev)
|
|||
unsigned int clk_div;
|
||||
u32 set_bits = 0;
|
||||
|
||||
addr = dev_get_addr_size_index(dev, 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev, 0, &size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -158,7 +158,8 @@ static int bcm6358_led_probe(struct udevice *dev)
|
|||
struct bcm6358_led_priv *priv = dev_get_priv(dev);
|
||||
unsigned int pin;
|
||||
|
||||
addr = dev_get_addr_size_index(dev_get_parent(dev), 0, &size);
|
||||
addr = devfdt_get_addr_size_index(dev_get_parent(dev), 0,
|
||||
&size);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ static int tegra_hsp_probe(struct udevice *dev)
|
|||
|
||||
debug("%s(dev=%p)\n", __func__, dev);
|
||||
|
||||
thsp->regs = dev_get_addr(dev);
|
||||
thsp->regs = devfdt_get_addr(dev);
|
||||
if (thsp->regs == FDT_ADDR_T_NONE)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct altera_sysid_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_sysid_regs),
|
||||
MAP_NOCACHE);
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -941,7 +941,7 @@ static int ag7xxx_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
const char *phy_mode;
|
||||
int ret;
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
pdata->phy_interface = -1;
|
||||
|
||||
/* Decoding of convoluted PHY wiring on Atheros MIPS. */
|
||||
|
|
|
@ -1293,7 +1293,7 @@ static int cpsw_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
int num_mode_gpios;
|
||||
int ret;
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
priv->data.version = CPSW_CTRL_VERSION_2;
|
||||
priv->data.bd_ram_ofs = CPSW_BD_OFFSET;
|
||||
priv->data.ale_reg_ofs = CPSW_ALE_OFFSET;
|
||||
|
|
|
@ -726,7 +726,7 @@ int designware_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
#endif
|
||||
int ret = 0;
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
pdata->phy_interface = -1;
|
||||
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
|
||||
NULL);
|
||||
|
|
|
@ -1452,9 +1452,9 @@ static int eqos_probe(struct udevice *dev)
|
|||
eqos->dev = dev;
|
||||
eqos->config = (void *)dev_get_driver_data(dev);
|
||||
|
||||
eqos->regs = dev_get_addr(dev);
|
||||
eqos->regs = devfdt_get_addr(dev);
|
||||
if (eqos->regs == FDT_ADDR_T_NONE) {
|
||||
error("dev_get_addr() failed");
|
||||
error("devfdt_get_addr() failed");
|
||||
return -ENODEV;
|
||||
}
|
||||
eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
|
||||
|
|
|
@ -689,8 +689,8 @@ static int ethoc_ofdata_to_platdata(struct udevice *dev)
|
|||
struct ethoc_eth_pdata *pdata = dev_get_platdata(dev);
|
||||
fdt_addr_t addr;
|
||||
|
||||
pdata->eth_pdata.iobase = dev_get_addr(dev);
|
||||
addr = dev_get_addr_index(dev, 1);
|
||||
pdata->eth_pdata.iobase = devfdt_get_addr(dev);
|
||||
addr = devfdt_get_addr_index(dev, 1);
|
||||
if (addr != FDT_ADDR_T_NONE)
|
||||
pdata->packet_base = addr;
|
||||
return 0;
|
||||
|
|
|
@ -1279,7 +1279,7 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
|
|||
struct fec_priv *priv = dev_get_priv(dev);
|
||||
const char *phy_mode;
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
|
||||
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
|
||||
priv->eth = (struct ethernet_regs *)pdata->iobase;
|
||||
|
||||
pdata->phy_interface = -1;
|
||||
|
|
|
@ -392,7 +392,7 @@ static int ftmac100_ofdata_to_platdata(struct udevice *dev)
|
|||
struct ftmac100_data *priv = dev_get_priv(dev);
|
||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
const char *mac;
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
priv->iobase = pdata->iobase;
|
||||
mac = dtbmacaddr(0);
|
||||
if (mac)
|
||||
|
|
|
@ -1134,7 +1134,7 @@ static int ks2_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
ks2_eth_parse_slave_interface(dev_of_offset(dev), gbe_0, priv, pdata);
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1090,7 +1090,7 @@ static int macb_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1756,7 +1756,7 @@ static int mvneta_ofdata_to_platdata(struct udevice *dev)
|
|||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
const char *phy_mode;
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
|
||||
/* Get phy-mode / phy_interface from DT */
|
||||
pdata->phy_interface = -1;
|
||||
|
|
|
@ -5394,18 +5394,18 @@ static int mvpp2_base_probe(struct udevice *dev)
|
|||
memset(bd_space, 0, size);
|
||||
|
||||
/* Save base addresses for later use */
|
||||
priv->base = (void *)dev_get_addr_index(dev, 0);
|
||||
priv->base = (void *)devfdt_get_addr_index(dev, 0);
|
||||
if (IS_ERR(priv->base))
|
||||
return PTR_ERR(priv->base);
|
||||
|
||||
if (priv->hw_version == MVPP21) {
|
||||
priv->lms_base = (void *)dev_get_addr_index(dev, 1);
|
||||
priv->lms_base = (void *)devfdt_get_addr_index(dev, 1);
|
||||
if (IS_ERR(priv->lms_base))
|
||||
return PTR_ERR(priv->lms_base);
|
||||
|
||||
priv->mdio_base = priv->lms_base + MVPP21_SMI;
|
||||
} else {
|
||||
priv->iface_base = (void *)dev_get_addr_index(dev, 1);
|
||||
priv->iface_base = (void *)devfdt_get_addr_index(dev, 1);
|
||||
if (IS_ERR(priv->iface_base))
|
||||
return PTR_ERR(priv->iface_base);
|
||||
|
||||
|
@ -5463,7 +5463,7 @@ static int mvpp2_probe(struct udevice *dev)
|
|||
if (priv->hw_version == MVPP21) {
|
||||
int priv_common_regs_num = 2;
|
||||
|
||||
port->base = (void __iomem *)dev_get_addr_index(
|
||||
port->base = (void __iomem *)devfdt_get_addr_index(
|
||||
dev->parent, priv_common_regs_num + port->id);
|
||||
if (IS_ERR(port->base))
|
||||
return PTR_ERR(port->base);
|
||||
|
|
|
@ -145,7 +145,7 @@ static int sb_eth_raw_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ static int sb_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -776,8 +776,8 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
int ret = 0;
|
||||
#endif
|
||||
|
||||
pdata->iobase = dev_get_addr_name(dev, "emac");
|
||||
priv->sysctl_reg = dev_get_addr_name(dev, "syscon");
|
||||
pdata->iobase = devfdt_get_addr_name(dev, "emac");
|
||||
priv->sysctl_reg = devfdt_get_addr_name(dev, "syscon");
|
||||
|
||||
pdata->phy_interface = -1;
|
||||
priv->phyaddr = -1;
|
||||
|
|
|
@ -576,7 +576,7 @@ static int sunxi_emac_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
{
|
||||
struct eth_pdata *pdata = dev_get_platdata(dev);
|
||||
|
||||
pdata->iobase = dev_get_addr(dev);
|
||||
pdata->iobase = devfdt_get_addr(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -780,7 +780,7 @@ int tsec_probe(struct udevice *dev)
|
|||
const char *phy_mode;
|
||||
int ret;
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
|
||||
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
|
||||
priv->regs = (struct tsec *)pdata->iobase;
|
||||
|
||||
offset = fdtdec_lookup_phandle(gd->fdt_blob, dev_of_offset(dev),
|
||||
|
|
|
@ -686,7 +686,7 @@ static int axi_emac_ofdata_to_platdata(struct udevice *dev)
|
|||
int offset = 0;
|
||||
const char *phy_mode;
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
|
||||
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
|
||||
priv->iobase = (struct axi_regs *)pdata->iobase;
|
||||
|
||||
offset = fdtdec_lookup_phandle(gd->fdt_blob, node,
|
||||
|
|
|
@ -598,7 +598,7 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
|
|||
struct xemaclite *emaclite = dev_get_priv(dev);
|
||||
int offset = 0;
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
|
||||
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
|
||||
emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
|
||||
0x10000);
|
||||
|
||||
|
|
|
@ -683,7 +683,7 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
|
|||
int node = dev_of_offset(dev);
|
||||
const char *phy_mode;
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
|
||||
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
|
||||
priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
|
||||
/* Hardcode for now */
|
||||
priv->phyaddr = -1;
|
||||
|
|
|
@ -521,12 +521,12 @@ static int pcie_dw_mvebu_ofdata_to_platdata(struct udevice *dev)
|
|||
struct pcie_dw_mvebu *pcie = dev_get_priv(dev);
|
||||
|
||||
/* Get the controller base address */
|
||||
pcie->ctrl_base = (void *)dev_get_addr_index(dev, 0);
|
||||
pcie->ctrl_base = (void *)devfdt_get_addr_index(dev, 0);
|
||||
if ((fdt_addr_t)pcie->ctrl_base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
/* Get the config space base address and size */
|
||||
pcie->cfg_base = (void *)dev_get_addr_size_index(dev, 1,
|
||||
pcie->cfg_base = (void *)devfdt_get_addr_size_index(dev, 1,
|
||||
&pcie->cfg_size);
|
||||
if ((fdt_addr_t)pcie->cfg_base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -113,11 +113,11 @@ static int comphy_probe(struct udevice *dev)
|
|||
static int current_idx;
|
||||
|
||||
/* Save base addresses for later use */
|
||||
chip_cfg->comphy_base_addr = (void *)dev_get_addr_index(dev, 0);
|
||||
chip_cfg->comphy_base_addr = (void *)devfdt_get_addr_index(dev, 0);
|
||||
if (IS_ERR(chip_cfg->comphy_base_addr))
|
||||
return PTR_ERR(chip_cfg->comphy_base_addr);
|
||||
|
||||
chip_cfg->hpipe3_base_addr = (void *)dev_get_addr_index(dev, 1);
|
||||
chip_cfg->hpipe3_base_addr = (void *)devfdt_get_addr_index(dev, 1);
|
||||
if (IS_ERR(chip_cfg->hpipe3_base_addr))
|
||||
return PTR_ERR(chip_cfg->hpipe3_base_addr);
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ static int pipe3_phy_probe(struct udevice *dev)
|
|||
fdt_size_t sz;
|
||||
struct omap_pipe3 *pipe3 = dev_get_priv(dev);
|
||||
|
||||
addr = dev_get_addr_size_index(dev, 2, &sz);
|
||||
addr = devfdt_get_addr_size_index(dev, 2, &sz);
|
||||
if (addr == FDT_ADDR_T_NONE) {
|
||||
error("missing pll ctrl address\n");
|
||||
return -EINVAL;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue