From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v2] tg3: optionally get mac address from devicetree Date: Thu, 15 Nov 2018 21:00:18 +0100 Message-ID: <20181115200018.GC32274@lunn.ch> References: <20181114135202.27104-1-TheSven73@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svendev@arcx.com, siva.kallam@broadcom.com, prashant@broadcom.com, mchan@broadcom.com, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, arnd@arndb.de To: thesven73@gmail.com Return-path: Content-Disposition: inline In-Reply-To: <20181114135202.27104-1-TheSven73@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 Reviewed-by: Andrew Lunn Andrew