[PATCH 0/1 v7] net: introduce phylib

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 2 12:58:47 EDT 2012


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.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list