diff mbox

[U-Boot,PATCHv6,22/28] net: sun4i_mac: Add read_rom_hwaddr hook

Message ID 20170515080244.21345-23-oliver@schinagl.nl
State Changes Requested
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Olliver Schinagl May 15, 2017, 8:02 a.m. UTC
With this patch sun4i_mac can now get the MAC address from the board in
a predetermined board specific manner.

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

Comments

Joe Hershberger May 30, 2017, 9:26 p.m. UTC | #1
On Mon, May 15, 2017 at 3:02 AM, Olliver Schinagl <oliver@schinagl.nl> wrote:
> With this patch sun4i_mac can now get the MAC address from the board in
> a predetermined board specific manner.

I think this patch should be squashed into to one before it.

Thanks,
-Joe
diff mbox

Patch

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 9834d67146..594f54f714 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -22,7 +22,7 @@  obj-$(CONFIG_DNET) += dnet.o
 obj-$(CONFIG_E1000) += e1000.o
 obj-$(CONFIG_E1000_SPI) += e1000_spi.o
 obj-$(CONFIG_EEPRO100) += eepro100.o
-obj-$(CONFIG_SUN4I_EMAC) += sun4i_mac.o
+obj-$(CONFIG_SUN4I_EMAC) += sunxi_common.o sun4i_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/sun4i_mac.c b/drivers/net/sun4i_mac.c
index ea52bd8a17..06d7e63efc 100644
--- a/drivers/net/sun4i_mac.c
+++ b/drivers/net/sun4i_mac.c
@@ -17,6 +17,8 @@ 
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 
+#include "sunxi_common.h"
+
 /* EMAC register  */
 struct sun4i_mac_regs {
 	u32 ctl;	/* 0x00 */
@@ -586,6 +588,7 @@  static const struct eth_ops sun4i_mac_eth_ops = {
 	.recv			= sun4i_mac_eth_recv,
 	.stop			= sun4i_mac_eth_stop,
 	.write_hwaddr		= sun4i_mac_eth_write_hwaddr,
+	.read_rom_hwaddr	= sunxi_mac_read_rom_hwaddr,
 };
 
 static int sun4i_mac_eth_ofdata_to_platdata(struct udevice *dev)