Re: [U-Boot] [PATCH] fdt: rework fdt_fixup_ethernet() to use env instead of bd_t

2008-08-18 Thread Wolfgang Denk
Dear Kumar Gala,

In message [EMAIL PROTECTED] you wrote:
 Move to using the environment variables 'ethaddr', 'eth1addr', etc..
 instead of bd-bi_enetaddr, bi_enet1addr, etc.
 
 This makes the code a bit more flexible to the number of ethernet
 interfaces.  Right now we assume a max of 10 interfaces.

How does this match with our very static way of selecting this using
'CONFIG_HAS_ETHn' #defines?  There is no such thing as
CONFIG_HAS_ETH8 anywhere in the code...

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: [EMAIL PROTECTED]
The one who says it cannot be done should never interrupt the one who
is doing it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fdt: rework fdt_fixup_ethernet() to use env instead of bd_t

2008-08-18 Thread Kumar Gala

On Aug 18, 2008, at 2:12 PM, Wolfgang Denk wrote:

 Dear Kumar Gala,

 In message [EMAIL PROTECTED]  
 you wrote:
 Move to using the environment variables 'ethaddr', 'eth1addr', etc..
 instead of bd-bi_enetaddr, bi_enet1addr, etc.

 This makes the code a bit more flexible to the number of ethernet
 interfaces.  Right now we assume a max of 10 interfaces.

 How does this match with our very static way of selecting this using
 'CONFIG_HAS_ETHn' #defines?  There is no such thing as
 CONFIG_HAS_ETH8 anywhere in the code...

oops, forgot about that.  I think we just have the code exist always  
(for CONFIG_OF_LIBFDT)

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fdt: rework fdt_fixup_ethernet() to use env instead of bd_t

2008-08-18 Thread Kumar Gala

On Aug 18, 2008, at 2:16 PM, Kumar Gala wrote:


 On Aug 18, 2008, at 2:12 PM, Wolfgang Denk wrote:

 Dear Kumar Gala,

 In message [EMAIL PROTECTED]
 you wrote:
 Move to using the environment variables 'ethaddr', 'eth1addr', etc..
 instead of bd-bi_enetaddr, bi_enet1addr, etc.

 This makes the code a bit more flexible to the number of ethernet
 interfaces.  Right now we assume a max of 10 interfaces.

 How does this match with our very static way of selecting this using
 'CONFIG_HAS_ETHn' #defines?  There is no such thing as
 CONFIG_HAS_ETH8 anywhere in the code...

 oops, forgot about that.  I think we just have the code exist always
 (for CONFIG_OF_LIBFDT)

74xx_7xx, mpc8xx, ppc4xx -- called regardless of CONFIG_HAS_ETHn
mpc512x -- called only based on HAS_ETH0
mpc8260, mpc83xx, mpc85xx, mpc86xx -- called if HAS_ETH0 || HAS_ETH1  
|| HAS_ETH2 || HAS_ETH3

With ETH3 being the max today.

We have a part (p4080) in the works with 8 interfaces (its unlikely  
we'll have support for all 8 in u-boot, but do want to be ablity to  
set mac addresses for all 8.)

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fdt: rework fdt_fixup_ethernet() to use env instead of bd_t

2008-08-18 Thread Wolfgang Denk
Dear Kumar Gala,

In message [EMAIL PROTECTED] you wrote:
 
 74xx_7xx, mpc8xx, ppc4xx -- called regardless of CONFIG_HAS_ETHn
 mpc512x -- called only based on HAS_ETH0
 mpc8260, mpc83xx, mpc85xx, mpc86xx -- called if HAS_ETH0 || HAS_ETH1  
 || HAS_ETH2 || HAS_ETH3
 
 With ETH3 being the max today.

Yes. and I have to admit that I really dislike this static
configuration which prevents any loops in the code.

 We have a part (p4080) in the works with 8 interfaces (its unlikely  
 we'll have support for all 8 in u-boot, but do want to be ablity to  
 set mac addresses for all 8.)

I guess we should try to find some clever way of overcoming  the  old
style.

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: [EMAIL PROTECTED]
Don't panic.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot