summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec_mxc.c7
-rw-r--r--drivers/net/fsl-mc/mc.c2
-rw-r--r--drivers/net/fsl_mcdmafec.c2
-rw-r--r--drivers/net/ftgmac100.c2
-rw-r--r--drivers/net/higmacv300.c2
-rw-r--r--drivers/net/mcffec.c2
-rw-r--r--drivers/net/octeontx/nicvf_main.c9
-rw-r--r--drivers/net/octeontx/smi.c2
-rw-r--r--drivers/net/octeontx2/nix.c2
-rw-r--r--drivers/net/octeontx2/rvu_pf.c6
-rw-r--r--drivers/net/xilinx_axi_emac.c2
-rw-r--r--drivers/net/xilinx_emaclite.c2
-rw-r--r--drivers/net/zynq_gem.c2
13 files changed, 22 insertions, 20 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 2ba5481e44..e3b29a9c3e 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1451,7 +1451,7 @@ static int fecmxc_probe(struct udevice *dev)
fec_reg_setup(priv);
- priv->dev_id = dev->seq;
+ priv->dev_id = dev_seq(dev);
#ifdef CONFIG_DM_ETH_PHY
bus = eth_phy_get_mdio_bus(dev);
@@ -1459,9 +1459,10 @@ static int fecmxc_probe(struct udevice *dev)
if (!bus) {
#ifdef CONFIG_FEC_MXC_MDIO_BASE
- bus = fec_get_miibus((ulong)CONFIG_FEC_MXC_MDIO_BASE, dev->seq);
+ bus = fec_get_miibus((ulong)CONFIG_FEC_MXC_MDIO_BASE,
+ dev_seq(dev));
#else
- bus = fec_get_miibus((ulong)priv->eth, dev->seq);
+ bus = fec_get_miibus((ulong)priv->eth, dev_seq(dev));
#endif
}
if (!bus) {
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 4b0c0ed1c3..5bfe3781a1 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -187,7 +187,7 @@ static int mc_fixup_mac_addr(void *blob, int nodeoffset,
#ifdef CONFIG_DM_ETH
struct eth_pdata *plat = dev_get_plat(eth_dev);
unsigned char *enetaddr = plat->enetaddr;
- int eth_index = eth_dev->seq;
+ int eth_index = dev_seq(eth_dev);
#else
unsigned char *enetaddr = eth_dev->enetaddr;
int eth_index = eth_dev->index;
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index efe8251e92..0196462beb 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -502,7 +502,7 @@ static int mcdmafec_probe(struct udevice *dev)
int retval;
const u32 *val;
- info->index = dev->seq;
+ info->index = dev_seq(dev);
info->iobase = pdata->iobase;
info->miibase = pdata->iobase;
info->phy_addr = -1;
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 3931d2cca9..69e299d6a3 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -171,7 +171,7 @@ static int ftgmac100_mdio_init(struct udevice *dev)
bus->write = ftgmac100_mdio_write;
bus->priv = priv;
- ret = mdio_register_seq(bus, dev->seq);
+ ret = mdio_register_seq(bus, dev_seq(dev));
if (ret) {
free(bus);
return ret;
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index dab2f6088d..aa79d6eda8 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -528,7 +528,7 @@ static int higmac_probe(struct udevice *dev)
bus->priv = priv;
priv->bus = bus;
- ret = mdio_register_seq(bus, dev->seq);
+ ret = mdio_register_seq(bus, dev_seq(dev));
if (ret)
return ret;
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index b1ddde48ba..4fa71360cf 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -524,7 +524,7 @@ static int mcffec_probe(struct udevice *dev)
int retval, fec_idx;
const u32 *val;
- info->index = dev->seq;
+ info->index = dev_seq(dev);
info->iobase = pdata->iobase;
info->phy_addr = -1;
diff --git a/drivers/net/octeontx/nicvf_main.c b/drivers/net/octeontx/nicvf_main.c
index 750629a86c..c30ba49c27 100644
--- a/drivers/net/octeontx/nicvf_main.c
+++ b/drivers/net/octeontx/nicvf_main.c
@@ -452,11 +452,12 @@ int nicvf_write_hwaddr(struct udevice *dev)
* u-boot framework updates MAC to random address.
* Use this hook to update mac address in environment.
*/
- if (!eth_env_get_enetaddr_by_index("eth", dev->seq, ethaddr)) {
- eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
+ if (!eth_env_get_enetaddr_by_index("eth", dev_seq(dev), ethaddr)) {
+ eth_env_set_enetaddr_by_index("eth", dev_seq(dev),
+ pdata->enetaddr);
debug("%s: pMAC %pM\n", __func__, pdata->enetaddr);
}
- eth_env_get_enetaddr_by_index("eth", dev->seq, ethaddr);
+ eth_env_get_enetaddr_by_index("eth", dev_seq(dev), ethaddr);
if (memcmp(ethaddr, pdata->enetaddr, ARP_HLEN)) {
debug("%s: pMAC %pM\n", __func__, pdata->enetaddr);
nicvf_hw_set_mac_addr(nic, dev);
@@ -540,7 +541,7 @@ int nicvf_initialize(struct udevice *dev)
if (is_valid_ethaddr(ethaddr)) {
memcpy(pdata->enetaddr, ethaddr, ARP_HLEN);
- eth_env_set_enetaddr_by_index("eth", dev->seq, ethaddr);
+ eth_env_set_enetaddr_by_index("eth", dev_seq(dev), ethaddr);
}
debug("%s enetaddr %pM ethaddr %pM\n", __func__,
pdata->enetaddr, ethaddr);
diff --git a/drivers/net/octeontx/smi.c b/drivers/net/octeontx/smi.c
index 8e2c3ca5a3..d4baddb7ef 100644
--- a/drivers/net/octeontx/smi.c
+++ b/drivers/net/octeontx/smi.c
@@ -335,7 +335,7 @@ int octeontx_smi_probe(struct udevice *dev)
priv = malloc(sizeof(*priv));
if (!bus || !priv) {
printf("Failed to allocate OcteonTX MDIO bus # %u\n",
- dev->seq);
+ dev_seq(dev));
return -1;
}
diff --git a/drivers/net/octeontx2/nix.c b/drivers/net/octeontx2/nix.c
index 9649b39bbf..039c44b654 100644
--- a/drivers/net/octeontx2/nix.c
+++ b/drivers/net/octeontx2/nix.c
@@ -736,7 +736,7 @@ int nix_lf_setup_mac(struct udevice *dev)
*/
if (memcmp(nix->lmac->mac_addr, pdata->enetaddr, ARP_HLEN)) {
memcpy(nix->lmac->mac_addr, pdata->enetaddr, 6);
- eth_env_set_enetaddr_by_index("eth", rvu->dev->seq,
+ eth_env_set_enetaddr_by_index("eth", dev_seq(rvu->dev),
pdata->enetaddr);
cgx_lmac_mac_filter_setup(nix->lmac);
/* Update user given MAC address to ATF for update
diff --git a/drivers/net/octeontx2/rvu_pf.c b/drivers/net/octeontx2/rvu_pf.c
index d74a196eb6..4b00178989 100644
--- a/drivers/net/octeontx2/rvu_pf.c
+++ b/drivers/net/octeontx2/rvu_pf.c
@@ -34,7 +34,7 @@ int rvu_pf_init(struct rvu_pf *rvu)
/* to make post_probe happy */
if (is_valid_ethaddr(nix->lmac->mac_addr)) {
memcpy(pdata->enetaddr, nix->lmac->mac_addr, 6);
- eth_env_set_enetaddr_by_index("eth", rvu->dev->seq,
+ eth_env_set_enetaddr_by_index("eth", dev_seq(rvu->dev),
pdata->enetaddr);
}
@@ -59,7 +59,7 @@ int rvu_pf_probe(struct udevice *dev)
debug("%s: name: %s\n", __func__, dev->name);
rvu->pf_base = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_2, PCI_REGION_MEM);
- rvu->pfid = dev->seq + 1; // RVU PF's start from 1;
+ rvu->pfid = dev_seq(dev) + 1; // RVU PF's start from 1;
rvu->dev = dev;
if (!rvu_af_dev) {
printf("%s: Error: Could not find RVU AF device\n",
@@ -80,7 +80,7 @@ int rvu_pf_probe(struct udevice *dev)
* modify device name to include index/sequence number,
* for better readability, this is 1:1 mapping with eth0/1/2.. names.
*/
- sprintf(name, "rvu_pf#%d", dev->seq);
+ sprintf(name, "rvu_pf#%d", dev_seq(dev));
device_set_name(dev, name);
debug("%s: name: %s\n", __func__, dev->name);
return err;
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 55d6e348de..343ab69d19 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -697,7 +697,7 @@ static int axi_emac_probe(struct udevice *dev)
priv->bus->write = axiemac_miiphy_write;
priv->bus->priv = priv;
- ret = mdio_register_seq(priv->bus, dev->seq);
+ ret = mdio_register_seq(priv->bus, dev_seq(dev));
if (ret)
return ret;
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index cc2a746f76..5c76887519 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -568,7 +568,7 @@ static int emaclite_probe(struct udevice *dev)
emaclite->bus->write = emaclite_miiphy_write;
emaclite->bus->priv = emaclite;
- ret = mdio_register_seq(emaclite->bus, dev->seq);
+ ret = mdio_register_seq(emaclite->bus, dev_seq(dev));
if (ret)
return ret;
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 244974cedf..5cb02bb3a7 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -705,7 +705,7 @@ static int zynq_gem_probe(struct udevice *dev)
priv->bus->write = zynq_gem_miiphy_write;
priv->bus->priv = priv;
- ret = mdio_register_seq(priv->bus, dev->seq);
+ ret = mdio_register_seq(priv->bus, dev_seq(dev));
if (ret)
goto err2;