linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] CPUFreq Kconfig fixes
@ 2013-06-12  8:15 Viresh Kumar
  2013-06-12  8:15 ` [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ Viresh Kumar
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar

Hi Rafael,

Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but
haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the
places where it should be selected and where it shouldn't be. These are fixes
around that.

I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull
request separately once I get some Acks (will wait for few days).

Viresh Kumar (11):
  cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
  cpufreq: cris: select CPU_FREQ_TABLE
  cpufreq: davinci: select CPU_FREQ_TABLE
  cpufreq: exynos: select CPU_FREQ_TABLE
  cpufreq: highbank: remove select CPU_FREQ_TABLE
  cpufreq: imx: select CPU_FREQ_TABLE
  cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
  cpufreq: pxa: select CPU_FREQ_TABLE
  cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE

 arch/arm/mach-davinci/Kconfig   | 1 +
 arch/arm/mach-pxa/Kconfig       | 3 +++
 arch/arm/mach-tegra/Kconfig     | 4 +---
 arch/cris/Kconfig               | 2 ++
 drivers/cpufreq/Kconfig.arm     | 6 +++++-
 drivers/cpufreq/Kconfig.powerpc | 1 +
 drivers/cpufreq/Kconfig.x86     | 1 +
 drivers/cpufreq/Makefile        | 2 +-
 8 files changed, 15 insertions(+), 5 deletions(-)

-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-17  4:39   ` [uclinux-dist-devel] " Mike Frysinger
  2013-06-12  8:15 ` [PATCH 02/11] cpufreq: cris: select CPU_FREQ_TABLE Viresh Kumar
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Steven Miao, uclinux-dist-devel

By mistake blackfin's cpufreq driver is enabled when CONFIG_BLACKFIN was
present, whereas it should have been enabled only when CONFIG_BFIN_CPU_FREQ is
present.

Fix it.

Cc: Steven Miao <realmz6@gmail.com>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 315b923..13c3f83 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -83,7 +83,7 @@ obj-$(CONFIG_CPU_FREQ_MAPLE)		+= maple-cpufreq.o
 ##################################################################################
 # Other platform drivers
 obj-$(CONFIG_AVR32_AT32AP_CPUFREQ)	+= at32ap-cpufreq.o
-obj-$(CONFIG_BLACKFIN)			+= blackfin-cpufreq.o
+obj-$(CONFIG_BFIN_CPU_FREQ)		+= blackfin-cpufreq.o
 obj-$(CONFIG_CRIS_MACH_ARTPEC3)		+= cris-artpec3-cpufreq.o
 obj-$(CONFIG_ETRAXFS)			+= cris-etraxfs-cpufreq.o
 obj-$(CONFIG_IA64_ACPI_CPUFREQ)		+= ia64-acpi-cpufreq.o
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 02/11] cpufreq: cris: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
  2013-06-12  8:15 ` [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  8:15 ` [PATCH 03/11] cpufreq: davinci: " Viresh Kumar
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	linux-cris-kernel

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/cris/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 8769a90..5f7530c 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -134,11 +134,13 @@ config SVINTO_SIM
 
 config ETRAXFS
 	bool "ETRAX-FS-V32"
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Support CRIS V32.
 
 config CRIS_MACH_ARTPEC3
         bool "ARTPEC-3"
+	select CPU_FREQ_TABLE if CPU_FREQ
         help
           Support Axis ARTPEC-3.
 
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 03/11] cpufreq: davinci: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
  2013-06-12  8:15 ` [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ Viresh Kumar
  2013-06-12  8:15 ` [PATCH 02/11] cpufreq: cris: select CPU_FREQ_TABLE Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  8:15 ` [PATCH 04/11] cpufreq: exynos: " Viresh Kumar
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Sekhar Nori

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index a075b3e..e026b19 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -40,6 +40,7 @@ config ARCH_DAVINCI_DA850
 	bool "DA850/OMAP-L138/AM18x based system"
 	select ARCH_DAVINCI_DA8XX
 	select ARCH_HAS_CPUFREQ
+	select CPU_FREQ_TABLE
 	select CP_INTC
 
 config ARCH_DAVINCI_DA8XX
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 04/11] cpufreq: exynos: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (2 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 03/11] cpufreq: davinci: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  8:15 ` [PATCH 05/11] cpufreq: highbank: remove " Viresh Kumar
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Kukjin Kim

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.arm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 6e57543..9d7e209 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -18,6 +18,7 @@ config ARM_DT_BL_CPUFREQ
 config ARM_EXYNOS_CPUFREQ
 	bool "SAMSUNG EXYNOS SoCs"
 	depends on ARCH_EXYNOS
+	select CPU_FREQ_TABLE
 	default y
 	help
 	  This adds the CPUFreq driver common part for Samsung
@@ -46,6 +47,7 @@ config ARM_EXYNOS5250_CPUFREQ
 config ARM_EXYNOS5440_CPUFREQ
 	def_bool SOC_EXYNOS5440
 	depends on HAVE_CLK && PM_OPP && OF
+	select CPU_FREQ_TABLE
 	help
 	  This adds the CPUFreq driver for Samsung EXYNOS5440
 	  SoC. The nature of exynos5440 clock controller is
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 05/11] cpufreq: highbank: remove select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (3 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 04/11] cpufreq: exynos: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12 17:04   ` Mark Langsdorf
  2013-06-12  8:15 ` [PATCH 06/11] cpufreq: imx: " Viresh Kumar
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Mark Langsdorf

Highbank cpufreq driver doesn't use any APIs from freq_table.c and so must not
select CPU_FREQ_TABLE.

Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.arm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 9d7e209..891dd1c 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -57,7 +57,6 @@ config ARM_EXYNOS5440_CPUFREQ
 config ARM_HIGHBANK_CPUFREQ
 	tristate "Calxeda Highbank-based"
 	depends on ARCH_HIGHBANK
-	select CPU_FREQ_TABLE
 	select GENERIC_CPUFREQ_CPU0
 	select PM_OPP
 	select REGULATOR
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 06/11] cpufreq: imx: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (4 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 05/11] cpufreq: highbank: remove " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12 11:38   ` Shawn Guo
  2013-06-12  8:15 ` [PATCH 07/11] cpufreq: powerpc: CBE_RAS: " Viresh Kumar
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Shawn Guo

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.arm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 891dd1c..dc26303 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -72,6 +72,7 @@ config ARM_IMX6Q_CPUFREQ
 	tristate "Freescale i.MX6Q cpufreq support"
 	depends on SOC_IMX6Q
 	depends on REGULATOR_ANATOP
+	select CPU_FREQ_TABLE
 	help
 	  This adds cpufreq driver support for Freescale i.MX6Q SOC.
 
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/11] cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (5 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 06/11] cpufreq: imx: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  8:15 ` [PATCH 08/11] cpufreq: pxa: " Viresh Kumar
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	linuxppc-dev

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.powerpc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/Kconfig.powerpc b/drivers/cpufreq/Kconfig.powerpc
index 9c926ca..68c1abc 100644
--- a/drivers/cpufreq/Kconfig.powerpc
+++ b/drivers/cpufreq/Kconfig.powerpc
@@ -1,6 +1,7 @@
 config CPU_FREQ_CBE
 	tristate "CBE frequency scaling"
 	depends on CBE_RAS && PPC_CELL
+	select CPU_FREQ_TABLE
 	default m
 	help
 	  This adds the cpufreq driver for Cell BE processors.
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 08/11] cpufreq: pxa: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (6 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 07/11] cpufreq: powerpc: CBE_RAS: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  8:15 ` [PATCH 09/11] cpufreq: S3C2416/S3C64XX: " Viresh Kumar
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Eric Miao

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-pxa/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 96100db..a842711 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -615,12 +615,14 @@ endmenu
 config PXA25x
 	bool
 	select CPU_XSCALE
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Select code specific to PXA21x/25x/26x variants
 
 config PXA27x
 	bool
 	select CPU_XSCALE
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Select code specific to PXA27x variants
 
@@ -633,6 +635,7 @@ config CPU_PXA26x
 config PXA3xx
 	bool
 	select CPU_XSC3
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Select code specific to PXA3xx variants
 
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 09/11] cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (7 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 08/11] cpufreq: pxa: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12  9:11   ` Heiko Stübner
  2013-06-12  8:15 ` [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA Viresh Kumar
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Heiko Stuebner

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.arm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index dc26303..d52261b 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -101,6 +101,7 @@ config ARM_OMAP2PLUS_CPUFREQ
 config ARM_S3C2416_CPUFREQ
 	bool "S3C2416 CPU Frequency scaling support"
 	depends on CPU_S3C2416
+	select CPU_FREQ_TABLE
 	help
 	  This adds the CPUFreq driver for the Samsung S3C2416 and
 	  S3C2450 SoC. The S3C2416 supports changing the rate of the
@@ -123,6 +124,7 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE
 config ARM_S3C64XX_CPUFREQ
 	bool "Samsung S3C64XX"
 	depends on CPU_S3C6410
+	select CPU_FREQ_TABLE
 	default y
 	help
 	  This adds the CPUFreq driver for Samsung S3C6410 SoC.
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (8 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 09/11] cpufreq: S3C2416/S3C64XX: " Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12 15:50   ` Stephen Warren
  2013-06-12  8:15 ` [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE Viresh Kumar
  2013-06-12 12:46 ` [PATCH 00/11] CPUFreq Kconfig fixes Arnd Bergmann
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Stephen Warren

ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants
of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver
uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.

