diff options
author | Peng Fan <peng.fan@nxp.com> | 2018-03-28 20:54:13 +0800 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2018-04-13 15:47:38 -0500 |
commit | 8b203863560465f4dde981ecaa876e256e211017 (patch) | |
tree | 68220bbcba388db706edf3a0ee28fd1c6b05d81b /drivers | |
parent | 1bcabd79215ece91ee8f79e768c4886efae182ba (diff) | |
download | u-boot-8b203863560465f4dde981ecaa876e256e211017.tar.gz u-boot-8b203863560465f4dde981ecaa876e256e211017.tar.xz u-boot-8b203863560465f4dde981ecaa876e256e211017.zip |
net: fec: set dev->seq to priv->dev_id
To platforms has two enet interface, using dev->seq could
avoid conflict.
i.MX6UL/ULL evk board net get the wrong MAC address from fuse,
eth1 get MAC0 address, eth0 get MAC1 address from fuse. Set the
priv->dev_id to device->seq as the real net interface alias id then
.fec_get_hwaddr() read the related MAC address from fuse.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fec_mxc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 74d36f479e..1f752d75c7 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1251,7 +1251,6 @@ static int fecmxc_probe(struct udevice *dev) struct eth_pdata *pdata = dev_get_platdata(dev); struct fec_priv *priv = dev_get_priv(dev); struct mii_dev *bus = NULL; - int dev_id = -1; uint32_t start; int ret; @@ -1272,9 +1271,9 @@ static int fecmxc_probe(struct udevice *dev) } fec_reg_setup(priv); - priv->dev_id = (dev_id == -1) ? 0 : dev_id; - bus = fec_get_miibus((ulong)priv->eth, dev_id); + priv->dev_id = dev->seq; + bus = fec_get_miibus((ulong)priv->eth, dev->seq); if (!bus) { ret = -ENOMEM; goto err_mii; |