[U-Boot] MPC512x FEC/MII
Detlev Zundel
dzu at denx.de
Tue Sep 27 16:27:58 CEST 2011
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.
Cheers
Detlev
[1] http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast
--
Practice random senselessness and act kind of beautiful.
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the U-Boot
mailing list