Subject: G3 bus speed detector

From: Andreas Tobler <[email-masked]>
Date: Thu, 21 Nov 2002 20:45:15 +0100

Hello,

attached a little module I hacked. This module calculates the bus, cpu
and the L2 frequency of a G3 based system. I tested it on a pm8600
G3/500 and a wallstreet I.
We can discuss about the need of such a module, yes. Possibly useless
except for me. I did it to learn a bit module programming and asm. Also
I was annoyed that my wallstreet reports 100MHz bus frequency from OF.

It would be great if I could get some feedback regarding functionality
and other issues.

PLEASE keep in mind, TRY IT ON YOUR OWN RISK. It should be safe now, but
you never know.

make,
make install (as root)
insmod clock_cpu_mod
sync (just to be on the safe side)

cat /proc/cpu_clock

[root@pm8600 clock]# cat /proc/cpu_clock
CPU clock: detecting CPU clock
PPC 740/750
Bus frequency : 49997936 Hz
CPU frequency : 499979360 Hz
L2  frequency : 249989680 Hz
cpu-rev:  3.2 COP
Clock:  End of Test

That's it.

TIA,

Andreas

P.S, thanks goes once again to benh.