[U-Boot] [PATCH] net, fec_mxc: use mac address stored in env before looking in eeprom
Wolfgang Denk
wd at denx.de
Thu Mar 25 10:40:01 CET 2010
Dear Heiko,
In message <4BAB0357.60309 at denx.de> you wrote:
>
> Ok, but this driver initialize in fec_probe() (which gets called
> through fecmxc_initialize() on uboot startup) always the fec mac
> address registers with eeprom mac address. So, if uboot not uses
The question to me is why fec_probe() is called at all, even in cases
where U-Boot does not use any network related commands. This is IMO
wrong. Eventually somebody comes up with patches to fix this?
> network interface, linux uses this mac address (and if no valid
> mac address is in eeprom, linux has no valid mac address). But,
> if uboot uses network, before booting linux, linux gets the
> network address stored in ethaddr, because this driver sets
> again in fec_init the mac address (at this point the content
> from ethaddr) -> 2 different mac addresses used on this
> plattform ... I think this could not be correct, and should be
> fixed ...
Thisis wrong in any case, and indeed should fixed. Is the bigger, more
strategical fix above is not performed now (for whatever reasons),then
this issue should be fixed anyway.
> So, if not changing something in the driver, how is this intended
> to solve? (I know, it would be great to have a standard to pass
> the mac address to linux on arm based plattforms, but as Detlev
> wrote, such attempts failed ...)
Well, they failed temporarily. A long-term solution is to use the
device tree; a RFC for the "ARM Boot standard for passing device tree
blob" has just been posted yesterday, see
http://thread.gmane.org/gmane.linux.drivers.devicetree/1938
> drivers/net/kirkwood_egiga.c
>
> did it in the same way as drivers/net/fec_mxc.c ... Ok, it is
> in line with uboot standard, but arm plattforms which booting
> linux without doing network trafic under uboot tend to have
> different mac addresses ...
>
> This should be solved!
Please include in your fix.
> (Actual I don;t know, if arm linux prescribes something about
> how to setup the mac address before it ...)
The PTBs for the ARM Linux kernel recommend to use an initramfs file
system and use user space tools to set the MAC address. I don't know
if such an approach makes any sense to you :-(
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
Research is what I'm doing when I don't know what I'm doing.
-- Wernher von Braun
More information about the U-Boot
mailing list