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

Maxime Ripard maxime.ripard at free-electrons.com
Tue May 16 12:17:01 UTC 2017


On Mon, May 15, 2017 at 02:20:25PM +0200, Olliver Schinagl wrote:
> Hey Maxime,
> 
> On 15-05-17 10:22, Maxime Ripard wrote:
> > On Mon, May 15, 2017 at 10:02:41AM +0200, Olliver Schinagl wrote:
> > > 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
> > 
> > Shouldn't that be turned in a Kconfig option selected by both drivers?
> What do you mean? There are some common functions that all of them share,
> such as reading the MAC address.
> 
> Or do you mean we should make the net_op rom_read_hwaddr() a configurable
> Kconfig?

I meant having a KConfig symbol to compile sunxi_common, and then have
that symbol selected by the three EMAC/GMAC Kconfig symbol.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170516/35507f52/attachment.sig>


More information about the U-Boot mailing list