[U-Boot] [PATCH] net: designware: Program MAC address to hardware after soft reset

Bin Meng bmeng.cn at gmail.com
Mon Jun 15 12:40:19 CEST 2015


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 at gmail.com>
---

 drivers/net/designware.c | 6 ++++++
 1 file changed, 6 insertions(+)

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);
 
-- 
1.8.2.1



More information about the U-Boot mailing list