blob: f918250d53657546261b1d9994068aa98bb252ec [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001menu "CPU Frequency scaling"
2
3config CPU_FREQ
4 bool "CPU Frequency scaling"
5 select SRCU
6 help
7 CPU Frequency scaling allows you to change the clock speed of
8 CPUs on the fly. This is a nice method to save power, because
9 the lower the CPU clock speed, the less power the CPU consumes.
10
11 Note that this driver doesn't automatically change the CPU
12 clock speed, you need to either enable a dynamic cpufreq governor
13 (see below) after boot, or use a userspace tool.
14
15 For details, take a look at <file:Documentation/cpu-freq>.
16
17 If in doubt, say N.
18
19if CPU_FREQ
20
21config CPU_FREQ_GOV_ATTR_SET
22 bool
23
24config CPU_FREQ_GOV_COMMON
25 select CPU_FREQ_GOV_ATTR_SET
26 select IRQ_WORK
27 bool
28
29config CPU_FREQ_BOOST_SW
30 bool
31 depends on THERMAL
32
33config CPU_FREQ_STAT
34 bool "CPU frequency transition statistics"
35 help
36 Export CPU frequency statistics information through sysfs.
37
38 If in doubt, say N.
39
40config CPU_FREQ_TIMES
41 bool "CPU frequency time-in-state statistics"
42 help
43 Export CPU time-in-state information through procfs.
44
45 If in doubt, say N.
46
47choice
48 prompt "Default CPUFreq governor"
49 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
50 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
51 help
52 This option sets which CPUFreq governor shall be loaded at
53 startup. If in doubt, select 'performance'.
54
55config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
56 bool "performance"
57 select CPU_FREQ_GOV_PERFORMANCE
58 help
59 Use the CPUFreq governor 'performance' as default. This sets
60 the frequency statically to the highest frequency supported by
61 the CPU.
62
63config CPU_FREQ_DEFAULT_GOV_POWERSAVE
64 bool "powersave"
65 select CPU_FREQ_GOV_POWERSAVE
66 help
67 Use the CPUFreq governor 'powersave' as default. This sets
68 the frequency statically to the lowest frequency supported by
69 the CPU.
70
71config CPU_FREQ_DEFAULT_GOV_USERSPACE
72 bool "userspace"
73 select CPU_FREQ_GOV_USERSPACE
74 help
75 Use the CPUFreq governor 'userspace' as default. This allows
76 you to set the CPU frequency manually or when a userspace
77 program shall be able to set the CPU dynamically without having
78 to enable the userspace governor manually.
79
80config CPU_FREQ_DEFAULT_GOV_ONDEMAND
81 bool "ondemand"
82 select CPU_FREQ_GOV_ONDEMAND
83 select CPU_FREQ_GOV_PERFORMANCE
84 help
85 Use the CPUFreq governor 'ondemand' as default. This allows
86 you to get a full dynamic frequency capable system by simply
87 loading your cpufreq low-level hardware driver.
88 Be aware that not all cpufreq drivers support the ondemand
89 governor. If unsure have a look at the help section of the
90 driver. Fallback governor will be the performance governor.
91
92config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
93 bool "conservative"
94 select CPU_FREQ_GOV_CONSERVATIVE
95 select CPU_FREQ_GOV_PERFORMANCE
96 help
97 Use the CPUFreq governor 'conservative' as default. This allows
98 you to get a full dynamic frequency capable system by simply
99 loading your cpufreq low-level hardware driver.
100 Be aware that not all cpufreq drivers support the conservative
101 governor. If unsure have a look at the help section of the
102 driver. Fallback governor will be the performance governor.
103
104config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
105 bool "schedutil"
106 depends on SMP
107 select CPU_FREQ_GOV_SCHEDUTIL
108 select CPU_FREQ_GOV_PERFORMANCE
109 help
110 Use the 'schedutil' CPUFreq governor by default. If unsure,
111 have a look at the help section of that governor. The fallback
112 governor will be 'performance'.
113
114endchoice
115
116config CPU_FREQ_GOV_PERFORMANCE
117 tristate "'performance' governor"
118 help
119 This cpufreq governor sets the frequency statically to the
120 highest available CPU frequency.
121
122 To compile this driver as a module, choose M here: the
123 module will be called cpufreq_performance.
124
125 If in doubt, say Y.
126
127config CPU_FREQ_GOV_POWERSAVE
128 tristate "'powersave' governor"
129 help
130 This cpufreq governor sets the frequency statically to the
131 lowest available CPU frequency.
132
133 To compile this driver as a module, choose M here: the
134 module will be called cpufreq_powersave.
135
136 If in doubt, say Y.
137
138config CPU_FREQ_GOV_USERSPACE
139 tristate "'userspace' governor for userspace frequency scaling"
140 help
141 Enable this cpufreq governor when you either want to set the
142 CPU frequency manually or when a userspace program shall
143 be able to set the CPU dynamically, like on LART
144 <http://www.lartmaker.nl/>.
145
146 To compile this driver as a module, choose M here: the
147 module will be called cpufreq_userspace.
148
149 For details, take a look at <file:Documentation/cpu-freq/>.
150
151 If in doubt, say Y.
152
153config CPU_FREQ_GOV_ONDEMAND
154 tristate "'ondemand' cpufreq policy governor"
155 select CPU_FREQ_GOV_COMMON
156 help
157 'ondemand' - This driver adds a dynamic cpufreq policy governor.
158 The governor does a periodic polling and
159 changes frequency based on the CPU utilization.
160 The support for this governor depends on CPU capability to
161 do fast frequency switching (i.e, very low latency frequency
162 transitions).
163
164 To compile this driver as a module, choose M here: the
165 module will be called cpufreq_ondemand.
166
167 For details, take a look at linux/Documentation/cpu-freq.
168
169 If in doubt, say N.
170
171config CPU_FREQ_GOV_CONSERVATIVE
172 tristate "'conservative' cpufreq governor"
173 depends on CPU_FREQ
174 select CPU_FREQ_GOV_COMMON
175 help
176 'conservative' - this driver is rather similar to the 'ondemand'
177 governor both in its source code and its purpose, the difference is
178 its optimisation for better suitability in a battery powered
179 environment. The frequency is gracefully increased and decreased
180 rather than jumping to 100% when speed is required.
181
182 If you have a desktop machine then you should really be considering
183 the 'ondemand' governor instead, however if you are using a laptop,
184 PDA or even an AMD64 based computer (due to the unacceptable
185 step-by-step latency issues between the minimum and maximum frequency
186 transitions in the CPU) you will probably want to use this governor.
187
188 To compile this driver as a module, choose M here: the
189 module will be called cpufreq_conservative.
190
191 For details, take a look at linux/Documentation/cpu-freq.
192
193 If in doubt, say N.
194
195config CPU_FREQ_GOV_SCHEDUTIL
196 bool "'schedutil' cpufreq policy governor"
197 depends on CPU_FREQ && SMP
198 select CPU_FREQ_GOV_ATTR_SET
199 select IRQ_WORK
200 help
201 This governor makes decisions based on the utilization data provided
202 by the scheduler. It sets the CPU frequency to be proportional to
203 the utilization/capacity ratio coming from the scheduler. If the
204 utilization is frequency-invariant, the new frequency is also
205 proportional to the maximum available frequency. If that is not the
206 case, it is proportional to the current frequency of the CPU. The
207 frequency tipping point is at utilization/capacity equal to 80% in
208 both cases.
209
210 If in doubt, say N.
211
212comment "CPU frequency scaling drivers"
213
214config CPUFREQ_DT
215 tristate "Generic DT based cpufreq driver"
216 depends on HAVE_CLK && OF
217 # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
218 depends on !CPU_THERMAL || THERMAL
219 select CPUFREQ_DT_PLATDEV
220 select PM_OPP
221 help
222 This adds a generic DT based cpufreq driver for frequency management.
223 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
224 systems.
225
226 If in doubt, say N.
227
228config CPUFREQ_DT_PLATDEV
229 bool
230 help
231 This adds a generic DT based cpufreq platdev driver for frequency
232 management. This creates a 'cpufreq-dt' platform device, on the
233 supported platforms.
234
235 If in doubt, say N.
236
237config CPUFREQ_DUMMY
238 tristate "Dummy CPU frequency driver"
239 help
240 This option adds a generic dummy CPUfreq driver, which sets a fake
241 2-frequency table when initializing each policy and otherwise does
242 nothing.
243
244 If in doubt, say N
245
246if X86
247source "drivers/cpufreq/Kconfig.x86"
248endif
249
250if ARM || ARM64
251source "drivers/cpufreq/Kconfig.arm"
252endif
253
254if PPC32 || PPC64
255source "drivers/cpufreq/Kconfig.powerpc"
256endif
257
258if IA64
259config IA64_ACPI_CPUFREQ
260 tristate "ACPI Processor P-States driver"
261 depends on ACPI_PROCESSOR
262 help
263 This driver adds a CPUFreq driver which utilizes the ACPI
264 Processor Performance States.
265
266 For details, take a look at <file:Documentation/cpu-freq/>.
267
268 If in doubt, say N.
269endif
270
271if MIPS
272config BMIPS_CPUFREQ
273 tristate "BMIPS CPUfreq Driver"
274 help
275 This option adds a CPUfreq driver for BMIPS processors with
276 support for configurable CPU frequency.
277
278 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
279
280 If in doubt, say N.
281
282config LOONGSON2_CPUFREQ
283 tristate "Loongson2 CPUFreq Driver"
284 depends on LEMOTE_MACH2F
285 help
286 This option adds a CPUFreq driver for loongson processors which
287 support software configurable cpu frequency.
288
289 Loongson2F and it's successors support this feature.
290
291 For details, take a look at <file:Documentation/cpu-freq/>.
292
293 If in doubt, say N.
294
295config LOONGSON1_CPUFREQ
296 tristate "Loongson1 CPUFreq Driver"
297 depends on LOONGSON1_LS1B
298 help
299 This option adds a CPUFreq driver for loongson1 processors which
300 support software configurable cpu frequency.
301
302 For details, take a look at <file:Documentation/cpu-freq/>.
303
304 If in doubt, say N.
305endif
306
307if SPARC64
308config SPARC_US3_CPUFREQ
309 tristate "UltraSPARC-III CPU Frequency driver"
310 help
311 This adds the CPUFreq driver for UltraSPARC-III processors.
312
313 For details, take a look at <file:Documentation/cpu-freq>.
314
315 If in doubt, say N.
316
317config SPARC_US2E_CPUFREQ
318 tristate "UltraSPARC-IIe CPU Frequency driver"
319 help
320 This adds the CPUFreq driver for UltraSPARC-IIe processors.
321
322 For details, take a look at <file:Documentation/cpu-freq>.
323
324 If in doubt, say N.
325endif
326
327if SUPERH
328config SH_CPU_FREQ
329 tristate "SuperH CPU Frequency driver"
330 help
331 This adds the cpufreq driver for SuperH. Any CPU that supports
332 clock rate rounding through the clock framework can use this
333 driver. While it will make the kernel slightly larger, this is
334 harmless for CPUs that don't support rate rounding. The driver
335 will also generate a notice in the boot log before disabling
336 itself if the CPU in question is not capable of rate rounding.
337
338 For details, take a look at <file:Documentation/cpu-freq>.
339
340 If unsure, say N.
341endif
342
343config QORIQ_CPUFREQ
344 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
345 depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
346 depends on !CPU_THERMAL || THERMAL
347 select CLK_QORIQ
348 help
349 This adds the CPUFreq driver support for Freescale QorIQ SoCs
350 which are capable of changing the CPU's frequency dynamically.
351
352endif
353endmenu