Thread (2 messages) 2 messages, 2 authors, 2002-07-24

Re: MDIO clock speed computation

From: Pavel Bartusek <hidden>
Date: 2002-07-24 07:38:38

Jean-Denis Boyer wrote:
quoted
Will this work for all cases? :

((((bd->bi_intfreq + 4999999) / 2500000) / 2 ) & 0x3F ) << 1;
I hope so ;-)
Because hoping is not enough, I wrote a little brute force program for testing (see attachment).
The algorithm above is OK :-) It produces MDIO frequencies from 1.875MHz to 2.5 MHz.

BTW: Wolfgang, similar problem is in the PPCboot.

----------------------------------------------------------------------
|                          Pavel Bartusek                            |
|                                                                    |
| Sysgo RTS GmbH,                     phone: +49 (0) 6136 9948-722   |
| Am Pfaffenstein 14                  fax:   +49 (0) 6136 9948-10    |
| D-55270 Klein-Winternheim           email: pba@sysgo.de            |
| Germany                                                            |
|                                                                    |
|       http://www.sysgo.de           http://www.elinos.com          |
|                                                                    |
----------------------------------------------------------------------

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help