Datasheet

VIPER / VIPER-Lite Embedded Linux Development Kit Quickstart Arcom Embedded Linux (AEL)
CPU clock frequency scaling
The PXA255 processor used on the VIPER / VIPER-Lite can scale the core clock
frequency from 100 to 400MHz, allowing an application to dynamically trade off
performance against power consumption. This functionality is exposed in Linux via
special files in the /sys system. These can be manipulated directly (for example using
cat and echo), but are better controlled using the cpufreq-info and cpufreq-set
utilities. Both utilities are described below.
The processor’s clock and power manager, including the available Core Clock Control
Register (CCCR) multiplier configurations, are described in detail in the PXA255
Processor Developer’s Manual, which is in the /references/ folder on the Development
Kit CD. The CCCR consists of 3 multipliers, L, M and N:
The L multiplier converts the basic 3.6864MHz crystal frequency into the memory
clock frequency. Typical values of L are 27, 36, and 45.
The M multiplier converts the memory clock frequency into the run-mode frequency.
Typical values of M are 1, 2 and 4.
The N multiplier converts the run-mode frequency into the turbo-mode frequency.
Typical values of N are 1.0, 1.5, 2.0 and 3.0.
Not all combinations of L, M and N are valid. Some valid combinations are
described below, and more information is available in the PXA255 Processor
Developer’s Manual.
The Linux kernel divides the available clock configurations into two complementary sets
of available frequencies, corresponding to the run-mode and turbo-mode multipliers.
The first set is the performance set. These use the run-mode multiplier, CCCR[M], to
scale the clock frequency. Increasing the run-mode multiplier in this way provides the
best performance but at the cost of increased power consumption.
The second set of frequencies comprise the powersave frequencies. These use the
turbo-mode multiplier, CCCR[N], to scale the clock frequency. The turbo-mode multiplier
uses less power than the run-mode multiplier but with a performance cost (especially if
frequent memory accesses are required), since the core must wait for these while
running in turbo mode.
The Linux kernel manages the current clock configuration using a software governor
combined with user-specified minimum and maximum desired clock frequencies.
The Linux kernel modules for CPU frequency scaling override the settings made
by the RedBoot clock command. If you don't need to alter or limit the CPU
frequency at runtime and would like to keep the CPU frequency set by RedBoot,
then you can reconfigure and rebuild the kernel to remove this feature.
The default VIPER / VIPER-Lite kernel provides three governors:
The performance governor selects the maximum allowed frequency from the
processor’s available performance frequencies.
The powersave governor selects the lowest available frequency from the available
powersave frequencies.
The userspace governor allows direct userspace selection of a frequency from the
available performance frequencies.
© 2006 Arcom Issue B 22