From patchwork Mon May 15 08:02:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 762443 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 3wRJZm4mq7z9s4q for ; Mon, 15 May 2017 21:41:52 +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="fml9ulU5"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 6ED93C2212C; Mon, 15 May 2017 11:38:57 +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 2DBDDC221F2; Mon, 15 May 2017 11:13:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 30B01C21C33; Mon, 15 May 2017 08:03:20 +0000 (UTC) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [62.251.20.244]) by lists.denx.de (Postfix) with ESMTPS id D4943C21C7F for ; Mon, 15 May 2017 08:03:19 +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 30C6EC0AB5; Mon, 15 May 2017 10:03:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1494835399; bh=KpI+HioAudNapnitiPBE5AjdOnr7Kr4PidABa7uxy1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fml9ulU5vid9kz7gTPiD+Xu+9egDtZEEQsnU5moqvM9SuoVXb+sk+EJ10B/9+50Df vmDXx7SsrzjXXwaJXNUdX3n8PYXPYWS8NaVPsS1f8DiJ4+6KPjriNfvfBu2MvD60u+ T9Kq9EiG5xu61ufQZccdjLTX4dYDVUiFrw/DUD04= 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:38 +0200 Message-Id: <20170515080244.21345-23-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 22/28] net: sun4i_mac: 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 sun4i_mac 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/sun4i_mac.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 #include +#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)