net: eth: Fixup OF tree with registered MAC addresses too
The eth code registers an OF tree fixup that looks for any nodes in
the Linux oftree that match eth devices loaded in barebox and sets the
mac-address property in those nodes.  The purpose is to pass MAC
addresses to the Linux kernel for drivers that expect the MAC address
to be in the device tree.

If barebox does not have a driver for the network device, either
because it has been disabled or because one does not exist, then the
OF tree will not be fixed up to include a MAC address.

The eth code also has a list of MAC addresses which board code has
registered, usually done when it reads the address from an EEPROM or
on-chip memory.  If an eth device is created later in the boot, it
will look here for an address.

The registered MAC address list is not used for the OF tree fix up,
and this patch changes that.  This way barebox can place a MAC address
in the device-tree without needing a driver for the network device.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent cb32b33 commit a5c51acab4a9ec7f6cd0a4565e9f46fe579192bf
@Trent Piepho Trent Piepho authored on 21 Oct 2015
Sascha Hauer committed on 22 Oct 2015
Showing 1 changed file
View
net/eth.c