This also removes select CPU_FREQ_TABLE from individual tegra variants.

Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-tegra/Kconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc..3636b6c 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -6,6 +6,7 @@ config ARCH_TEGRA
 	select CLKSRC_MMIO
 	select CLKSRC_OF
 	select COMMON_CLK
+	select CPU_FREQ_TABLE
 	select GENERIC_CLOCKEVENTS
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if LOCAL_TIMERS
@@ -28,7 +29,6 @@ config ARCH_TEGRA_2x_SOC
 	select ARM_ERRATA_754327 if SMP
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA20
@@ -46,7 +46,6 @@ config ARCH_TEGRA_3x_SOC
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA30
@@ -63,7 +62,6 @@ config ARCH_TEGRA_114_SOC
 	select ARM_ARCH_TIMER
 	select ARM_GIC
 	select ARM_L1_CACHE_SHIFT_6
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA114
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (9 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA Viresh Kumar
@ 2013-06-12  8:15 ` Viresh Kumar
  2013-06-12 14:23   ` Jacob Shin
  2013-06-12 12:46 ` [PATCH 00/11] CPUFreq Kconfig fixes Arnd Bergmann
  11 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12  8:15 UTC (permalink / raw)
  To: rjw
  Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Viresh Kumar,
	Jacob Shin

This CPUFreq driver uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/Kconfig.x86 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index 6bd63d6..e2b6eab 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -132,6 +132,7 @@ config X86_POWERNOW_K8
 config X86_AMD_FREQ_SENSITIVITY
 	tristate "AMD frequency sensitivity feedback powersave bias"
 	depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD
+	select CPU_FREQ_TABLE
 	help
 	  This adds AMD-specific powersave bias function to the ondemand
 	  governor, which allows it to make more power-conscious frequency
-- 
1.7.12.rc2.18.g61b472e

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 09/11] cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  2013-06-12  8:15 ` [PATCH 09/11] cpufreq: S3C2416/S3C64XX: " Viresh Kumar
@ 2013-06-12  9:11   ` Heiko Stübner
  0 siblings, 0 replies; 25+ messages in thread
From: Heiko Stübner @ 2013-06-12  9:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd

Am Mittwoch, 12. Juni 2013, 10:15:16 schrieb Viresh Kumar:
> CPUFreq driver of this platform uses APIs from freq_table.c and so must
> select CPU_FREQ_TABLE.
> 
> Cc: Heiko Stuebner <heiko@sntech.de>

For the s3c2416-part
Acked-by: Heiko Stuebner <heiko@sntech.de>

> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/Kconfig.arm | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index dc26303..d52261b 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -101,6 +101,7 @@ config ARM_OMAP2PLUS_CPUFREQ
>  config ARM_S3C2416_CPUFREQ
>  	bool "S3C2416 CPU Frequency scaling support"
>  	depends on CPU_S3C2416
> +	select CPU_FREQ_TABLE
>  	help
>  	  This adds the CPUFreq driver for the Samsung S3C2416 and
>  	  S3C2450 SoC. The S3C2416 supports changing the rate of the
> @@ -123,6 +124,7 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE
>  config ARM_S3C64XX_CPUFREQ
>  	bool "Samsung S3C64XX"
>  	depends on CPU_S3C6410
> +	select CPU_FREQ_TABLE
>  	default y
>  	help
>  	  This adds the CPUFreq driver for Samsung S3C6410 SoC.


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 06/11] cpufreq: imx: select CPU_FREQ_TABLE
  2013-06-12  8:15 ` [PATCH 06/11] cpufreq: imx: " Viresh Kumar
@ 2013-06-12 11:38   ` Shawn Guo
  0 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2013-06-12 11:38 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd

On Wed, Jun 12, 2013 at 01:45:13PM +0530, Viresh Kumar wrote:
> CPUFreq driver of this platform uses APIs from freq_table.c and so must select
> CPU_FREQ_TABLE.
> 
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Shawn Guo <shawn.guo@linaro.org>

> ---
>  drivers/cpufreq/Kconfig.arm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 891dd1c..dc26303 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -72,6 +72,7 @@ config ARM_IMX6Q_CPUFREQ
>  	tristate "Freescale i.MX6Q cpufreq support"
>  	depends on SOC_IMX6Q
>  	depends on REGULATOR_ANATOP
> +	select CPU_FREQ_TABLE
>  	help
>  	  This adds cpufreq driver support for Freescale i.MX6Q SOC.
>  
> -- 
> 1.7.12.rc2.18.g61b472e
> 


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/11] CPUFreq Kconfig fixes
  2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
                   ` (10 preceding siblings ...)
  2013-06-12  8:15 ` [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE Viresh Kumar
@ 2013-06-12 12:46 ` Arnd Bergmann
  2013-06-12 14:28   ` Viresh Kumar
  11 siblings, 1 reply; 25+ messages in thread
From: Arnd Bergmann @ 2013-06-12 12:46 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan

On Wednesday 12 June 2013, Viresh Kumar wrote:
> Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but
> haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the
> places where it should be selected and where it shouldn't be. These are fixes
> around that.
> 
> I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull
> request separately once I get some Acks (will wait for few days).

Acked-by: Arnd Bergmann <arnd@arndb.de>

I don't see a patch for big.LITTLE in either linux-next or this series. Did you
miss that or has it just not made into linux-next yet?

	Arnd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
  2013-06-12  8:15 ` [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE Viresh Kumar
@ 2013-06-12 14:23   ` Jacob Shin
  0 siblings, 0 replies; 25+ messages in thread
From: Jacob Shin @ 2013-06-12 14:23 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd

On Wed, Jun 12, 2013 at 01:45:18PM +0530, Viresh Kumar wrote:
> This CPUFreq driver uses APIs from freq_table.c and so must select
> CPU_FREQ_TABLE.
> 

Ah, thanks for cathcing this!

> Cc: Jacob Shin <jacob.shin@amd.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Jacob Shin <jacob.shin@amd.com>

> ---
>  drivers/cpufreq/Kconfig.x86 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
> index 6bd63d6..e2b6eab 100644
> --- a/drivers/cpufreq/Kconfig.x86
> +++ b/drivers/cpufreq/Kconfig.x86
> @@ -132,6 +132,7 @@ config X86_POWERNOW_K8
>  config X86_AMD_FREQ_SENSITIVITY
>  	tristate "AMD frequency sensitivity feedback powersave bias"
>  	depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD
> +	select CPU_FREQ_TABLE
>  	help
>  	  This adds AMD-specific powersave bias function to the ondemand
>  	  governor, which allows it to make more power-conscious frequency
> -- 
> 1.7.12.rc2.18.g61b472e
> 
> 


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/11] CPUFreq Kconfig fixes
  2013-06-12 12:46 ` [PATCH 00/11] CPUFreq Kconfig fixes Arnd Bergmann
@ 2013-06-12 14:28   ` Viresh Kumar
  2013-06-12 14:49     ` Arnd Bergmann
  0 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-12 14:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan

On 12 June 2013 18:16, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 12 June 2013, Viresh Kumar wrote:
>> Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but
>> haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the
>> places where it should be selected and where it shouldn't be. These are fixes
>> around that.
>>
>> I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull
>> request separately once I get some Acks (will wait for few days).
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> I don't see a patch for big.LITTLE in either linux-next or this series. Did you
> miss that or has it just not made into linux-next yet?

My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't
you saw that.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/11] CPUFreq Kconfig fixes
  2013-06-12 14:28   ` Viresh Kumar
@ 2013-06-12 14:49     ` Arnd Bergmann
  2013-06-12 22:55       ` Rafael J. Wysocki
  0 siblings, 1 reply; 25+ messages in thread
From: Arnd Bergmann @ 2013-06-12 14:49 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan

On Wednesday 12 June 2013, Viresh Kumar wrote:
> 
> On 12 June 2013 18:16, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Wednesday 12 June 2013, Viresh Kumar wrote:
> >> Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but
> >> haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the
> >> places where it should be selected and where it shouldn't be. These are fixes
> >> around that.
> >>
> >> I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull
> >> request separately once I get some Acks (will wait for few days).
> >
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> >
> > I don't see a patch for big.LITTLE in either linux-next or this series. Did you
> > miss that or has it just not made into linux-next yet?
> 
> My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't
> you saw that.


Ah, it seems we haven't had a new linux-next since friday.

	Arnd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  2013-06-12  8:15 ` [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA Viresh Kumar
@ 2013-06-12 15:50   ` Stephen Warren
  2013-06-13  4:24     ` Viresh Kumar
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Warren @ 2013-06-12 15:50 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Stephen Warren

On 06/12/2013 02:15 AM, Viresh Kumar wrote:
> ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants
> of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver
> uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
> 
> This also removes select CPU_FREQ_TABLE from individual tegra variants.

I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c 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.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 05/11] cpufreq: highbank: remove select CPU_FREQ_TABLE
  2013-06-12  8:15 ` [PATCH 05/11] cpufreq: highbank: remove " Viresh Kumar
@ 2013-06-12 17:04   ` Mark Langsdorf
  0 siblings, 0 replies; 25+ messages in thread
From: Mark Langsdorf @ 2013-06-12 17:04 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd

On 06/12/2013 03:15 AM, Viresh Kumar wrote:
> Highbank cpufreq driver doesn't use any APIs from freq_table.c and so must not
> select CPU_FREQ_TABLE.
> 
> Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Thanks for catching this.

Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com>

> ---
>  drivers/cpufreq/Kconfig.arm | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 9d7e209..891dd1c 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -57,7 +57,6 @@ config ARM_EXYNOS5440_CPUFREQ
>  config ARM_HIGHBANK_CPUFREQ
>  	tristate "Calxeda Highbank-based"
>  	depends on ARCH_HIGHBANK
> -	select CPU_FREQ_TABLE
>  	select GENERIC_CPUFREQ_CPU0
>  	select PM_OPP
>  	select REGULATOR
> 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/11] CPUFreq Kconfig fixes
  2013-06-12 14:49     ` Arnd Bergmann
@ 2013-06-12 22:55       ` Rafael J. Wysocki
  0 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2013-06-12 22:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Viresh Kumar, linaro-kernel, patches, cpufreq, linux-pm,
	linux-kernel, robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan

