[U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port

Wolfgang Denk wd at denx.de
Thu Sep 15 07:11:13 CEST 2011


Dear Kumar Gala,

In message <D144BA6D-B90C-46CD-BE7F-6197015676BB at kernel.crashing.org> you wrote:
> 
> Now you could say that we should deal with this via #defines.  Which is
> true, however our reference boards allow for running in hundreds if not
> thousands of various possible HW configurations and we've tried to avoid
> having different builds for such things unless completely unavoidable.

Understood and agreed.

> So this gives the option to the board code to disable things if it knows
> based on some other information.  In the specific case for the P3060QDS
> board, we have "add-on" cards that provide 4-ports of 1-gig SGMII.  We
> can detect if one of these cards is in a slot.  If the card is missing
> we can 'disable' the ports associated with the slot.

Well, can you not turn this logic around, and come up in a
configuration with all ports disabled, and then enable only those
ports that are actually present?  That appears to make much more sense
to me. Eventually it is even more efficient in terms of things
likepower cinsumption etc. ?

[In the long run (maybe not so long actually) you can even do this
device tree based ...]

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
"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
                                                 -- J. Finnegan, USC.


More information about the U-Boot mailing list