summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2017-01-18 16:04:10 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 14:04:37 +0800
commit34e343d7ebd5b7c8f53dc9e38c0a6eec04d05f8e (patch)
treed8aa68e03e0ee1fcd878f60959ce43916e5e0ee6 /drivers
parent836461a95ca8df0f41dacf1d390a966624190524 (diff)
downloadu-boot-imx-34e343d7ebd5b7c8f53dc9e38c0a6eec04d05f8e.zip
u-boot-imx-34e343d7ebd5b7c8f53dc9e38c0a6eec04d05f8e.tar.gz
u-boot-imx-34e343d7ebd5b7c8f53dc9e38c0a6eec04d05f8e.tar.bz2
MLK-13777 net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(), it should transfer fec->dev_id to get mac address from fuse. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> (cherry picked from commit 7e4a55b068311d46d16e86e697d36f34a59bf47a)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fec_mxc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 81e4e1c..93c0993 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1088,8 +1088,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
#endif
eth_register(edev);
- if (fec_get_hwaddr(dev_id, ethaddr) == 0) {
- debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
+ if (fec_get_hwaddr(fec->dev_id, ethaddr) == 0) {
+ debug("got MAC%d address from fuse: %pM\n", fec->dev_id, ethaddr);
memcpy(edev->enetaddr, ethaddr, 6);
if (!getenv("ethaddr"))
eth_setenv_enetaddr("ethaddr", ethaddr);