On Wednesday, June 12, 2013 04:49:41 PM Arnd Bergmann wrote:
> On Wednesday 12 June 2013, Viresh Kumar wrote:
> > 
> > On 12 June 2013 18:16, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Wednesday 12 June 2013, Viresh Kumar wrote:
> > >> Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but
> > >> haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the
> > >> places where it should be selected and where it shouldn't be. These are fixes
> > >> around that.
> > >>
> > >> I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull
> > >> request separately once I get some Acks (will wait for few days).
> > >
> > > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > >
> > > I don't see a patch for big.LITTLE in either linux-next or this series. Did you
> > > miss that or has it just not made into linux-next yet?
> > 
> > My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't
> > you saw that.
> 
> 
> Ah, it seems we haven't had a new linux-next since friday.

Yup, no linux-next this week.

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  2013-06-12 15:50   ` Stephen Warren
@ 2013-06-13  4:24     ` Viresh Kumar
  2013-06-13 15:43       ` Stephen Warren
  0 siblings, 1 reply; 25+ messages in thread
From: Viresh Kumar @ 2013-06-13  4:24 UTC (permalink / raw)
  To: Stephen Warren
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Stephen Warren

[-- Attachment #1: Type: text/plain, Size: 4324 bytes --]

On 12 June 2013 21:20, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 06/12/2013 02:15 AM, Viresh Kumar wrote:
>> ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants
>> of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver
>> uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
>>
>> This also removes select CPU_FREQ_TABLE from individual tegra variants.
>
> I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c 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.

Hmmm. check this out (attached too for you to test):

----------x---------------x------------

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Wed, 12 Jun 2013 12:05:48 +0530
Subject: [PATCH] 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>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-tegra/Kconfig | 3 ---
 drivers/cpufreq/Kconfig.arm | 8 ++++++++
 drivers/cpufreq/Makefile    | 2 +-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc..5c0db06 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -28,7 +28,6 @@ config ARCH_TEGRA_2x_SOC
 	select ARM_ERRATA_754327 if SMP
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA20
@@ -46,7 +45,6 @@ config ARCH_TEGRA_3x_SOC
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA30
@@ -63,7 +61,6 @@ config ARCH_TEGRA_114_SOC
 	select ARM_ARCH_TIMER
 	select ARM_GIC
 	select ARM_L1_CACHE_SHIFT_6
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA114
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index d52261b..5085427 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -154,3 +154,11 @@ config ARM_SPEAR_CPUFREQ
 	default y
 	help
 	  This adds the CPUFreq driver support for SPEAr SOCs.
+
+config ARM_TEGRA_CPUFREQ
+	bool "TEGRA CPUFreq support"
+	depends on ARCH_TEGRA
+	select CPU_FREQ_TABLE
+	default y
+	help
+	  This adds the CPUFreq driver support for TEGRA SOCs.
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 13c3f83..9c873e7 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -71,7 +71,7 @@ obj-$(CONFIG_ARM_S5PV210_CPUFREQ)	+= s5pv210-cpufreq.o
 obj-$(CONFIG_ARM_SA1100_CPUFREQ)	+= sa1100-cpufreq.o
 obj-$(CONFIG_ARM_SA1110_CPUFREQ)	+= sa1110-cpufreq.o
 obj-$(CONFIG_ARM_SPEAR_CPUFREQ)		+= spear-cpufreq.o
-obj-$(CONFIG_ARCH_TEGRA)		+= tegra-cpufreq.o
+obj-$(CONFIG_ARM_TEGRA_CPUFREQ)		+= tegra-cpufreq.o

 ##################################################################################
 # PowerPC platform drivers

[-- Attachment #2: 0001-cpufreq-tegra-create-CONFIG_ARM_TEGRA_CPUFREQ.patch --]
[-- Type: application/octet-stream, Size: 3240 bytes --]

From 389d76878ec1d6eb5383cb6accf5933f35e1bb1a Mon Sep 17 00:00:00 2001
Message-Id: <389d76878ec1d6eb5383cb6accf5933f35e1bb1a.1371097396.git.viresh.kumar@linaro.org>
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Wed, 12 Jun 2013 12:05:48 +0530
Subject: [PATCH] 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>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-tegra/Kconfig | 3 ---
 drivers/cpufreq/Kconfig.arm | 8 ++++++++
 drivers/cpufreq/Makefile    | 2 +-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc..5c0db06 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -28,7 +28,6 @@ config ARCH_TEGRA_2x_SOC
 	select ARM_ERRATA_754327 if SMP
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA20
@@ -46,7 +45,6 @@ config ARCH_TEGRA_3x_SOC
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA30
@@ -63,7 +61,6 @@ config ARCH_TEGRA_114_SOC
 	select ARM_ARCH_TIMER
 	select ARM_GIC
 	select ARM_L1_CACHE_SHIFT_6
-	select CPU_FREQ_TABLE if CPU_FREQ
 	select CPU_V7
 	select PINCTRL
 	select PINCTRL_TEGRA114
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index d52261b..5085427 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -154,3 +154,11 @@ config ARM_SPEAR_CPUFREQ
 	default y
 	help
 	  This adds the CPUFreq driver support for SPEAr SOCs.
+
+config ARM_TEGRA_CPUFREQ
+	bool "TEGRA CPUFreq support"
+	depends on ARCH_TEGRA
+	select CPU_FREQ_TABLE
+	default y
+	help
+	  This adds the CPUFreq driver support for TEGRA SOCs.
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 13c3f83..9c873e7 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -71,7 +71,7 @@ obj-$(CONFIG_ARM_S5PV210_CPUFREQ)	+= s5pv210-cpufreq.o
 obj-$(CONFIG_ARM_SA1100_CPUFREQ)	+= sa1100-cpufreq.o
 obj-$(CONFIG_ARM_SA1110_CPUFREQ)	+= sa1110-cpufreq.o
 obj-$(CONFIG_ARM_SPEAR_CPUFREQ)		+= spear-cpufreq.o
-obj-$(CONFIG_ARCH_TEGRA)		+= tegra-cpufreq.o
+obj-$(CONFIG_ARM_TEGRA_CPUFREQ)		+= tegra-cpufreq.o
 
 ##################################################################################
 # PowerPC platform drivers
-- 
1.7.12.rc2.18.g61b472e


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  2013-06-13  4:24     ` Viresh Kumar
@ 2013-06-13 15:43       ` Stephen Warren
  2013-06-13 15:46         ` Viresh Kumar
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Warren @ 2013-06-13 15:43 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Stephen Warren

