blob: 5d74826d75be80d9370e909851b9434c82664b30 [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
Lukasz Majewski2fb47192013-12-20 15:24:51 +010029config CPU_FREQ_BOOST_SW
30 bool
31 depends on THERMAL
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033config CPU_FREQ_STAT
Mike Frysinger9101be52007-04-18 16:18:13 -040034 tristate "CPU frequency translation statistics"
Mike Frysinger9101be52007-04-18 16:18:13 -040035 default y
36 help
37 This driver exports CPU frequency statistics information through sysfs
38 file system.
39
40 To compile this driver as a module, choose M here: the
41 module will be called cpufreq_stats.
42
43 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45config CPU_FREQ_STAT_DETAILS
Mike Frysinger9101be52007-04-18 16:18:13 -040046 bool "CPU frequency translation statistics details"
47 depends on CPU_FREQ_STAT
48 help
49 This will show detail CPU frequency translation table in sysfs file
50 system.
51
52 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054choice
55 prompt "Default CPUFreq governor"
Alexander Shiyan559f56c2013-05-05 12:18:08 +000056 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
Linus Torvalds1da177e2005-04-16 15:20:36 -070057 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
58 help
59 This option sets which CPUFreq governor shall be loaded at
60 startup. If in doubt, select 'performance'.
61
62config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
63 bool "performance"
64 select CPU_FREQ_GOV_PERFORMANCE
65 help
66 Use the CPUFreq governor 'performance' as default. This sets
67 the frequency statically to the highest frequency supported by
68 the CPU.
69
Alessandro Guido30d221d2008-04-18 13:31:13 -070070config CPU_FREQ_DEFAULT_GOV_POWERSAVE
71 bool "powersave"
Alessandro Guido30d221d2008-04-18 13:31:13 -070072 select CPU_FREQ_GOV_POWERSAVE
73 help
74 Use the CPUFreq governor 'powersave' as default. This sets
75 the frequency statically to the lowest frequency supported by
76 the CPU.
77
Linus Torvalds1da177e2005-04-16 15:20:36 -070078config CPU_FREQ_DEFAULT_GOV_USERSPACE
79 bool "userspace"
80 select CPU_FREQ_GOV_USERSPACE
81 help
82 Use the CPUFreq governor 'userspace' as default. This allows
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +010083 you to set the CPU frequency manually or when a userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 program shall be able to set the CPU dynamically without having
85 to enable the userspace governor manually.
86
Thomas Renninger1c256242007-10-02 13:28:12 -070087config CPU_FREQ_DEFAULT_GOV_ONDEMAND
88 bool "ondemand"
89 select CPU_FREQ_GOV_ONDEMAND
90 select CPU_FREQ_GOV_PERFORMANCE
91 help
92 Use the CPUFreq governor 'ondemand' as default. This allows
93 you to get a full dynamic frequency capable system by simply
94 loading your cpufreq low-level hardware driver.
95 Be aware that not all cpufreq drivers support the ondemand
96 governor. If unsure have a look at the help section of the
97 driver. Fallback governor will be the performance governor.
98
99config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
100 bool "conservative"
101 select CPU_FREQ_GOV_CONSERVATIVE
102 select CPU_FREQ_GOV_PERFORMANCE
103 help
104 Use the CPUFreq governor 'conservative' as default. This allows
105 you to get a full dynamic frequency capable system by simply
106 loading your cpufreq low-level hardware driver.
107 Be aware that not all cpufreq drivers support the conservative
108 governor. If unsure have a look at the help section of the
109 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200110
111config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
112 bool "schedutil"
113 select CPU_FREQ_GOV_SCHEDUTIL
114 select CPU_FREQ_GOV_PERFORMANCE
115 help
116 Use the 'schedutil' CPUFreq governor by default. If unsure,
117 have a look at the help section of that governor. The fallback
118 governor will be 'performance'.
119
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120endchoice
121
122config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400123 tristate "'performance' governor"
124 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 This cpufreq governor sets the frequency statically to the
126 highest available CPU frequency.
127
Mike Frysinger9101be52007-04-18 16:18:13 -0400128 To compile this driver as a module, choose M here: the
129 module will be called cpufreq_performance.
130
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 If in doubt, say Y.
132
133config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400134 tristate "'powersave' governor"
135 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136 This cpufreq governor sets the frequency statically to the
137 lowest available CPU frequency.
138
Mike Frysinger9101be52007-04-18 16:18:13 -0400139 To compile this driver as a module, choose M here: the
140 module will be called cpufreq_powersave.
141
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 If in doubt, say Y.
143
144config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400145 tristate "'userspace' governor for userspace frequency scaling"
146 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100148 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200150 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151
Mike Frysinger9101be52007-04-18 16:18:13 -0400152 To compile this driver as a module, choose M here: the
153 module will be called cpufreq_userspace.
154
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155 For details, take a look at <file:Documentation/cpu-freq/>.
156
157 If in doubt, say Y.
158
159config CPU_FREQ_GOV_ONDEMAND
160 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000161 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162 help
163 'ondemand' - This driver adds a dynamic cpufreq policy governor.
164 The governor does a periodic polling and
165 changes frequency based on the CPU utilization.
166 The support for this governor depends on CPU capability to
167 do fast frequency switching (i.e, very low latency frequency
168 transitions).
169
Mike Frysinger9101be52007-04-18 16:18:13 -0400170 To compile this driver as a module, choose M here: the
171 module will be called cpufreq_ondemand.
172
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173 For details, take a look at linux/Documentation/cpu-freq.
174
175 If in doubt, say N.
176
Dave Jonesb9170832005-05-31 19:03:47 -0700177config CPU_FREQ_GOV_CONSERVATIVE
178 tristate "'conservative' cpufreq governor"
179 depends on CPU_FREQ
Larry Finger1e15f292012-12-29 01:55:20 +0000180 select CPU_FREQ_GOV_COMMON
Dave Jonesb9170832005-05-31 19:03:47 -0700181 help
182 'conservative' - this driver is rather similar to the 'ondemand'
183 governor both in its source code and its purpose, the difference is
184 its optimisation for better suitability in a battery powered
185 environment. The frequency is gracefully increased and decreased
186 rather than jumping to 100% when speed is required.
187
188 If you have a desktop machine then you should really be considering
189 the 'ondemand' governor instead, however if you are using a laptop,
190 PDA or even an AMD64 based computer (due to the unacceptable
191 step-by-step latency issues between the minimum and maximum frequency
192 transitions in the CPU) you will probably want to use this governor.
193
Mike Frysinger9101be52007-04-18 16:18:13 -0400194 To compile this driver as a module, choose M here: the
195 module will be called cpufreq_conservative.
196
Dave Jonesb9170832005-05-31 19:03:47 -0700197 For details, take a look at linux/Documentation/cpu-freq.
198
199 If in doubt, say N.
200
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200201config CPU_FREQ_GOV_SCHEDUTIL
202 tristate "'schedutil' cpufreq policy governor"
203 depends on CPU_FREQ
204 select CPU_FREQ_GOV_ATTR_SET
205 select IRQ_WORK
206 help
207 This governor makes decisions based on the utilization data provided
208 by the scheduler. It sets the CPU frequency to be proportional to
209 the utilization/capacity ratio coming from the scheduler. If the
210 utilization is frequency-invariant, the new frequency is also
211 proportional to the maximum available frequency. If that is not the
212 case, it is proportional to the current frequency of the CPU. The
213 frequency tipping point is at utilization/capacity equal to 80% in
214 both cases.
215
216 To compile this driver as a module, choose M here: the module will
217 be called cpufreq_schedutil.
218
219 If in doubt, say N.
220
Viresh Kumarf41f4812014-11-15 08:50:44 +0530221comment "CPU frequency scaling drivers"
222
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530223config CPUFREQ_DT
224 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530225 depends on HAVE_CLK && OF
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530226 # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
Arnd Bergmann217886d2014-06-13 10:40:32 +0200227 depends on !CPU_THERMAL || THERMAL
Mark Brown109df082013-12-11 22:12:27 +0000228 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000229 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530230 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000231 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
232 systems which share clock and voltage across all CPUs.
233
234 If in doubt, say N.
235
Viresh Kumarf41f4812014-11-15 08:50:44 +0530236if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400237source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530238endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400239
Viresh Kumarf41f4812014-11-15 08:50:44 +0530240if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700241source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530242endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700243
Viresh Kumarf41f4812014-11-15 08:50:44 +0530244if PPC32 || PPC64
245source "drivers/cpufreq/Kconfig.powerpc"
246endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000247
Viresh Kumarf41f4812014-11-15 08:50:44 +0530248if AVR32
Viresh Kumar81c720c2013-04-04 12:54:17 +0000249config AVR32_AT32AP_CPUFREQ
250 bool "CPU frequency driver for AT32AP"
251 depends on PLATFORM_AT32AP
252 default n
253 help
254 This enables the CPU frequency driver for AT32AP processors.
255 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530256endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000257
Viresh Kumarf41f4812014-11-15 08:50:44 +0530258if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000259config IA64_ACPI_CPUFREQ
260 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000261 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.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530269endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000270
Viresh Kumarf41f4812014-11-15 08:50:44 +0530271if MIPS
Viresh Kumar7a998932013-04-04 12:54:21 +0000272config LOONGSON2_CPUFREQ
273 tristate "Loongson2 CPUFreq Driver"
Viresh Kumar7a998932013-04-04 12:54:21 +0000274 help
275 This option adds a CPUFreq driver for loongson processors which
276 support software configurable cpu frequency.
277
278 Loongson2F and it's successors support this feature.
279
280 For details, take a look at <file:Documentation/cpu-freq/>.
281
282 If in doubt, say N.
283
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800284config LOONGSON1_CPUFREQ
285 tristate "Loongson1 CPUFreq Driver"
286 help
287 This option adds a CPUFreq driver for loongson1 processors which
288 support software configurable cpu frequency.
289
290 For details, take a look at <file:Documentation/cpu-freq/>.
291
292 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530293endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800294
Viresh Kumarf41f4812014-11-15 08:50:44 +0530295if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000296config SPARC_US3_CPUFREQ
297 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000298 help
299 This adds the CPUFreq driver for UltraSPARC-III processors.
300
301 For details, take a look at <file:Documentation/cpu-freq>.
302
303 If in doubt, say N.
304
305config SPARC_US2E_CPUFREQ
306 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000307 help
308 This adds the CPUFreq driver for UltraSPARC-IIe processors.
309
310 For details, take a look at <file:Documentation/cpu-freq>.
311
312 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530313endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000314
Viresh Kumarf41f4812014-11-15 08:50:44 +0530315if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000316config SH_CPU_FREQ
317 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000318 help
319 This adds the cpufreq driver for SuperH. Any CPU that supports
320 clock rate rounding through the clock framework can use this
321 driver. While it will make the kernel slightly larger, this is
322 harmless for CPUs that don't support rate rounding. The driver
323 will also generate a notice in the boot log before disabling
324 itself if the CPU in question is not capable of rate rounding.
325
326 For details, take a look at <file:Documentation/cpu-freq>.
327
328 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530329endif
Viresh Kumar72582672013-04-04 12:54:22 +0000330
Tang Yuantian2f249352015-03-13 12:39:02 +0800331config QORIQ_CPUFREQ
332 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
333 depends on OF && COMMON_CLK && (PPC_E500MC || ARM)
Arnd Bergmannddd30ef2016-02-29 17:04:20 +0100334 depends on !CPU_THERMAL || THERMAL
Tang Yuantian2f249352015-03-13 12:39:02 +0800335 select CLK_QORIQ
336 help
337 This adds the CPUFreq driver support for Freescale QorIQ SoCs
338 which are capable of changing the CPU's frequency dynamically.
339
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400340endif
341endmenu