From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 25 Apr 2019 15:22:37 +0200 Subject: [U-Boot] [PATCH v2 2/2] net: eth-uclass: Support device tree MAC addresses In-Reply-To: References: <20190416162417.25799-1-thierry.reding@gmail.com> <20190416162417.25799-2-thierry.reding@gmail.com> <04f1019d-f386-9a3f-a78e-93996fd2cdba@ti.com> <20190417150341.GE26626@ulmo> Message-ID: <20190425132237.GB10218@ulmo> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Apr 17, 2019 at 09:32:26PM -0700, Simon Glass wrote: > Hi Thierry, > > On Wed, 17 Apr 2019 at 08:03, Thierry Reding > wrote: > > > On Wed, Apr 17, 2019 at 02:49:22PM +0300, Grygorii Strashko wrote: > > > > > > > > > On 16.04.19 19:24, Thierry Reding wrote: > > > > From: Thierry Reding > > > > > > > > Add the standard Ethernet device tree bindings (imported from v5.0 of > > > > the Linux kernel) and implement support for reading the MAC address for > > > > Ethernet devices in the Ethernet uclass. If the "mac-address" property > > > > exists, the MAC address will be parsed from that. If that property does > > > > not exist, the "local-mac-address" property will be tried as fallback. > > > > > > > > MAC addresses from device tree take precedence over the ones stored in > > > > a network interface card's ROM. > > > > > > > > Acked-by: Joe Hershberger > > > > Signed-off-by: Thierry Reding > > > > --- > > > > Changes in v2: > > > > - use dev_read_u8_array_ptr() > > > > It would be good to have test cases for these. By "these", do you mean the eth_dev_get_mac_address() function that this patche introduces, or the dev_read_u8_array_ptr() function? For the former, that'd be a little difficult because it is not a public API, it's only called from the eth-uclass.c code. Thierry > > > > > > > > .../devicetree/bindings/net/ethernet.txt | 66 +++++++++++++++++++ > > > > net/eth-uclass.c | 26 +++++++- > > > > 2 files changed, 89 insertions(+), 3 deletions(-) > > > > create mode 100644 Documentation/devicetree/bindings/net/ethernet.txt > > > > Regards, > Simon -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: