[U-Boot-Users] cpu/mpc8xx/fec.c MII & RMII code

Josef Angermeier Josef.Angermeier at informatik.stud.uni-erlangen.de
Tue Feb 28 13:36:52 CET 2006


Dear u-boot-users,

i got a little question to the FEC/MII code in cpu/mpc8xx/fec.c. 

As far as i understand it, MII and RMII are just two different protocols
how MPC and network transceiver chip "talk"to each other. So the MPC can
find out the prefered transmission method, duplex or half duplex,
100Mps or 10Mps and setup the FEC accordingly.

Now i don't get, why the speed settings of the transceiver are ignored
unless *both* CONFIG_MII and CONFIG_RMII are set, and why the half/full
speed settings are only of importance if CONFIG_MII alone is set.

Maybe understanding this could help me getting also 100Mps instead of
10Mps to work...  thanks for your advices!

Best regards,
Josef

#if defined(CONFIG_MII) && defined(CONFIG_RMII)

	...

	/*
	 * adapt the RMII speed to the speed of the phy
	 */
	if (miiphy_speed (efis->actual_phy_addr) == _100BASET) {
		fec_100Mbps (dev);
	} else {
		fec_10Mbps (dev);
	}
#endif

#if defined(CONFIG_MII)
	/*
	 * adapt to the half/full speed settings
	 */
	if (miiphy_duplex (efis->actual_phy_addr) == FULL) {
		fec_full_duplex (dev);
	} else {
		fec_half_duplex (dev);
	}
#endif






More information about the U-Boot mailing list