[PATCH 0/1 v7] net: introduce phylib

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Oct 2 14:32:46 EDT 2012


On 18:58 Tue 02 Oct     , Sascha Hauer wrote:
> On Tue, Oct 02, 2012 at 06:04:21PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > The mdiobus_scan performed when registering the mdio bus at probe time
> > > has an impact on boot time. I have a 85xx board whose PHY needs 450ms to
> > > be ready for access.
> > > 
> > > I will send a patch for the gianfar driver to register the mdio bus only
> > > when the device is open.
> > That why I did at the first open before
> > 
> > and I guess your case is not the only one
> > 
> > I do not like the idea to register the bus later
> > 
> > we need to have defer probe
> 
> Yes, that's probably the best. Normally, when a phy address is given, we
> do not have to scan the bus at all, we only have to do it when -1 is
> given as phy address.
> 
> Another idea would be to pass a bitmask for valid phy addresses rather
> than a number. Maybe some board has a phy at a known address and another
> one at some to be detected address. Then for one phy the mask would be
> 0x00010000 and for the other 0xfffeffff. Given that this would be more
> effort to change all the platform data we can do this should the need
> arise.
scan the bus take nothing 100ms normally the mdio lock is 3MHz to 6MHz,
the issue is that some phy need to be reset and you need wait for it
and the bus reset

so I think we need to add:

 - device probe defer support
 - phy reset support at phylib level

phy mask will just reduce a few the bus scan

Best Regards,
J.



More information about the barebox mailing list