Project

General

Profile

Permanent increasing of CPU-Clock

Added by Christian Rückl about 12 years ago

I know that, there is already a post in this forum which includes exactly my question below, but no answer on this until now.

I want to increase the cpu clock on arm-side from 300 MHz to 456 MHz, permanently.

Does a increasing like this affects also the other clocks of EMIFA, DDR,...? If yes, can this cause problems?

Thanks for your help.
Christian


Replies (3)

RE: Permanent increasing of CPU-Clock - Added by Michael Williamson about 12 years ago

Hi Christian,

By default the kernel always comes up at 300 MHz for the CPU. Most folks create an init script to boost Commercial grade parts to 456 MHz if they require it and compile in user space frequency governors.

For linux, there are a couple of options for "permanent" speed increases. One would be to select a governor (in the kernel CPU speed configuration area) that optimizes performance. I don't remember the exact config settings off hand, I am assuming you can look into it.

A second option would be to modify the kernel source code and force the OPP to the desired 456 MHz. We have not done this, but it could be added I think without much effort.

If you are using Starterware, then you'll need to find the PLL initialization code and modify it yourself for 456 MHz operation. I would suggest using the PLL settings issued by TI in the linux kernel code as a reference.

As far as impacting the clock tree, the short answer is "yes, changing the ARM CPU clock impacts other clocks". I would advise reviewing the OMAP-L138 Datasheet as well as the Technical Reference Manual for the clock tree details. I can say the following:

  • Changing the ARM CPU clock involves reconfiguring PLL0
  • The ARM CPU clock is also the same clock used by DSP in OMAP-L138
  • The EMIFA clock rate is affected by changing PLL0. There is code in the kernel to try to keep it as close to 100 MHz as possible using dividers, etc. You will, I believe get a rate of 456 / 5 = 91.2 MHz. This will impact any FPGA timings if you are using an FPGA module.
  • Several other peripherals also hang off of PLL0. There is logic in the kernel that will deal with recomputing clock divider trees to values as close as possible to the desired settings. We haven't seen any problems with this code and these peripherals, but haven't done robust testing on every interface affected (you should check with TI on this).
  • The DDR clocking is controlled by a separate PLL (PLL1) as the ARM clock, so the DDR is not affected by CPU speed changes.
  • There are some other peripherals hanging off of PLL1 that also are NOT affected.

I hope this answers your question.

-Mike

RE: Permanent increasing of CPU-Clock - Added by Christian Rückl about 12 years ago

Hi Mike,

I set the CPUFreq governor in the kernel to performance:

CPU Power Management->CPU Frequency scaling->Default CPUFreq governor (performance)

But the CPU clock is still at 300 MHz. Attached my actual kernel-config file.

I want to try also the secound way with changing the kernel-source-code but i couldn't found the file where it is located.

Thanks,
Christian

.config (54.3 KB) .config

RE: Permanent increasing of CPU-Clock - Added by Mary Frantz about 12 years ago

I don't know if this is the "best" way, but this works and you don't have to rebuild the kernel.

Create a script file located in /etc/init.d called "cpuscript" (or whatever you want to call it).
Paste the following lines to the file:

#!/bin/sh
echo "Changing cpu clock to 456MHz"
echo 456000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
exit 0

Create a link to this file in /etc/rc5.d with the following commands:

cd /etc/rc5.d
ln -s ../init.d/cpuscript S25cpuscript

The script will execute at the end of the boot process.

Verify the cpu frequency after rebooting:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

If there is a better method, please let me know.
Mary

    (1-3/3)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)