All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olliver Schinagl <oliver@schinagl.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv6 22/28] net: sun4i_mac: Add read_rom_hwaddr hook
Date: Mon, 15 May 2017 10:02:38 +0200	[thread overview]
Message-ID: <20170515080244.21345-23-oliver@schinagl.nl> (raw)
In-Reply-To: <20170515080244.21345-1-oliver@schinagl.nl>

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(-)

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)
-- 
2.11.0

  parent reply	other threads:[~2017-05-15  8:02 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15  8:02 [U-Boot] [PATCHv6 00/28] Retrieve MAC address from EEPROM Olliver Schinagl
2017-05-15  8:02 ` [U-Boot] [PATCHv6 01/28] ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc Olliver Schinagl
2017-05-15  8:02 ` [U-Boot] [PATCHv6 02/28] sun7i: Add support for Olimex A20-OLinuXino-LIME2-eMMC Olliver Schinagl
2017-05-15  8:02 ` [U-Boot] [PATCHv6 03/28] net: core: Add PHY_GIGE as a Kconfig symbol Olliver Schinagl
2017-05-15 12:47   ` Tom Rini
2017-05-30 20:45   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 04/28] net: sunxi simplify defconfig Olliver Schinagl
2017-05-15  8:14   ` Maxime Ripard
2017-05-30 20:58   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 05/28] net: sunxi: Re-add RTL8211X_PHY_FORCE_MASTER Olliver Schinagl
2017-05-30 20:59   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 06/28] net: sunxi: Restore sunxi_[eg]mac behavior Olliver Schinagl
2017-05-30 21:04   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 07/28] net: sunxi: Move GMAC_TX_DELAY to the driver Olliver Schinagl
2017-05-30 21:06   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 08/28] net: cosmetic: Do not use magic values for ARP_HLEN Olliver Schinagl
2017-05-15 12:47   ` Tom Rini
2017-05-30 21:06   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 09/28] net: core: Sanitize get/set operations for enetaddr Olliver Schinagl
2017-05-15 12:52   ` Tom Rini
2017-05-30 21:07   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 10/28] net: core: Inform the user of the device MAC address Olliver Schinagl
2017-05-30 21:08   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 11/28] net: core: Add MAC address helper functions Olliver Schinagl
2017-05-15 12:54   ` Tom Rini
2017-05-30 21:09   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 12/28] net: Add ability to set MAC address via EEPROM Olliver Schinagl
2017-05-15  8:18   ` Maxime Ripard
2017-05-15 12:18     ` Olliver Schinagl
2017-05-16 12:15       ` Maxime Ripard
2017-05-17  1:38   ` Simon Glass
2017-12-04 23:51   ` [U-Boot] [linux-sunxi] " Jonathan Liu
2017-05-15  8:02 ` [U-Boot] [PATCHv6 13/28] net: core: print the source of the MAC address Olliver Schinagl
2017-05-30 21:11   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 14/28] net: cosmetic: A MAC address is not limited to SROM Olliver Schinagl
2017-05-15 12:53   ` Tom Rini
2017-05-15 13:23     ` Olliver Schinagl
2017-05-30 21:12     ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 15/28] net: core: Check return value of read_rom_hwaddr Olliver Schinagl
2017-05-15 12:49   ` Tom Rini
2017-05-30 21:13   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 16/28] fdt: fixup_eth: Remove code duplication with a function Olliver Schinagl
2017-05-30 21:14   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 17/28] fdt: fixup_eth: improve error catching/reduce identation Olliver Schinagl
2017-05-30 21:15   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 18/28] arm: sunxi: Expose function to generate sunxi-specific a MAC address Olliver Schinagl
2017-05-30 21:19   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 19/28] net: sunxi_emac: Write HW address via net_ops hook Olliver Schinagl
2017-05-30 21:20   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 20/28] net: sunxi: Rename sunxi_emac to a more specific sun4i_mac Olliver Schinagl
2017-05-15  8:20   ` Maxime Ripard
2017-05-15  8:02 ` [U-Boot] [PATCHv6 21/28] net: sunxi: Have sunxi common functions together Olliver Schinagl
2017-05-30 21:22   ` Joe Hershberger
2017-05-30 21:24   ` Joe Hershberger
2017-05-15  8:02 ` Olliver Schinagl [this message]
2017-05-30 21:26   ` [U-Boot] [PATCHv6 22/28] net: sun4i_mac: Add read_rom_hwaddr hook Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 23/28] net: sun7i_mac: Make the sun7i a dw driver subclass Olliver Schinagl
2017-05-15  8:22   ` Maxime Ripard
2017-05-15  8:02 ` [U-Boot] [PATCHv6 24/28] net: dw: Expose designware_eth_start Olliver Schinagl
2017-05-17  1:38   ` Simon Glass
2017-05-30 19:36   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 25/28] net: sun7i_mac: Add read_rom_hwaddr hook Olliver Schinagl
2017-05-15  8:22   ` Maxime Ripard
2017-05-15 12:20     ` Olliver Schinagl
2017-05-16 12:17       ` Maxime Ripard
2017-05-15  8:02 ` [U-Boot] [PATCHv6 26/28] net: sun8i_gmac: " Olliver Schinagl
2017-05-15  8:02 ` [U-Boot] [PATCHv6 27/28] net: sun8i: fix whitespace Olliver Schinagl
2017-05-30 21:30   ` Joe Hershberger
2017-05-15  8:02 ` [U-Boot] [PATCHv6 28/28] net: sunxi: Enable eeprom on OLinuXino Lime boards (again) Olliver Schinagl
2017-05-30 21:30   ` Joe Hershberger
2017-05-15  8:09 ` [U-Boot] [PATCHv6 00/28] Retrieve MAC address from EEPROM Olliver Schinagl
2017-05-15 12:47   ` Tom Rini
2017-08-11 11:35     ` Jagan Teki
2017-08-11 12:17 ` [U-Boot] [linux-sunxi] " Vincent Legoll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170515080244.21345-23-oliver@schinagl.nl \
    --to=oliver@schinagl.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.