[U-Boot] [PATCH v3 2/2] fdt: Rewrite the logic in fdt_fixup_ethernet()
Joe Hershberger
joe.hershberger at gmail.com
Tue Dec 22 18:59:31 CET 2015
Hi Bin,
On Tue, Nov 3, 2015 at 6:24 AM, Bin Meng <bmeng.cn at gmail.com> wrote:
> Currently in fdt_fixup_ethernet() the MAC address fix up is
> handled in a loop of which the exit condition is to test the
> "eth%daddr" env is not NULL. However this creates unnecessary
> constrains that those "eth%daddr" env variables must be
> sequential even if "ethernet%d" does not start from 0 in the
> "/aliases" node. For example, with "/aliases" node below:
>
> aliases {
> ethernet3 = &enet3;
> ethernet4 = &enet4;
> };
>
> "ethaddr", "eth1addr", "eth2addr" must exist in order to fix
> up ethernet3's MAC address successfully.
>
> Now we change the loop logic to iterate the properties in the
> "/aliases" node. For each property, test if it is in a format
> of "ethernet%d", then get its MAC address from corresponding
> "eth%daddr" env and fix it up in the dtb.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> Acked-by: Joe Hershberger <joe.hershberger at ni.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> On OMAP4 Panda (+v4.3 kernel)
> Tested-by: Tom Rini <trini at konsulko.com>
Applied to u-boot-net/master, thanks!
-Joe
More information about the U-Boot
mailing list