blob: 4d2b33a30292a508453ea9458c43a01df1253af8 [file] [log] [blame]
Dave Jonesbb0a56e2011-05-19 18:51:07 -04001menu "CPU Frequency scaling"
2
Linus Torvalds1da177e2005-04-16 15:20:36 -07003config CPU_FREQ
4 bool "CPU Frequency scaling"
Pranith Kumar83fe27e2014-12-05 11:24:45 -05005 select SRCU
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 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
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010021config CPU_FREQ_GOV_ATTR_SET
22 bool
23
Larry Finger1e15f292012-12-29 01:55:20 +000024config CPU_FREQ_GOV_COMMON
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010025 select CPU_FREQ_GOV_ATTR_SET
Rafael J. Wysockie6f03652016-02-28 02:33:29 +010026 select IRQ_WORK
Larry Finger1e15f292012-12-29 01:55:20 +000027 bool
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029config CPU_FREQ_STAT
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020030 bool "CPU frequency transition statistics"
Mike Frysinger9101be52007-04-18 16:18:13 -040031 help
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020032 Export CPU frequency statistics information through sysfs.
Mike Frysinger9101be52007-04-18 16:18:13 -040033
34 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Linus Torvalds1da177e2005-04-16 15:20:36 -070036choice
37 prompt "Default CPUFreq governor"
Alexander Shiyan559f56c2013-05-05 12:18:08 +000038 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
40 help
41 This option sets which CPUFreq governor shall be loaded at
42 startup. If in doubt, select 'performance'.
43
44config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
45 bool "performance"
46 select CPU_FREQ_GOV_PERFORMANCE
47 help
48 Use the CPUFreq governor 'performance' as default. This sets
49 the frequency statically to the highest frequency supported by
50 the CPU.
51
Alessandro Guido30d221d2008-04-18 13:31:13 -070052config CPU_FREQ_DEFAULT_GOV_POWERSAVE
53 bool "powersave"
Alessandro Guido30d221d2008-04-18 13:31:13 -070054 select CPU_FREQ_GOV_POWERSAVE
55 help
56 Use the CPUFreq governor 'powersave' as default. This sets
57 the frequency statically to the lowest frequency supported by
58 the CPU.
59
Linus Torvalds1da177e2005-04-16 15:20:36 -070060config CPU_FREQ_DEFAULT_GOV_USERSPACE
61 bool "userspace"
62 select CPU_FREQ_GOV_USERSPACE
63 help
64 Use the CPUFreq governor 'userspace' as default. This allows
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +010065 you to set the CPU frequency manually or when a userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -070066 program shall be able to set the CPU dynamically without having
67 to enable the userspace governor manually.
68
Thomas Renninger1c256242007-10-02 13:28:12 -070069config CPU_FREQ_DEFAULT_GOV_ONDEMAND
70 bool "ondemand"
71 select CPU_FREQ_GOV_ONDEMAND
72 select CPU_FREQ_GOV_PERFORMANCE
73 help
74 Use the CPUFreq governor 'ondemand' as default. This allows
75 you to get a full dynamic frequency capable system by simply
76 loading your cpufreq low-level hardware driver.
77 Be aware that not all cpufreq drivers support the ondemand
78 governor. If unsure have a look at the help section of the
79 driver. Fallback governor will be the performance governor.
80
81config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
82 bool "conservative"
83 select CPU_FREQ_GOV_CONSERVATIVE
84 select CPU_FREQ_GOV_PERFORMANCE
85 help
86 Use the CPUFreq governor 'conservative' as default. This allows
87 you to get a full dynamic frequency capable system by simply
88 loading your cpufreq low-level hardware driver.
89 Be aware that not all cpufreq drivers support the conservative
90 governor. If unsure have a look at the help section of the
91 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020092
93config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
94 bool "schedutil"
Arnd Bergmanncfe94922016-05-11 14:52:01 +020095 depends on SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020096 select CPU_FREQ_GOV_SCHEDUTIL
97 select CPU_FREQ_GOV_PERFORMANCE
98 help
99 Use the 'schedutil' CPUFreq governor by default. If unsure,
100 have a look at the help section of that governor. The fallback
101 governor will be 'performance'.
102
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103endchoice
104
105config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400106 tristate "'performance' governor"
107 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 This cpufreq governor sets the frequency statically to the
109 highest available CPU frequency.
110
Mike Frysinger9101be52007-04-18 16:18:13 -0400111 To compile this driver as a module, choose M here: the
112 module will be called cpufreq_performance.
113
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114 If in doubt, say Y.
115
116config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400117 tristate "'powersave' governor"
118 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 This cpufreq governor sets the frequency statically to the
120 lowest available CPU frequency.
121
Mike Frysinger9101be52007-04-18 16:18:13 -0400122 To compile this driver as a module, choose M here: the
123 module will be called cpufreq_powersave.
124
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 If in doubt, say Y.
126
127config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400128 tristate "'userspace' governor for userspace frequency scaling"
129 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100131 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200133 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134
Mike Frysinger9101be52007-04-18 16:18:13 -0400135 To compile this driver as a module, choose M here: the
136 module will be called cpufreq_userspace.
137
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 For details, take a look at <file:Documentation/cpu-freq/>.
139
140 If in doubt, say Y.
141
142config CPU_FREQ_GOV_ONDEMAND
143 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000144 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145 help
146 'ondemand' - This driver adds a dynamic cpufreq policy governor.
147 The governor does a periodic polling and
148 changes frequency based on the CPU utilization.
149 The support for this governor depends on CPU capability to
150 do fast frequency switching (i.e, very low latency frequency
151 transitions).
152
Mike Frysinger9101be52007-04-18 16:18:13 -0400153 To compile this driver as a module, choose M here: the
154 module will be called cpufreq_ondemand.
155
Linus Torvalds1da177e2005-04-16 15:20:36 -0700156 For details, take a look at linux/Documentation/cpu-freq.
157
158 If in doubt, say N.
159
Dave Jonesb9170832005-05-31 19:03:47 -0700160config CPU_FREQ_GOV_CONSERVATIVE
161 tristate "'conservative' cpufreq governor"
162 depends on CPU_FREQ
Larry Finger1e15f292012-12-29 01:55:20 +0000163 select CPU_FREQ_GOV_COMMON
Dave Jonesb9170832005-05-31 19:03:47 -0700164 help
165 'conservative' - this driver is rather similar to the 'ondemand'
166 governor both in its source code and its purpose, the difference is
167 its optimisation for better suitability in a battery powered
168 environment. The frequency is gracefully increased and decreased
169 rather than jumping to 100% when speed is required.
170
171 If you have a desktop machine then you should really be considering
172 the 'ondemand' governor instead, however if you are using a laptop,
173 PDA or even an AMD64 based computer (due to the unacceptable
174 step-by-step latency issues between the minimum and maximum frequency
175 transitions in the CPU) you will probably want to use this governor.
176
Mike Frysinger9101be52007-04-18 16:18:13 -0400177 To compile this driver as a module, choose M here: the
178 module will be called cpufreq_conservative.
179
Dave Jonesb9170832005-05-31 19:03:47 -0700180 For details, take a look at linux/Documentation/cpu-freq.
181
182 If in doubt, say N.
183
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200184config CPU_FREQ_GOV_SCHEDUTIL
Rafael J. Wysocki58919e82016-08-16 22:14:55 +0200185 bool "'schedutil' cpufreq policy governor"
Rafael J. Wysockibf7cdff2016-05-06 15:00:38 +0200186 depends on CPU_FREQ && SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200187 select CPU_FREQ_GOV_ATTR_SET
188 select IRQ_WORK
189 help
190 This governor makes decisions based on the utilization data provided
191 by the scheduler. It sets the CPU frequency to be proportional to
192 the utilization/capacity ratio coming from the scheduler. If the
193 utilization is frequency-invariant, the new frequency is also
194 proportional to the maximum available frequency. If that is not the
195 case, it is proportional to the current frequency of the CPU. The
196 frequency tipping point is at utilization/capacity equal to 80% in
197 both cases.
198
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200199 If in doubt, say N.
200
Viresh Kumarf41f4812014-11-15 08:50:44 +0530201comment "CPU frequency scaling drivers"
202
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530203config CPUFREQ_DT
204 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530205 depends on HAVE_CLK && OF
Viresh Kumarf56aad12016-03-30 13:45:26 +0530206 select CPUFREQ_DT_PLATDEV
Mark Brown109df082013-12-11 22:12:27 +0000207 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000208 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530209 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000210 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
Viresh Kumar33cc4fc2016-09-09 16:48:07 +0530211 systems.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000212
213 If in doubt, say N.
214
Viresh Kumarf56aad12016-03-30 13:45:26 +0530215config CPUFREQ_DT_PLATDEV
216 bool
217 help
218 This adds a generic DT based cpufreq platdev driver for frequency
219 management. This creates a 'cpufreq-dt' platform device, on the
220 supported platforms.
221
222 If in doubt, say N.
223
Viresh Kumarf41f4812014-11-15 08:50:44 +0530224if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400225source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530226endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400227
Viresh Kumarf41f4812014-11-15 08:50:44 +0530228if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700229source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530230endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700231
Viresh Kumarf41f4812014-11-15 08:50:44 +0530232if PPC32 || PPC64
233source "drivers/cpufreq/Kconfig.powerpc"
234endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000235
Viresh Kumarf41f4812014-11-15 08:50:44 +0530236if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000237config IA64_ACPI_CPUFREQ
238 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000239 depends on ACPI_PROCESSOR
240 help
241 This driver adds a CPUFreq driver which utilizes the ACPI
242 Processor Performance States.
243
244 For details, take a look at <file:Documentation/cpu-freq/>.
245
246 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530247endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000248
Viresh Kumarf41f4812014-11-15 08:50:44 +0530249if MIPS
Markus Mayercdb56cb2017-02-07 13:58:55 -0800250config BMIPS_CPUFREQ
251 tristate "BMIPS CPUfreq Driver"
252 help
253 This option adds a CPUfreq driver for BMIPS processors with
254 support for configurable CPU frequency.
255
256 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
257
258 If in doubt, say N.
259
Viresh Kumar7a998932013-04-04 12:54:21 +0000260config LOONGSON2_CPUFREQ
261 tristate "Loongson2 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000262 depends on LEMOTE_MACH2F
Viresh Kumar7a998932013-04-04 12:54:21 +0000263 help
264 This option adds a CPUFreq driver for loongson processors which
265 support software configurable cpu frequency.
266
267 Loongson2F and it's successors support this feature.
268
269 For details, take a look at <file:Documentation/cpu-freq/>.
270
271 If in doubt, say N.
272
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800273config LOONGSON1_CPUFREQ
274 tristate "Loongson1 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000275 depends on LOONGSON1_LS1B
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800276 help
277 This option adds a CPUFreq driver for loongson1 processors which
278 support software configurable cpu frequency.
279
280 For details, take a look at <file:Documentation/cpu-freq/>.
281
282 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530283endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800284
Viresh Kumarf41f4812014-11-15 08:50:44 +0530285if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000286config SPARC_US3_CPUFREQ
287 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000288 help
289 This adds the CPUFreq driver for UltraSPARC-III processors.
290
291 For details, take a look at <file:Documentation/cpu-freq>.
292
293 If in doubt, say N.
294
295config SPARC_US2E_CPUFREQ
296 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000297 help
298 This adds the CPUFreq driver for UltraSPARC-IIe processors.
299
300 For details, take a look at <file:Documentation/cpu-freq>.
301
302 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530303endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000304
Viresh Kumarf41f4812014-11-15 08:50:44 +0530305if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000306config SH_CPU_FREQ
307 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000308 help
309 This adds the cpufreq driver for SuperH. Any CPU that supports
310 clock rate rounding through the clock framework can use this
311 driver. While it will make the kernel slightly larger, this is
312 harmless for CPUs that don't support rate rounding. The driver
313 will also generate a notice in the boot log before disabling
314 itself if the CPU in question is not capable of rate rounding.
315
316 For details, take a look at <file:Documentation/cpu-freq>.
317
318 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530319endif
Viresh Kumar72582672013-04-04 12:54:22 +0000320
Tang Yuantian2f249352015-03-13 12:39:02 +0800321config QORIQ_CPUFREQ
322 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
Tang Yuantian5026ac22017-02-09 10:33:01 +0800323 depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
Tang Yuantian2f249352015-03-13 12:39:02 +0800324 select CLK_QORIQ
325 help
326 This adds the CPUFreq driver support for Freescale QorIQ SoCs
327 which are capable of changing the CPU's frequency dynamically.
328
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400329endif
330endmenu