summaryrefslogtreecommitdiff
path: root/drivers/net/designware.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-06-15 18:40:19 +0800
committerTom Rini <trini@konsulko.com>2015-07-08 13:43:19 -0400
commitf3edfd30541d6f245d7dfa6fa7354cc916cc53e1 (patch)
treed3404c04dbba0803c27f779de9d5677169c5f40d /drivers/net/designware.c
parent8fa2e20913183133998cbbb78a5184bd20ccfcbe (diff)
downloadu-boot-imx-f3edfd30541d6f245d7dfa6fa7354cc916cc53e1.zip
u-boot-imx-f3edfd30541d6f245d7dfa6fa7354cc916cc53e1.tar.gz
u-boot-imx-f3edfd30541d6f245d7dfa6fa7354cc916cc53e1.tar.bz2
net: designware: Program MAC address to hardware after soft reset
commit f566c99 "net: Update hardware MAC address if it changes in env" removes writing MAC address to designware controller after soft reset. This makes designware ethernet port fail to work. Actually the MAC address should always be programmed after soft reset. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/designware.c')
-rw-r--r--drivers/net/designware.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index ae51cf3..645ca64 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -243,6 +243,12 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
mdelay(100);
};
+ /*
+ * Soft reset above clears HW address registers.
+ * So we have to set it here once again.
+ */
+ _dw_write_hwaddr(priv, enetaddr);
+
rx_descs_init(priv);
tx_descs_init(priv);