On 06/12/2013 10:24 PM, Viresh Kumar wrote:
> On 12 June 2013 21:20, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 06/12/2013 02:15 AM, Viresh Kumar wrote:
>>> ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants
>>> of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver
>>> uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
>>>
>>> This also removes select CPU_FREQ_TABLE from individual tegra variants.
>>
>> I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c 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.
> 
> Hmmm. check this out (attached too for you to test):

This certainly generates the correct .config when I "make
tegra_defconfig" after applying it, and a build after disabling CPU_FREQ
links OK, so,

Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>

(I assume this patch would go through the cpufreq tree?)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA
  2013-06-13 15:43       ` Stephen Warren
@ 2013-06-13 15:46         ` Viresh Kumar
  0 siblings, 0 replies; 25+ messages in thread
From: Viresh Kumar @ 2013-06-13 15:46 UTC (permalink / raw)
  To: Stephen Warren
  Cc: rjw, linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
	robin.randhawa, Steve.Bannister, Liviu.Dudau,
	charles.garcia-tobin, arvind.chauhan, arnd, Stephen Warren

On 13 June 2013 21:13, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 06/12/2013 10:24 PM, Viresh Kumar wrote:
>> On 12 June 2013 21:20, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 06/12/2013 02:15 AM, Viresh Kumar wrote:
>>>> ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants
>>>> of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver
>>>> uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
>>>>
>>>> This also removes select CPU_FREQ_TABLE from individual tegra variants.
>>>
>>> I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c 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.
>>
>> Hmmm. check this out (attached too for you to test):
>
> This certainly generates the correct .config when I "make
> tegra_defconfig" after applying it, and a build after disabling CPU_FREQ
> links OK, so,

