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

Kumar Gala galak at kernel.crashing.org
Thu Sep 15 06:18:50 CEST 2011


On Sep 14, 2011, at 3:13 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1316020387-6252-1-git-send-email-galak at kernel.crashing.org> you wrote:
>> The SoC configuration may have more ports enabled than a given board
>> actually can utilize.  Add a routinue that allows the board code to
>> disable a port that it knows isn't being used.
> 
> I don't get it.  If you know you are not using / able to use a
> specific port, then why do you enable it in the first place?
> 
> First creating a mess and then needing extra code to clean it up seems
> .... well, let's say suboptimal to me.
> 
> Best regards,
> 
> Wolfgang Denk

:)

An example is you pick a SERDES configuration that has 8 gig-e ports.   You make the choice because you might need other SERDES options like PCIe that the configuration gives you.  However you only wire up 2 or 4 of those 8 gig-e ports.  The SoC still thinks its configured with 8-gige ports.

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.

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.

- k


More information about the U-Boot mailing list