From: Wolfgang Denk Date: Mon, 11 May 2009 18:01:36 +0200 Subject: [U-Boot] [PATCH 1/4] net: extend the netdev to have a common way to set the hw mac address In-Reply-To: <20090511142454.GB1812@game.jcrosoft.org> References: <1242023969-13542-1-git-send-email-plagnioj@jcrosoft.com> <200905110348.27479.vapier@gentoo.org> <20090511120809.GA1812@game.jcrosoft.org> <20090511132616.7F27A832E416@gemini.denx.de> <20090511142454.GB1812@game.jcrosoft.org> Message-ID: <20090511160136.78912832E416@gemini.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 Dear Jean-Christophe PLAGNIOL-VILLARD, In message <20090511142454.GB1812@game.jcrosoft.org> you wrote: > > > > Unfortunatly we need it to set the enetaddr in the register of the soc evenif > > > there is no ethernet transfer as for the macb on at91 or the dm9000. > > > This how the kernel pass the mac address for the bootloader. > > > > You mean, this is how U-Boot is supposed to pass the MAC address to > > the Kernel, right? > > > > Well, strictly speaking this is (1) in direct violation of U-Boot's > > design principles which say NOT to initialize things it does not use > > itself, and (2) a bug in the Linux kernel that should be fixed there. > > > > In this case it may be just writing to a register without further > > initialization of the hardware, but if we allow for that you can bet > > that tomorrow someone will try and add code that requires more > > extensive initialization of the hardware for the same purpose, and he > > will argue that his code must go in because there is preexisting code > > that does the same. > this exactly what is done only write mac hw register > without init the eth stack > > before we do need to init the mac and detect the phy if we want to store > now we have to call the set_hw_enetaddr Yes, I perfectly understood this. You did not have to explain it again. Did you understand what I wrote, too? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Minds are like parachutes - they only function when open.