diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2017-05-12 15:58:56 +0800 |
---|---|---|
committer | Fugang Duan <fugang.duan@nxp.com> | 2017-05-12 16:09:00 +0800 |
commit | 530a9418ddbd1a4a3ca664fe911e630026e32dfb (patch) | |
tree | f850694e90bf65430713b20fa1491bbb64352da2 /drivers | |
parent | 3635582cf81fd59f71b714c37a50abce56973ef2 (diff) | |
download | u-boot-imx-530a9418ddbd1a4a3ca664fe911e630026e32dfb.zip u-boot-imx-530a9418ddbd1a4a3ca664fe911e630026e32dfb.tar.gz u-boot-imx-530a9418ddbd1a4a3ca664fe911e630026e32dfb.tar.bz2 |
MLK-14772 net: fec: set the device->seq id to priv->dev_id
i.MX6UL/ULL evk board net get the wrong MAC address from fuse, exp,
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: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fec_mxc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index b626a6b..76ff93d 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1228,7 +1228,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; - static int dev_id = 0; uint32_t start; int ret; @@ -1243,9 +1242,9 @@ static int fecmxc_probe(struct udevice *dev) return ret; #ifdef CONFIG_FEC_MXC_MDIO_BASE - bus = fec_get_miibus((uint32_t)CONFIG_FEC_MXC_MDIO_BASE, dev_id); + bus = fec_get_miibus((uint32_t)CONFIG_FEC_MXC_MDIO_BASE, dev->seq); #else - bus = fec_get_miibus((uint32_t)priv->eth, dev_id); + bus = fec_get_miibus((uint32_t)priv->eth, dev->seq); #endif if (!bus) goto err_mii; @@ -1270,8 +1269,7 @@ static int fecmxc_probe(struct udevice *dev) } fec_reg_setup(priv); - priv->dev_id = (dev_id == -1) ? 0 : dev_id; - dev_id++; + priv->dev_id = dev->seq; return 0; |