aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLiu Hui-R64343 <r64343@freescale.com>2010-11-18 23:45:55 +0000
committerStefano Babic <sbabic@denx.de>2010-11-21 18:24:20 +0100
commit565e39c57769a45a5eaed5e4c86357e817cf64e1 (patch)
tree25d23788174cf199097d47052d3ae50b01b872aa /drivers/net
parenta676cca41d52a89d9e3841170880e1234ec45606 (diff)
downloadu-boot-midas-565e39c57769a45a5eaed5e4c86357e817cf64e1.tar.gz
u-boot-midas-565e39c57769a45a5eaed5e4c86357e817cf64e1.tar.bz2
u-boot-midas-565e39c57769a45a5eaed5e4c86357e817cf64e1.zip
imx: Get fec mac address from fuse
The patch is to support getting FEC MAC address from fuse bank. Signed-off-by: Jason Liu <r64343@freescale.com> Tested-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec_mxc.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index c17f9379bf..0d0f392d1e 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -312,21 +312,8 @@ static void fec_rbd_clean(int last, struct fec_bd *pRbd)
static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
{
-/*
- * The MX27 can store the mac address in internal eeprom
- * This mechanism is not supported now by MX51 or MX25
- */
-#if defined(CONFIG_MX51) || defined(CONFIG_MX25)
- return -1;
-#else
- struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
- int i;
-
- for (i = 0; i < 6; i++)
- mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
-
+ imx_get_mac_from_fuse(mac);
return !is_valid_ether_addr(mac);
-#endif
}
static int fec_set_hwaddr(struct eth_device *dev)
@@ -754,7 +741,7 @@ static int fec_probe(bd_t *bd)
eth_register(edev);
if (fec_get_hwaddr(edev, ethaddr) == 0) {
- printf("got MAC address from EEPROM: %pM\n", ethaddr);
+ printf("got MAC address from fuse: %pM\n", ethaddr);
memcpy(edev->enetaddr, ethaddr, 6);
}