
Dear Albert ARIBAUD,
In message 4C6B858F.9060201@free.fr you wrote:
At the moment your problem is not being able to reset the PHY at times other than boot, i.e. the 'PHY API' would be limited to reset_phy() which is pretty much board-specific anyway. What prevents simply adding calls to reset_phy() to the driver? It needs them anyway, so it will never be compiled without a reset_phy() to call, right?
It may be desirable (at least as an option) to always perform the PHY reset (just the reset, i. e. the hardware initialization) without waiting for a link to come up. Link negotiation could then happen "in background", while other parts of U-Boot initialization are running. When U-Boot actually performs a network command, it ill not have to wait as long as in the case when we start resetting the PHY here.
I am well aware that this is not in line with the principle of initializing the hardware only if needed, but short boot times are a common requirement, so one might consider such an option. [I would not recommend (or accept) this as the default case.]
Best regards,
Wolfgang Denk