[U-Boot] [PATCH 12/14] fdt: eth_fixup: Add hook for board to override MAC

maxime.ripard at free-electrons.com maxime.ripard at free-electrons.com
Wed Nov 30 10:12:51 CET 2016


On Wed, Nov 30, 2016 at 09:00:51AM +0000, Marcel Ziswiler wrote:
> Hi Olliver
> 
> On Fri, 2016-11-25 at 16:30 +0100, Olliver Schinagl wrote:
> > This patch adds a method for the board to set the MAC address if the
> > environment is not yet set. The environment based MAC addresses are
> > not
> > touched, but if the fdt has an alias set, it is parsed and put into
> > the
> > environment.
> > 
> > E.g. The environment contains ethaddr and eth1addr, and the fdt
> > contains
> > an ethernet1 nothing happens. If the fdt contains ethernet2 however,
> > it
> > is parsed and inserted into the environment as eth2addr.
> 
> My humble understanding of device tree fixup is that it works the other
> way around (e.g. it is the device tree that usually gets fixed up). So
> the least I would advice for this patch is to change its naming but
> most possibly such code also does not belong into the common
> fdt_support implementation.

I don't really have the context of this patch, but in the DT at least,
you can specify the mac address using the local-mac-address
property. I guess we should honor that too. But I don't really know
how that's related to an alias. If the device is probed and the
property is there, use it, otherwise don't.

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/20161130/d2884d41/attachment.sig>


More information about the U-Boot mailing list