cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
watson123
Participant
Participant
7,401 Views
Registered: ‎01-02-2013

cpu clock freq change

Hi,

 

I found the following message during linux boot up and running linaro ubuntu.

 

cpufreq_cpu0: failed to set clock rate: -16

cpufreq: __cpufreq_driver_target: Failed to change cpu frequency: -16

 

The system can still work but the above messages appear periodically.

 

What's wrong?

 

I'm using xilinx kernel @tag version xilinx-2014.2

 

watson

0 Kudos
5 Replies
milosoftware
Scholar
Scholar
7,384 Views
Registered: ‎10-26-2012

Current kernel reports to be able to switch to 222 MHz, but when ask to do so, it errors. The 333 and 666 settings work fine.

 

This is related to the change to allow only multiple-of-2 dividers which apparently doesn't filter out the unsupported ones to the governor. The governor then tries to switch to frequencies that do not work.

0 Kudos
watson123
Participant
Participant
7,368 Views
Registered: ‎01-02-2013

Thanks 

 

Is this a kernel issue ?

 

 

0 Kudos
asigint
Visitor
Visitor
7,302 Views
Registered: ‎10-02-2013

To get rid of the message, I made the following change to my device tree:

 

In the section: ps7_cortexa9_0: cpu@0 {}

 

change from:

 

operating-points = <666667 1000000 333334 1000000 222223 1000000>;

 

to:

 

operating-points = <666667 1000000 333334 1000000>;

 

This doesn't really fix anything, other than to stop trying to use 222MHz which doesn't seem to work. If anyone knows how to fix it please share.

 

Also, it seems you should be able to set the frequency with a command like:

echo 666667 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

 

but that doesn't work for me. I get

echo: write error: Invalid argument

 

Not sure if this is related.

 

Jerry

0 Kudos
sorenb
Xilinx Employee
Xilinx Employee
7,294 Views
Registered: ‎03-13-2012


@asigint wrote:

Also, it seems you should be able to set the frequency with a command like:

echo 666667 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

 

but that doesn't work for me. I get

echo: write error: Invalid argument



What governor are you using? I suspect anything else, but not 'userspace'. Hence, no userspace control over the frequency.

0 Kudos
vibishna
Visitor
Visitor
4,260 Views
Registered: ‎05-03-2016

I know this is a very old post. But I thought it is worth discussing.

 

This problem started popping up, once I started playing with the governor in menu config. I can get rid of this problem using the following command instantaneously:

 

"sudo cpufreq-set -g userspace"

 

I made a script to run this command on boot up. But that did not work. I have to issue the above command only after this error gets displayed. 

0 Kudos