summaryrefslogtreecommitdiff
path: root/drivers/net/fec_mxc.c
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2011-12-20 05:46:31 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-01-16 08:40:09 +0100
commitbe252b654a018cd9f513b0f2a5da4855a209c40c (patch)
treed9314c6c7e5bc9e0c426f0996abc3cb2578d2d16 /drivers/net/fec_mxc.c
parent3c057897e9873fb95bfe6eae5e483d724670a288 (diff)
downloadu-boot-imx-be252b654a018cd9f513b0f2a5da4855a209c40c.zip
u-boot-imx-be252b654a018cd9f513b0f2a5da4855a209c40c.tar.gz
u-boot-imx-be252b654a018cd9f513b0f2a5da4855a209c40c.tar.bz2
net: imx: Add multi-FEC support for imx_get_mac_from_fuse
Add multi-FEC support for imx_get_mac_from_fuse by passing dev_id as a parameter. This feature is important on mx28 SoC for example that has two FEC ports. Cc: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/net/fec_mxc.c')
-rw-r--r--drivers/net/fec_mxc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 3affda8..ed73353 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -345,9 +345,10 @@ static void fec_rbd_clean(int last, struct fec_bd *pRbd)
writew(0, &pRbd->data_length);
}
-static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
+static int fec_get_hwaddr(struct eth_device *dev, int dev_id,
+ unsigned char *mac)
{
- imx_get_mac_from_fuse(mac);
+ imx_get_mac_from_fuse(dev_id, mac);
return !is_valid_ether_addr(mac);
}
@@ -822,8 +823,8 @@ static int fec_probe(bd_t *bd, int dev_id, int phy_id, uint32_t base_addr)
eth_register(edev);
- if (fec_get_hwaddr(edev, ethaddr) == 0) {
- debug("got MAC address from fuse: %pM\n", ethaddr);
+ if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
+ debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
memcpy(edev->enetaddr, ethaddr, 6);
}