http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / Documentation / cpu-freq / user-guide.txt
1      CPU frequency and voltage scaling code in the Linux(TM) kernel
2
3
4                          L i n u x    C P U F r e q
5
6                              U S E R   G U I D E
7
8
9                     Dominik Brodowski  <linux@brodo.de>
10
11
12
13    Clock scaling allows you to change the clock speed of the CPUs on the
14     fly. This is a nice method to save battery power, because the lower
15             the clock speed, the less power the CPU consumes.
16
17
18 Contents:
19 ---------
20 1. Supported Architectures and Processors
21 1.1 ARM
22 1.2 x86
23 1.3 sparc64
24 1.4 ppc
25 1.5 SuperH
26
27 2. "Policy" / "Governor"?
28 2.1 Policy
29 2.2 Governor
30
31 3. How to change the CPU cpufreq policy and/or speed
32 3.1 Preferred interface: sysfs
33 3.2 Deprecated interfaces
34
35
36
37 1. Supported Architectures and Processors
38 =========================================
39
40 1.1 ARM
41 -------
42
43 The following ARM processors are supported by cpufreq:
44
45 ARM Integrator
46 ARM-SA1100
47 ARM-SA1110
48
49
50 1.2 x86
51 -------
52
53 The following processors for the x86 architecture are supported by cpufreq:
54
55 AMD Elan - SC400, SC410
56 AMD mobile K6-2+
57 AMD mobile K6-3+
58 AMD mobile Duron
59 AMD mobile Athlon
60 AMD Opteron
61 AMD Athlon 64
62 Cyrix Media GXm
63 Intel mobile PIII and Intel mobile PIII-M on certain chipsets
64 Intel Pentium 4, Intel Xeon
65 Intel Pentium M (Centrino)
66 National Semiconductors Geode GX
67 Transmeta Crusoe
68 VIA Cyrix 3 / C3
69 various processors on some ACPI 2.0-compatible systems [*]
70
71 [*] Only if "ACPI Processor Performance States" are available
72 to the ACPI<->BIOS interface.
73
74
75 1.3 sparc64
76 -----------
77
78 The following processors for the sparc64 architecture are supported by
79 cpufreq:
80
81 UltraSPARC-III
82
83
84 1.4 ppc
85 -------
86
87 Several "PowerBook" and "iBook2" notebooks are supported.
88
89
90 1.5 SuperH
91 ----------
92
93 The following SuperH processors are supported by cpufreq:
94
95 SH-3
96 SH-4
97
98
99 2. "Policy" / "Governor" ?
100 ==========================
101
102 Some CPU frequency scaling-capable processor switch between various
103 frequencies and operating voltages "on the fly" without any kernel or
104 user involvement. This guarantees very fast switching to a frequency
105 which is high enough to serve the user's needs, but low enough to save
106 power.
107
108
109 2.1 Policy
110 ----------
111
112 On these systems, all you can do is select the lower and upper
113 frequency limit as well as whether you want more aggressive
114 power-saving or more instantly available processing power.
115
116
117 2.2 Governor
118 ------------
119
120 On all other cpufreq implementations, these boundaries still need to
121 be set. Then, a "governor" must be selected. Such a "governor" decides
122 what speed the processor shall run within the boundaries. One such
123 "governor" is the "userspace" governor. This one allows the user - or
124 a yet-to-implement userspace program - to decide what specific speed
125 the processor shall run at.
126
127
128 3. How to change the CPU cpufreq policy and/or speed
129 ====================================================
130
131 3.1 Preferred Interface: sysfs
132 ------------------------------
133
134 The preferred interface is located in the sysfs filesystem. If you
135 mounted it at /sys, the cpufreq interface is located in a subdirectory
136 "cpufreq" within the cpu-device directory
137 (e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
138
139 cpuinfo_min_freq :              this file shows the minimum operating
140                                 frequency the processor can run at(in kHz) 
141 cpuinfo_max_freq :              this file shows the maximum operating
142                                 frequency the processor can run at(in kHz) 
143 scaling_driver :                this file shows what cpufreq driver is
144                                 used to set the frequency on this CPU
145
146 scaling_available_governors :   this file shows the CPUfreq governors
147                                 available in this kernel. You can see the
148                                 currently activated governor in
149
150 scaling_governor,               and by "echoing" the name of another
151                                 governor you can change it. Please note
152                                 that some governors won't load - they only
153                                 work on some specific architectures or
154                                 processors.
155 scaling_min_freq and 
156 scaling_max_freq                show the current "policy limits" (in
157                                 kHz). By echoing new values into these
158                                 files, you can change these limits.
159
160
161 If you have selected the "userspace" governor which allows you to
162 set the CPU operating frequency to a specific value, you can read out
163 the current frequency in
164
165 scaling_setspeed.               By "echoing" a new frequency into this
166                                 you can change the speed of the CPU,
167                                 but only within the limits of
168                                 scaling_min_freq and scaling_max_freq.
169                                 
170
171 3.2 Deprecated Interfaces
172 -------------------------
173
174 Depending on your kernel configuration, you might find the following 
175 cpufreq-related files:
176 /proc/cpufreq
177 /proc/sys/cpu/*/speed
178 /proc/sys/cpu/*/speed-min
179 /proc/sys/cpu/*/speed-max
180
181 These are files for deprecated interfaces to cpufreq, which offer far
182 less functionality. Because of this, these interfaces aren't described
183 here.
184