MDIO clock speed computation
Jean-Denis Boyer
jdboyer at mediatrix.com
Tue Jul 23 04:19:41 EST 2002
Pavel,
You have found a interesting problem in the calculation of the MII_SPEED.
And it seems to be there since a long time!
However, your fix seems incomplete.
If I have a frequency of 82,5MHz, for example,
it yields exactly to the same result before and after your patch,
that is an MDIO clock of 2.58MHz.
Since the divisor is 2 * MDCLOCK,
I would suggest something like:
(((bd->bi_intfreq + (2 * 2500000 - 1 )) / 2500000 / 2) & 0x3F) << 1;
Regards,
--------------------------------------------
Jean-Denis Boyer, B.Eng., System Architect
Mediatrix Telecom Inc.
4229 Garlock Street
Sherbrooke (Québec)
J1L 2C8 CANADA
(819)829-8749 x241
--------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list