[U-Boot] [PATCH] [83xx] Adds two more ethernet interface to 83xx

Wolfgang Denk wd at denx.de
Fri Sep 26 00:17:48 CEST 2008


Dear Jerry Van Baren,

In message <48DBF7A9.3010905 at ge.com> you wrote:
>
> Kumar solved this problem WRT cpu/mpc83xx/fdt.c fdt_fixup_ethernet(void 
> *fdt) (and other CPUs) by using the device tree to find all the 
> ethernets and configure them.
>    <http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/45554>

But Kumar's  code  still  loops  over  the  "eth[N]addr"  environment
variables.  And  even though discouraged for normal use, there should
be a way to define these for the  (compiled-in)  default  environment
where needed (devices using a real ROM).

> Suggestion: Look at changing CONFIG_ETH*ADDR to CONFIG_ETH_FDT where 
> that notation indicates the code should find the ethernet info in the 
> fdt blob rather than #defines/env variables.

Please have a look at fdt_fixup_ethernet() in "common/fdt_support.c";
my reading of the code does not match your statements here.



> Do we need eth[1-5]?addr env variables?  I don't think so.

Yes, we do. That's what fdt_fixup_ethernet() uses to loop.

> If we really do need them, they can be generated from the fdt blob a'la 
> Kumar's loop.

Either you or I must be missing something.


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
Nobody trips over mountains. It is the small pebble that  causes  you
to  stumble.  Pass all the pebbles in your path and you will find you
have crossed the mountain.


More information about the U-Boot mailing list