
On Tue, Nov 25, 2008 at 12:31 PM, Ben Warren biggerbadderben@gmail.com wrote:
Hi Michal, Michal Simek wrote:
Hi Ben,
how does look like your propose work about PHY lib?
Thanks, Michal
I'd like to have the PHY library included in the 02.2009 release. One of the things I'm struggling with is how so specify MDIO busses and PHY addresses. For example, is it preferable to have a bunch of CONFIG_PHY_ADDR_x or a board-code struct? How to link/register PHYs with MDIO buses, since conceivably a board could have hardware MDIO and/or bit-banged MDIO, and any PHY could be on any bus.
I think the board-code should pass it in. Each nic just needs a pointer to its PHY. Some boards will have hard-coded addresses, and some will have addresses that change depending on circumstances (the DS boards use different PHYs when they are operating in SGMII mode, for instance). Some boards will even have set it up so you have to scan for a PHY. Many PCI nics seem to require this, despite its inherent fragility.
So I think if the board code were able to find PHY handles, then we can let the boards decide how to get that information (and eventually transition to pulling it out of a device tree)
Andy