<br><br><div><span class="gmail_quote">On 11/29/07, <b class="gmail_sendername">Ulf Samuelsson</b> <<a href="mailto:ulf@atmel.com">ulf@atmel.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
tor 2007-11-29 klockan 19:51 +0100 skrev Guennadi Liakhovetski:<br>> Hi,<br>><br>> 1. Does it make sense at all to define CONFIG_RMII without defining<br>> CONFIG_MII? The question is meant not really theoretical as in what
<br>> meaning RMII has, rather how the macro CONFIG_RMII is supposed to be used?<br>> For example, tests like<br>><br><br>I think that if you use an Ethernet and need to differentiate<br>between MII and RMII they should be mutually exclusive.
<br>You either define CONFIG_RMII OR CONFIG_MII but not both.<br>If you have a PHY on the chip, then you do not define any of the two.<br>MII uses more pins and maybe different pins, so a port for a CPU<br>should differentiate.
</blockquote><div><br>
<br>
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.<br>
<br>
RMII is a different data interface for PHYs, but it uses the same MDIO interface.<br>
<br>
So I believe if you see:<br>
#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.<br>
<br>
As to whether one or more of these definitions is poorly named, I leave that as an exercise for the reader. ;)<br>
<br>
<br>
Andy</div></div><br>