User:CesarB/cpufreq

From Openmoko

< User:CesarB
Revision as of 19:40, 19 January 2008 by CesarB (Talk | contribs)

Jump to: navigation, search

The cpufreq subsystem is a Linux kernel subsystem responsible for managing the CPU frequency. It's commonly used in laptops to reduce power usage when idle.

On the S3C2410, adjusting the CPU frequency changes the clocks for almost all devices on the chip. This means that, to write a cpufreq driver for the S3C2410, you have to also adjust some values on almost all devices.

This project aims to implement the cpufreq driver (which manages the CPU frequency transitions) and a cpufreq notifier for all the affected drivers (to do two things: quiesce the device before the change, and adjust the frequency after the change).

The most recent version of the code can be found at http://repo.or.cz/w/linux-2.6/s3c2410-cpufreq.git on the branches s3c2410-cpufreq (for code which applies on top of the upstream "git HEAD" kernel) and s3c2410-cpufreq-gta01 (for code which applies on top of the OpenMoko patched kernel).

To build

NOTE: Do not run on real hardware, unless you really know what you are doing.


You need a fully built OpenMoko tree for the cross-compiler and uboot tools.

  1. Checkout the s3c2410-cpufreq-gta01 branch
  2. Copy the defconfig file from branches/src/target/kernel/2.6.24.x/config on the OpenMoko svn as the .config file
  3. Set the PATH to the correct value (check the run.* temporary files bitbake generates to find out the correct value)
  4. Run make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- oldconfig and answer correctly the questions
  5. Run make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage
  6. The last line of the output tells you the correct file which should be flashed on the emulator.

See also

Personal tools

The cpufreq subsystem is a Linux kernel subsystem responsible for managing the CPU frequency. It's commonly used in laptops to reduce power usage when idle.

On the S3C2410, adjusting the CPU frequency changes the clocks for almost all devices on the chip. This means that, to write a cpufreq driver for the S3C2410, you have to also adjust some values on almost all devices.

This project aims to implement the cpufreq driver (which manages the CPU frequency transitions) and a cpufreq notifier for all the affected drivers (to do two things: quiesce the device before the change, and adjust the frequency after the change).

The most recent version of the code can be found at http://repo.or.cz/w/linux-2.6/s3c2410-cpufreq.git on the branches s3c2410-cpufreq (for code which applies on top of the upstream "git HEAD" kernel) and s3c2410-cpufreq-gta01 (for code which applies on top of the OpenMoko patched kernel).

To build

NOTE: Do not run on real hardware, unless you really know what you are doing.


You need a fully built OpenMoko tree for the cross-compiler and uboot tools.

  1. Checkout the s3c2410-cpufreq-gta01 branch
  2. Copy the defconfig file from branches/src/target/kernel/2.6.24.x/config on the OpenMoko svn as the .config file
  3. Set the PATH to the correct value (check the run.* temporary files bitbake generates to find out the correct value)
  4. Run make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- oldconfig and answer correctly the questions
  5. Run make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage
  6. The last line of the output tells you the correct file which should be flashed on the emulator.

See also