summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/Kconfig
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2019-01-29 07:55:07 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-01-29 13:46:31 +0300
commitafa1f2ab43d48d0e1fa1bda524a0cf53e4cd6c87 (patch)
tree5b2e70efe058376f7d3a50c3c4b83b27e273d00f /drivers/cpufreq/Kconfig
parent625c85a62cb7d3c79f6e16de3cfa972033658250 (diff)
downloadlinux-afa1f2ab43d48d0e1fa1bda524a0cf53e4cd6c87.tar.xz
thermal: cpu_cooling: Require thermal core to be compiled in
The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq driver to register as a cooling device and cool down the platform by throttling the CPU frequency. In order to be able to auto-register a cpufreq driver as a cooling device from the cpufreq core, we need access to code inside cpu_cooling.c which, in turn, accesses code inside thermal core. CPU_FREQ is a bool while THERMAL is tristate. In some configurations (e.g. allmodconfig), CONFIG_THERMAL ends up as a module while CONFIG_CPU_FREQ is compiled in. This leads to following error: drivers/cpufreq/cpufreq.o: In function `cpufreq_offline': cpufreq.c:(.text+0x407c): undefined reference to `cpufreq_cooling_unregister' drivers/cpufreq/cpufreq.o: In function `cpufreq_online': cpufreq.c:(.text+0x70c0): undefined reference to `of_cpufreq_cooling_register' Given that platforms using CPU_THERMAL usually want it compiled-in so it is available early in boot, make CPU_THERMAL depend on THERMAL being compiled-in instead of allowing it to be a module. As a result of this change, get rid of the ugly (!CPU_THERMAL || THERMAL) dependency in all cpufreq drivers using CPU_THERMAL. Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/Kconfig')
-rw-r--r--drivers/cpufreq/Kconfig3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 608af20a3494..b22e6bba71f1 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -207,8 +207,6 @@ comment "CPU frequency scaling drivers"
config CPUFREQ_DT
tristate "Generic DT based cpufreq driver"
depends on HAVE_CLK && OF
- # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
- depends on !CPU_THERMAL || THERMAL
select CPUFREQ_DT_PLATDEV
select PM_OPP
help
@@ -327,7 +325,6 @@ endif
config QORIQ_CPUFREQ
tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
- depends on !CPU_THERMAL || THERMAL
select CLK_QORIQ
help
This adds the CPUFreq driver support for Freescale QorIQ SoCs