diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-06-12 02:35:48 -0400 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2013-06-18 04:23:11 -0400 |
commit | dbb8d76e5ed9bb7f33a092f4aa5b28d8b1c872a4 (patch) | |
tree | db52de2f90211017ac35fe88b4e34a9a731f132f /drivers/cpufreq | |
parent | 6866cba3a4fe1d06d6c4493d5c9a8736db4c5459 (diff) |
cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
currently Tegra cpufreq driver gets built based on ARCH_TEGRA, which doesn't
depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
* Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm.
* Make that Kconfig option selct CPU_FREQ_TABLE.
* Make that Kconfig option be def_bool ARCH_TEGRA.
* Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that.
* Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's
cpufreq works the same way as all the other cpufreq drivers.
This patch does it.
Suggested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/Kconfig.arm | 8 | ||||
-rw-r--r-- | drivers/cpufreq/Makefile | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index d52261b22b55..5085427eb29d 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm | |||
@@ -154,3 +154,11 @@ config ARM_SPEAR_CPUFREQ | |||
154 | default y | 154 | default y |
155 | help | 155 | help |
156 | This adds the CPUFreq driver support for SPEAr SOCs. | 156 | This adds the CPUFreq driver support for SPEAr SOCs. |
157 | |||
158 | config ARM_TEGRA_CPUFREQ | ||
159 | bool "TEGRA CPUFreq support" | ||
160 | depends on ARCH_TEGRA | ||
161 | select CPU_FREQ_TABLE | ||
162 | default y | ||
163 | help | ||
164 | This adds the CPUFreq driver support for TEGRA SOCs. | ||
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 13c3f831d3dc..9c873e778ee0 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile | |||
@@ -71,7 +71,7 @@ obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o | |||
71 | obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o | 71 | obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o |
72 | obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o | 72 | obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o |
73 | obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o | 73 | obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o |
74 | obj-$(CONFIG_ARCH_TEGRA) += tegra-cpufreq.o | 74 | obj-$(CONFIG_ARM_TEGRA_CPUFREQ) += tegra-cpufreq.o |
75 | 75 | ||
76 | ################################################################################## | 76 | ################################################################################## |
77 | # PowerPC platform drivers | 77 | # PowerPC platform drivers |