TSI ethernet PHY question

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri May 25 08:51:24 EST 2007


> For instance, I think #1 might usually be workable by passing in PHY- 
> specific flags, and letting the PHY driver deal with it in  
> config_init.  This might even be workable for the BCM5461A chip as  
> mentioned above.  You could define a BCM5461A_TXC_RXC_DELAY_DISABLE  
> flag, and have the config_init code check for that flag and perform  
> the necessary disable.

For powerpc, I have a solution at hand, it's the device-tree :-)

Any struct device in the system can have a device node pointer via the
dev_sysdata thingy I added recently. So we can have some code for
powerpc that properly hooks up the PHY to an (optional) device-node
which can then contains properties describing what kind of workarounds
need to be applied.

For example, we can have a txc-rxc-delay-disable property on Holly.

The problem is that of course the PHY driver will need some powerpc
specific code to go fetch that. An option would be to instead use flags
and have a piece of powerpc specific code that translates those
device-tree properties into flags so that other archs can use the flags
using their own ways of passing them in.

I'm not too hot with the flag stuff tho since those really need to be
defined per PHY model/family. But I suppose that's fair enough.

Ben.





More information about the Linuxppc-dev mailing list