summaryrefslogtreecommitdiff
path: root/drivers/net/rtl8169.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-15 07:10:52 -0400
committerTom Rini <trini@konsulko.com>2019-05-15 07:10:52 -0400
commit1da6006679fe47e67736f04417eb9dcac944ed4c (patch)
tree68c73b6dd434ba1d089b6280b6bbc2376531eede /drivers/net/rtl8169.c
parent8b1d3d19be6918ed4488fb1157deabc6c6c42481 (diff)
parentebb97ea86878e56daadcc2d5d063ed59a10b5744 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-net
- micrel, ti PHY fixes - rtl8169, mtk-eth fixes
Diffstat (limited to 'drivers/net/rtl8169.c')
-rw-r--r--drivers/net/rtl8169.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index a78f3d233f..bc052e7256 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -257,6 +257,7 @@ static struct {
{"RTL-8168/8111g", 0x4c, 0xff7e1880,},
{"RTL-8101e", 0x34, 0xff7e1880,},
{"RTL-8100e", 0x32, 0xff7e1880,},
+ {"RTL-8168h/8111h", 0x54, 0xff7e1880,},
};
enum _DescStatusBit {
@@ -941,6 +942,23 @@ static void rtl_halt(struct eth_device *dev)
}
#endif
+#ifdef CONFIG_DM_ETH
+static int rtl8169_write_hwaddr(struct udevice *dev)
+{
+ struct eth_pdata *plat = dev_get_platdata(dev);
+ unsigned int i;
+
+ RTL_W8(Cfg9346, Cfg9346_Unlock);
+
+ for (i = 0; i < MAC_ADDR_LEN; i++)
+ RTL_W8(MAC0 + i, plat->enetaddr[i]);
+
+ RTL_W8(Cfg9346, Cfg9346_Lock);
+
+ return 0;
+}
+#endif
+
/**************************************************************************
INIT - Look for an adapter, this routine's visible to the outside
***************************************************************************/
@@ -1195,6 +1213,7 @@ static const struct eth_ops rtl8169_eth_ops = {
.send = rtl8169_eth_send,
.recv = rtl8169_eth_recv,
.stop = rtl8169_eth_stop,
+ .write_hwaddr = rtl8169_write_hwaddr,
};
static const struct udevice_id rtl8169_eth_ids[] = {