[U-Boot] MPC512x FEC/MII

Schneider, Kolja Kolja.Schneider at men.de
Tue Sep 27 16:57:06 CEST 2011


Hi Detlev,

> -----Ursprüngliche Nachricht-----
> Von: Detlev Zundel [mailto:dzu at denx.de]
> Gesendet: Dienstag, 27. September 2011 16:28
> An: Bernhard Kaindl
> Cc: Schneider, Kolja; u-boot at lists.denx.de
> Betreff: Re: [U-Boot] MPC512x FEC/MII
> 
> Hi Bernhard,
> 
> > we also get broken output from mii_cmd when the commit which you
> show
> > below is applied, reverting it helps.
> >
> > Hardware: Our own MPC5121ADS-based board and the MPC5121ADS
> development
> > board.
> >
> > The commit is titled:
> >
> > mpc512x_fec: Move PHY initialization from probe into init routin
> > This saves the autonegotation delay when not using ethernet in U-Boot",
> >
> > This exactly what it does, the effect is no suprise at all:
> >
> > Of course, the move of the PHY init from the fec_probe (executed before
> > the u-boot prompt appears) to the fec_init (called only and every time a
> > new network command is executed) has the effect which we see:
> >
> > The PHY is only initialized while a network command (such as dhcp, tftp,
> > ...) is being executed.
> 
> Well, this is actually in line with the U-Boot design principles of
> initializing a device only if its needed[1].  This principle was
> disregarded regularly in the past and so it seems kind of naturla that
> "fixing" it results in changes of behaviour.  We should however fix the
> fallout rather than going back to violating the principles.
> 
> If the mii routines need initializations, then they should ensure that
> they have been done.

This really is a shame as the mii tools are quite helpful for debugging/hardware verification. If the mii-command performs a re-initialisation each time they are invoked, they are probably close to useless (as one would need several commands to perform certain tasks...).

However I understand this is something that is not quite in the scope of a bootloader. As long as an easy workaround is available...

:) Kolja



More information about the U-Boot mailing list