From: Tom Rini Date: Wed, 28 Oct 2015 21:50:33 -0400 Subject: [U-Boot] [PATCH] fdt: Rewrite the logic in fdt_fixup_ethernet() In-Reply-To: References: <1445962239-14213-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <20151029015033.GN23893@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Oct 29, 2015 at 09:40:43AM +0800, Bin Meng wrote: > Hi Joe, > > On Thu, Oct 29, 2015 at 4:52 AM, Joe Hershberger > wrote: > > Hi Bin, > > > > On Tue, Oct 27, 2015 at 11:10 AM, Bin Meng 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 > > > > Acked-by: Joe Hershberger > > Thanks! Do you have any comments regarding to "usbethaddr" env that I > raised here [1]? I originally wanted to remove "usbethaddr" handling > completely in fdt_fixup_ethernet(), but did not do that when I > submitted this patch. I need to think about that post still, sorry, but we can't remove it, it would break various systems that have on-board USB eth (pandaboard, others). -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: