[U-Boot] [PATCH v2 2/2] net: eth-uclass: Support device tree MAC addresses
Thierry Reding
thierry.reding at gmail.com
Thu Apr 25 13:22:37 UTC 2019
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 <thierry.reding at gmail.com>
> 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 <treding at nvidia.com>
> > > >
> > > > 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 <joe.hershberger at ni.com>
> > > > Signed-off-by: Thierry Reding <treding at nvidia.com>
> > > > ---
> > > > 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: <http://lists.denx.de/pipermail/u-boot/attachments/20190425/ee3ab4d0/attachment.sig>
More information about the U-Boot
mailing list