aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dm9000x.c2
-rw-r--r--drivers/net/dwmac_meson8b.c4
-rw-r--r--drivers/net/mvmdio.c2
-rw-r--r--drivers/net/mvpp2.c24
-rw-r--r--drivers/net/qe/dm_qe_uec_phy.c2
5 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index b46bdeb..bec8d67 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -651,7 +651,7 @@ static int dm9000_of_to_plat(struct udevice *dev)
pdata->iobase = dev_read_addr_index(dev, 0);
db->base_io = (void __iomem *)pdata->iobase;
- db->base_data = (void __iomem *)dev_read_addr_index(dev, 1);
+ db->base_data = dev_read_addr_index_ptr(dev, 1);
return 0;
}
diff --git a/drivers/net/dwmac_meson8b.c b/drivers/net/dwmac_meson8b.c
index ddbaa87..871171e 100644
--- a/drivers/net/dwmac_meson8b.c
+++ b/drivers/net/dwmac_meson8b.c
@@ -41,8 +41,8 @@ static int dwmac_meson8b_of_to_plat(struct udevice *dev)
{
struct dwmac_meson8b_plat *pdata = dev_get_plat(dev);
- pdata->regs = (void *)dev_read_addr_index(dev, 1);
- if ((fdt_addr_t)pdata->regs == FDT_ADDR_T_NONE)
+ pdata->regs = dev_read_addr_index_ptr(dev, 1);
+ if (!pdata->regs)
return -EINVAL;
pdata->dwmac_setup = (void *)dev_get_driver_data(dev);
diff --git a/drivers/net/mvmdio.c b/drivers/net/mvmdio.c
index 6fb8a98..c0ebcdb 100644
--- a/drivers/net/mvmdio.c
+++ b/drivers/net/mvmdio.c
@@ -208,7 +208,7 @@ static int mvmdio_probe(struct udevice *dev)
{
struct mvmdio_priv *priv = dev_get_priv(dev);
- priv->mdio_base = (void *)dev_read_addr(dev);
+ priv->mdio_base = dev_read_addr_ptr(dev);
priv->type = (enum mvmdio_bus_type)dev_get_driver_data(dev);
return 0;
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index f407d8f..1cd5430 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -5300,18 +5300,18 @@ static int mvpp2_base_probe(struct udevice *dev)
}
/* Save base addresses for later use */
- priv->base = (void *)devfdt_get_addr_index(dev, 0);
- if (IS_ERR(priv->base))
- return PTR_ERR(priv->base);
+ priv->base = devfdt_get_addr_index_ptr(dev, 0);
+ if (!priv->base)
+ return -EINVAL;
if (priv->hw_version == MVPP21) {
- priv->lms_base = (void *)devfdt_get_addr_index(dev, 1);
- if (IS_ERR(priv->lms_base))
- return PTR_ERR(priv->lms_base);
+ priv->lms_base = devfdt_get_addr_index_ptr(dev, 1);
+ if (!priv->lms_base)
+ return -EINVAL;
} else {
- priv->iface_base = (void *)devfdt_get_addr_index(dev, 1);
- if (IS_ERR(priv->iface_base))
- return PTR_ERR(priv->iface_base);
+ priv->iface_base = devfdt_get_addr_index_ptr(dev, 1);
+ if (!priv->iface_base)
+ return -EINVAL;
/* Store common base addresses for all ports */
priv->mpcs_base = priv->iface_base + MVPP22_MPCS;
@@ -5350,10 +5350,10 @@ static int mvpp2_probe(struct udevice *dev)
if (priv->hw_version == MVPP21) {
int priv_common_regs_num = 2;
- port->base = (void __iomem *)devfdt_get_addr_index(
+ port->base = devfdt_get_addr_index_ptr(
dev->parent, priv_common_regs_num + port->id);
- if (IS_ERR(port->base))
- return PTR_ERR(port->base);
+ if (!port->base)
+ return -EINVAL;
} else {
port->gop_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"gop-port-id", -1);
diff --git a/drivers/net/qe/dm_qe_uec_phy.c b/drivers/net/qe/dm_qe_uec_phy.c
index 038b810..a0bcc8d 100644
--- a/drivers/net/qe/dm_qe_uec_phy.c
+++ b/drivers/net/qe/dm_qe_uec_phy.c
@@ -97,7 +97,7 @@ static int qe_uec_mdio_probe(struct udevice *dev)
u32 num = 0;
int ret = -ENODEV;
- priv->base = (struct ucc_mii_mng *)dev_read_addr(dev);
+ priv->base = dev_read_addr_ptr(dev);
base = (fdt_size_t)priv->base;
/*