Yeah, I also compile tested it.

> Tested-by: Stephen Warren <swarren@nvidia.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>
>
> (I assume this patch would go through the cpufreq tree?)

Yes. Via my ARM cpufreq tree.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [uclinux-dist-devel] [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
  2013-06-12  8:15 ` [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ Viresh Kumar
@ 2013-06-17  4:39   ` Mike Frysinger
  0 siblings, 0 replies; 25+ messages in thread
From: Mike Frysinger @ 2013-06-17  4:39 UTC (permalink / raw)
  To: uclinux-dist-devel
  Cc: Viresh Kumar, rjw, robin.randhawa, Steve.Bannister, arnd,
	linux-pm, patches, Liviu.Dudau, linux-kernel, cpufreq,
	linaro-kernel, arvind.chauhan, charles.garcia-tobin

[-- Attachment #1: Type: Text/Plain, Size: 274 bytes --]

On Wednesday 12 June 2013 04:15:08 Viresh Kumar wrote:
> By mistake blackfin's cpufreq driver is enabled when CONFIG_BLACKFIN was
> present, whereas it should have been enabled only when CONFIG_BFIN_CPU_FREQ
> is present.

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2013-06-17  4:39 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12  8:15 [PATCH 00/11] CPUFreq Kconfig fixes Viresh Kumar
2013-06-12  8:15 ` [PATCH 01/11] cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ Viresh Kumar
2013-06-17  4:39   ` [uclinux-dist-devel] " Mike Frysinger
2013-06-12  8:15 ` [PATCH 02/11] cpufreq: cris: select CPU_FREQ_TABLE Viresh Kumar
2013-06-12  8:15 ` [PATCH 03/11] cpufreq: davinci: " Viresh Kumar
2013-06-12  8:15 ` [PATCH 04/11] cpufreq: exynos: " Viresh Kumar
2013-06-12  8:15 ` [PATCH 05/11] cpufreq: highbank: remove " Viresh Kumar
2013-06-12 17:04   ` Mark Langsdorf
2013-06-12  8:15 ` [PATCH 06/11] cpufreq: imx: " Viresh Kumar
2013-06-12 11:38   ` Shawn Guo
2013-06-12  8:15 ` [PATCH 07/11] cpufreq: powerpc: CBE_RAS: " Viresh Kumar
2013-06-12  8:15 ` [PATCH 08/11] cpufreq: pxa: " Viresh Kumar
2013-06-12  8:15 ` [PATCH 09/11] cpufreq: S3C2416/S3C64XX: " Viresh Kumar
2013-06-12  9:11   ` Heiko Stübner
2013-06-12  8:15 ` [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA Viresh Kumar
2013-06-12 15:50   ` Stephen Warren
2013-06-13  4:24     ` Viresh Kumar
2013-06-13 15:43       ` Stephen Warren
2013-06-13 15:46         ` Viresh Kumar
2013-06-12  8:15 ` [PATCH 11/11] cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE Viresh Kumar
2013-06-12 14:23   ` Jacob Shin
2013-06-12 12:46 ` [PATCH 00/11] CPUFreq Kconfig fixes Arnd Bergmann
2013-06-12 14:28   ` Viresh Kumar
2013-06-12 14:49     ` Arnd Bergmann
2013-06-12 22:55       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).