From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 14 Dec 2013 21:57:15 +0100 Subject: [U-Boot] [PATCH 2/4] arm: pxa: always init ethaddr for LP-8x4x In-Reply-To: <1387054428.13062.2.camel@host5.omatika.ru> References: <1386999720-23460-1-git-send-email-ynvich@gmail.com> <201312141812.14595.marex@denx.de> <1387054428.13062.2.camel@host5.omatika.ru> Message-ID: <201312142157.15610.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, December 14, 2013 at 09:53:48 PM, Sergei Ianovich wrote: > On Sat, 2013-12-14 at 18:12 +0100, Marek Vasut wrote: > > On Saturday, December 14, 2013 at 04:39:00 PM, Sergei Ianovich wrote: > > > I strongly believe the current way is easier. > > > > I disagree :) > > > > IF you set 'ethaddr' variable in U-Boot THEN > > > > U-Boot will patch this 'ethaddr' value into your DT. The > > /aliases/ethernet0 node will be augmented with a new property > > 'local-mac-address', which will contain the MAC address from 'ethaddr' > > . The kernel will use this as the MAC address for that particular > > ethernet interface afterwards. > > > > NOTE: It is very important to have the alias set, it has to point to your > > ethernet device. A good example in Linux's arch/arm/boot/dts/imx28.dtsi, > > which even has two ethernet interfaces. Notice each of them has an > > alias. NOTE: If you have two interfaces, then 'eth1addr' is patches into > > /aliases/ethernet1 etc. > > Thanks for explaining. It works. This is COOL! Glad it helps :) > > The only problem here is the non-DT kernel. Do you need to support that? > > Is there no other way to pass MAC address of an ethernet interface to > > Linux but programming it into the ethernet interface itself ? > > Hardware vendor uses U-Boot environment values to init MAC-addresses. I > think it is even worse than what I was doing in the patch. > > I don't think we need to support non-DT kernel. So we drop the > patch. OK, that's nice :) Best regards, Marek Vasut