[U-Boot-Users] MII / RMII

Andy Fleming afleming at gmail.com
Tue Jan 8 02:35:12 CET 2008


On 11/29/07, Ulf Samuelsson <ulf at atmel.com> wrote:
>
> tor 2007-11-29 klockan 19:51 +0100 skrev Guennadi Liakhovetski:
> > Hi,
> >
> > 1. Does it make sense at all to define CONFIG_RMII without defining
> > CONFIG_MII? The question is meant not really theoretical as in what
> > meaning RMII has, rather how the macro CONFIG_RMII is supposed to be
> used?
> > For example, tests like
> >
>
> I think that if you use an Ethernet and need to differentiate
> between MII and RMII they should be mutually exclusive.
> You either define CONFIG_RMII OR CONFIG_MII but not both.
> If you have a PHY on the chip, then you do not define any of the two.
> MII uses more pins and maybe different pins, so a port for a CPU
> should differentiate.



I'm a little late to this, but I feel I should make sure people are aware
that CONFIG_MII and CONFIG_RMII are not, in this case, two different options
for the same concept.  CONFIG_MII is the option you enable to allow MII
Management operations to be done.  It should *probably* be called
CONFIG_MDIO.  You'll see this problem all over the place.  MII is the name
for the data interface between a PHY and a 10/100 ethernet controller.  MDIO
is the management interface for MII-compliant PHYs.  But it's frequently
called the MII Management interface.

RMII is a different data interface for PHYs, but it uses the same MDIO
interface.

So I believe if you see:
#if defined(CONFIG_MII) && defined(CONFIG_RMII), what you are seeing is a
check for global mii management capability as well as board-specific reduced
interface selection.

As to whether one or more of these definitions is poorly named, I leave that
as an exercise for the reader.  ;)


Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080107/f40b014e/attachment.htm 


More information about the U-Boot mailing list