[U-Boot] [PATCHv6 25/28] net: sun7i_mac: Add read_rom_hwaddr hook

Olliver Schinagl oliver at schinagl.nl
Mon May 15 08:02:41 UTC 2017


With this patch sun7i_mac can now get the MAC address from the board in
a predetermined board specific manner.

Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 drivers/net/Makefile    | 2 +-
 drivers/net/sun7i_mac.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 86dee7d746..5df5567536 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -23,7 +23,7 @@ obj-$(CONFIG_E1000) += e1000.o
 obj-$(CONFIG_E1000_SPI) += e1000_spi.o
 obj-$(CONFIG_EEPRO100) += eepro100.o
 obj-$(CONFIG_SUN4I_EMAC) += sunxi_common.o sun4i_mac.o
-obj-$(CONFIG_SUN7I_MAC) += sun7i_mac.o
+obj-$(CONFIG_SUN7I_MAC) += sunxi_common.o sun7i_mac.o
 obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o
 obj-$(CONFIG_ENC28J60) += enc28j60.o
 obj-$(CONFIG_EP93XX) += ep93xx_eth.o
diff --git a/drivers/net/sun7i_mac.c b/drivers/net/sun7i_mac.c
index f8c6a58c08..b10a6ec03a 100644
--- a/drivers/net/sun7i_mac.c
+++ b/drivers/net/sun7i_mac.c
@@ -15,6 +15,7 @@
 #include <net.h>
 
 #include "designware.h"
+#include "sunxi_common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -102,6 +103,7 @@ const struct eth_ops sun7i_mac_eth_ops = {
 	.free_pkt		= designware_eth_free_pkt,
 	.stop			= designware_eth_stop,
 	.write_hwaddr		= designware_eth_write_hwaddr,
+	.read_rom_hwaddr	= sunxi_mac_read_rom_hwaddr,
 };
 
 static const struct udevice_id sun7i_mac_eth_ids[] = {
-- 
2.11.0



More information about the U-Boot mailing list