From patchwork Mon May 15 08:02:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 762461 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wRJnB5xbvz9s4q for ; Mon, 15 May 2017 21:50:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=schinagl.nl header.i=@schinagl.nl header.b="sTjcrvX7"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id D1DC3C221B6; Mon, 15 May 2017 11:40:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BBAA6C2220D; Mon, 15 May 2017 11:13:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 36067C21C7F; Mon, 15 May 2017 08:03:25 +0000 (UTC) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [62.251.20.244]) by lists.denx.de (Postfix) with ESMTPS id BF6DAC21C7F for ; Mon, 15 May 2017 08:03:24 +0000 (UTC) Received: from um-mbp-306.cloud.ultimaker.com (static-98-101-100-159.thenetworkfactory.nl [159.100.101.98]) by 7of9.schinagl.nl (Postfix) with ESMTPA id AB0C9C0ACF; Mon, 15 May 2017 10:03:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1494835402; bh=6Aodrg0zEzxu1w+tDx3Rec245v5T22MlZH8LsaVRFSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sTjcrvX7J0bznCa7FkwFG74yekVQuixvOzltOj/r2NllijLgduSfbnZqIRQuvce0K bkGqfvjKONaP6Cr1Fu85om1t7LwXs22R2HxunsDZviiWDX68b6TvsMJtA/Qr00MXY6 3xnsuLHU3m9tze/mbq1t2Zl4TWoK8G2lRUGuU/fg= From: Olliver Schinagl To: Jagan Teki , Maxime Ripard , Hans de Goede , Simon Glass , Iain Paton , FUKAUMI Naoki , Olliver Schinagl , Marcus Cooper , Ian Campbell , Chen-Yu Tsai , Jelle de Jong , Adam Sampson , Stefan Roese , Phil Han , Joe Hershberger Date: Mon, 15 May 2017 10:02:42 +0200 Message-Id: <20170515080244.21345-27-oliver@schinagl.nl> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170515080244.21345-1-oliver@schinagl.nl> References: <20170515080244.21345-1-oliver@schinagl.nl> X-Mailman-Approved-At: Mon, 15 May 2017 11:12:27 +0000 Cc: oliver+list@schinagl.nl, Jernej Skrabec , Mugunthan V N , dev@linux-sunxi.org, Andre Przywara , Icenowy Zheng , u-boot@lists.denx.de Subject: [U-Boot] [PATCHv6 26/28] net: sun8i_gmac: Add read_rom_hwaddr hook X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With this patch sun8i_emac can now get the MAC address from the board in a predetermined board specific manner. Signed-off-by: Olliver Schinagl --- drivers/net/Makefile | 2 +- drivers/net/sun8i_emac.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 5df5567536..8464062d83 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -24,7 +24,7 @@ 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) += sunxi_common.o sun7i_mac.o -obj-$(CONFIG_SUN8I_EMAC) += sun8i_emac.o +obj-$(CONFIG_SUN8I_EMAC) += sunxi_common.o sun8i_emac.o obj-$(CONFIG_ENC28J60) += enc28j60.o obj-$(CONFIG_EP93XX) += ep93xx_eth.o obj-$(CONFIG_ETHOC) += ethoc.o diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index a3dbe2823b..5093f9c83d 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -25,6 +25,8 @@ #include #endif +#include "sunxi_common.h" + #define MDIO_CMD_MII_BUSY BIT(0) #define MDIO_CMD_MII_WRITE BIT(1) @@ -757,6 +759,7 @@ static int sun8i_emac_eth_probe(struct udevice *dev) static const struct eth_ops sun8i_emac_eth_ops = { .start = sun8i_emac_eth_start, .write_hwaddr = sun8i_eth_write_hwaddr, + .read_rom_hwaddr = sunxi_mac_read_rom_hwaddr, .send = sun8i_emac_eth_send, .recv = sun8i_emac_eth_recv, .free_pkt = sun8i_eth_free_pkt,