how can i see the *actual* bus and brg frequencies on running system?
mpe at ellerman.id.au
Thu May 26 11:08:59 AEST 2016
On Wed, 2016-05-25 at 10:59 -0400, Robert P. J. Day wrote:
> i asked about this a while ago, didn't see any response, and i'm
> still curious ... i have an MPC8360 system, ported u-boot to it, and
> in the dts file i got from someone, the bus and brg frequencies were
> set to lower values than they should have been, but we left them there
> and, once the system was up, i tried to check what the *actual*
> frequencies were being used.
> i checked under both /proc/device-tree, and way down under /sys, and
> both showed lower frequencies, but one of the embedded guys wrote a
> utility to read the actual PPC register that contained the bus
> frequency, and assured us it was running at 533MHz, which is what we
> wanted all along.
> so dts stuff aside, is there a simple user space way to display the
> frequencies that are actually being used on the system? because it
> appears that what's under both /proc and /sys are showing only what is
> set in the device tree blob passed to the kernel, but that's not where
> the kernel is getting the final value from.
There is no generic way to ask parts of the system what frequency they're
The contents of /proc/device-tree should match exactly what is in the dts, or
whatever was put there by firmware.
If the frequency values are set in the dts then it's certainly possible they
don't match reality. There would need to be code in the firmware or kernel to
take the values in the dts and tell the hardware to use them.
If the value is set by firmware then you would hope it matches reality, but
firmware can have bugs.
> p.s. we got the BSP for this board from elsewhere, so it's possible
> that during kernel boot, the kernel has been patched to ignore what it
> sees in the DTB, and gets the value from somewhere unique to this BSP.
OK, so if you don't know what code you're using then anything could be
> but still, if that's the case, should it not still be possible to
> view the frequency that was finally set and used on the running
Sure it's possible, you just need to write code to do it :)
More information about the Linuxppc-dev