lkml.org 
[lkml]   [2018]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tg3: optionally get mac address from devicetree
On Wed, Nov 14, 2018 at 08:52:01AM -0500, thesven73@gmail.com wrote:
> If the tg3 has a device node, and that node contains a valid
> mac address property, use that as the tg3's mac address.
>
> This behaviour was previously only present on SPARC, using a
> conditional compile (#ifdef CONFIG_SPARC), presumably because
> at the time, devicetree nodes for pci devices only worked on
> SPARC. However, this has recently been made universal, see
> commit 98d9f30c820d ("pci/of: Match PCI devices to OF nodes dynamically")
>
> Devicetree example:
> (see Documentation/devicetree/bindings/pci/pci.txt)
>
> &pcie {
> host@0 {
> #address-cells = <3>;
> #size-cells = <2>;
> reg = <0 0 0 0 0>;
> bcm5778: bcm5778@0 {
> reg = <0 0 0 0 0>;
> mac-address = [CA 11 AB 1E 10 01];
> };
> };
> };
>
> Signed-off-by: Sven Van Asbroeck <svendev@arcx.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Andrew

\
 
 \ /
  Last update: 2018-11-15 21:00    [W:0.046 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site