summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-01-31 13:35:18 -0500
committerEduardo Valentin <edubezval@gmail.com>2015-01-31 13:56:27 -0500
commit8b2b4a4e5366341d0d93607a3e035ced5fb918e6 (patch)
tree09f112c8b9cb798e550cc56f69e4cd2620bc9c6a /drivers/cpufreq
parent252454f5cbda2c6b40c5d36f58cac2938437b85d (diff)
cpufreq: exynos: allow modular build
The exynos cpufreq driver code recently gained a dependency on the cooling code, which may be a loadable module. This breaks an ARM allmodconfig build: drivers/built-in.o: In function `exynos_cpufreq_probe': :(.text+0x1748e8): undefined reference to `of_cpufreq_cooling_register' To avoid this problem, change cpufreq Kconfig to allow the drivers to be loadable modules as well and enforce a dependency on the thermal module. This change, in order to allow module builds on this cpufreq driver, properly constructs the driver into a single module, instead of several modules. The change also keeps the proper platform dependency, and therefore, it wont load in platforms that are not supposed to be loaded. The user will be able to build the support for all platforms, or select which platforms (s)he wants (as originally), except that now it can be a module, instead. Besides, it will still keep the driver only on those configs that expect it to be on. And it won't compile/load on platforms that it is not supposed to. It brings the config ARM_EXYNOS_CPU_FREQ_BOOST_SW closer to this driver, so it looks better in the menuconfig. We intentionally change ARM_EXYNOS5440_CPUFREQ to be tristate too, to avoid future troubles. Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Kukjin Kim <kgene@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-pm@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Fixes: e725d26c4857 ("cpufreq: exynos: Use device tree to determine if cpufreq cooling should be registered") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/Kconfig.arm44
-rw-r--r--drivers/cpufreq/Makefile9
2 files changed, 31 insertions, 22 deletions
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 0f9a2c3c0e0d..1b06fc4640e2 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -26,13 +26,21 @@ config ARM_VEXPRESS_SPC_CPUFREQ
26 26
27 27
28config ARM_EXYNOS_CPUFREQ 28config ARM_EXYNOS_CPUFREQ
29 bool 29 tristate "SAMSUNG EXYNOS CPUfreq Driver"
30 depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 || SOC_EXYNOS5250
31 depends on THERMAL
32 help
33 This adds the CPUFreq driver for Samsung EXYNOS platforms.
34 Supported SoC versions are:
35 Exynos4210, Exynos4212, Exynos4412, and Exynos5250.
36
37 If in doubt, say N.
30 38
31config ARM_EXYNOS4210_CPUFREQ 39config ARM_EXYNOS4210_CPUFREQ
32 bool "SAMSUNG EXYNOS4210" 40 bool "SAMSUNG EXYNOS4210"
33 depends on CPU_EXYNOS4210 41 depends on CPU_EXYNOS4210
42 depends on ARM_EXYNOS_CPUFREQ
34 default y 43 default y
35 select ARM_EXYNOS_CPUFREQ
36 help 44 help
37 This adds the CPUFreq driver for Samsung EXYNOS4210 45 This adds the CPUFreq driver for Samsung EXYNOS4210
38 SoC (S5PV310 or S5PC210). 46 SoC (S5PV310 or S5PC210).
@@ -42,8 +50,8 @@ config ARM_EXYNOS4210_CPUFREQ
42config ARM_EXYNOS4X12_CPUFREQ 50config ARM_EXYNOS4X12_CPUFREQ
43 bool "SAMSUNG EXYNOS4x12" 51 bool "SAMSUNG EXYNOS4x12"
44 depends on SOC_EXYNOS4212 || SOC_EXYNOS4412 52 depends on SOC_EXYNOS4212 || SOC_EXYNOS4412
53 depends on ARM_EXYNOS_CPUFREQ
45 default y 54 default y
46 select ARM_EXYNOS_CPUFREQ
47 help 55 help
48 This adds the CPUFreq driver for Samsung EXYNOS4X12 56 This adds the CPUFreq driver for Samsung EXYNOS4X12
49 SoC (EXYNOS4212 or EXYNOS4412). 57 SoC (EXYNOS4212 or EXYNOS4412).
@@ -53,28 +61,14 @@ config ARM_EXYNOS4X12_CPUFREQ
53config ARM_EXYNOS5250_CPUFREQ 61config ARM_EXYNOS5250_CPUFREQ
54 bool "SAMSUNG EXYNOS5250" 62 bool "SAMSUNG EXYNOS5250"
55 depends on SOC_EXYNOS5250 63 depends on SOC_EXYNOS5250
64 depends on ARM_EXYNOS_CPUFREQ
56 default y 65 default y
57 select ARM_EXYNOS_CPUFREQ
58 help 66 help
59 This adds the CPUFreq driver for Samsung EXYNOS5250 67 This adds the CPUFreq driver for Samsung EXYNOS5250
60 SoC. 68 SoC.
61 69
62 If in doubt, say N. 70 If in doubt, say N.
63 71
64config ARM_EXYNOS5440_CPUFREQ
65 bool "SAMSUNG EXYNOS5440"
66 depends on SOC_EXYNOS5440
67 depends on HAVE_CLK && OF
68 select PM_OPP
69 default y
70 help
71 This adds the CPUFreq driver for Samsung EXYNOS5440
72 SoC. The nature of exynos5440 clock controller is
73 different than previous exynos controllers so not using
74 the common exynos framework.
75
76 If in doubt, say N.
77
78config ARM_EXYNOS_CPU_FREQ_BOOST_SW 72config ARM_EXYNOS_CPU_FREQ_BOOST_SW
79 bool "EXYNOS Frequency Overclocking - Software" 73 bool "EXYNOS Frequency Overclocking - Software"
80 depends on ARM_EXYNOS_CPUFREQ && THERMAL 74 depends on ARM_EXYNOS_CPUFREQ && THERMAL
@@ -90,6 +84,20 @@ config ARM_EXYNOS_CPU_FREQ_BOOST_SW
90 84
91 If in doubt, say N. 85 If in doubt, say N.
92 86
87config ARM_EXYNOS5440_CPUFREQ
88 tristate "SAMSUNG EXYNOS5440"
89 depends on SOC_EXYNOS5440
90 depends on HAVE_CLK && OF
91 select PM_OPP
92 default y
93 help
94 This adds the CPUFreq driver for Samsung EXYNOS5440
95 SoC. The nature of exynos5440 clock controller is
96 different than previous exynos controllers so not using
97 the common exynos framework.
98
99 If in doubt, say N.
100
93config ARM_HIGHBANK_CPUFREQ 101config ARM_HIGHBANK_CPUFREQ
94 tristate "Calxeda Highbank-based" 102 tristate "Calxeda Highbank-based"
95 depends on ARCH_HIGHBANK && CPUFREQ_DT && REGULATOR 103 depends on ARCH_HIGHBANK && CPUFREQ_DT && REGULATOR
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index b3ca7b0b2c33..b26e2bf9cd93 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -51,10 +51,11 @@ obj-$(CONFIG_ARM_DT_BL_CPUFREQ) += arm_big_little_dt.o
51 51
52obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o 52obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o
53obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o 53obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o
54obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o 54obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += arm-exynos-cpufreq.o
55obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o 55arm-exynos-cpufreq-y := exynos-cpufreq.o
56obj-$(CONFIG_ARM_EXYNOS4X12_CPUFREQ) += exynos4x12-cpufreq.o 56arm-exynos-cpufreq-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o
57obj-$(CONFIG_ARM_EXYNOS5250_CPUFREQ) += exynos5250-cpufreq.o 57arm-exynos-cpufreq-$(CONFIG_ARM_EXYNOS4X12_CPUFREQ) += exynos4x12-cpufreq.o
58arm-exynos-cpufreq-$(CONFIG_ARM_EXYNOS5250_CPUFREQ) += exynos5250-cpufreq.o
58obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o 59obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o
59obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o 60obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o
60obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o 61obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o