From: Joe Hershberger Date: Mon, 19 Mar 2012 23:18:26 +0000 (-0500) Subject: Xilinx: ARM: net: Program the MAC address to hardware on boot X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b6c84379bd3888a2ebdcf0e52640427df0e901e;p=thirdparty%2Fu-boot.git Xilinx: ARM: net: Program the MAC address to hardware on boot This will allow Linux to not make up a new MAC on each boot and never keep the same IP address from boot to boot. Signed-off-by: Joe Hershberger --- diff --git a/board/xilinx/dfe/xgmac.c b/board/xilinx/dfe/xgmac.c index d64c4a82c3c..e8453c4348b 100644 --- a/board/xilinx/dfe/xgmac.c +++ b/board/xilinx/dfe/xgmac.c @@ -490,6 +490,14 @@ int Xgmac_rx(struct eth_device *dev) return 1; } +static int Xgmac_write_hwaddr(struct eth_device *dev) +{ + /* Initialize the first MAC filter with our address */ + XEmacPss_SetMacAddress((XEmacPss *)dev->priv, dev->enetaddr, 1); + + return 0; +} + int Xgmac_register(bd_t * bis) { struct eth_device *dev; @@ -510,6 +518,7 @@ int Xgmac_register(bd_t * bis) dev->halt = Xgmac_halt; dev->send = Xgmac_send; dev->recv = Xgmac_rx; + dev->write_hwaddr = Xgmac_write_hwaddr; eth_register(dev);