linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: dbx500: add a Kconfig symbol
@ 2017-05-11 12:12 Arnd Bergmann
  2017-05-11 13:57 ` Viresh Kumar
  2017-05-12  9:18 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-05-11 12:12 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: Arnd Bergmann, Linus Walleij, linux-pm, linux-kernel

Moving the cooling code into the cpufreq driver caused a possible build failure
when the cpu_thermal helper code is a loadable module or disabled:

drivers/cpufreq/dbx500-cpufreq.o: In function `dbx500_cpufreq_ready':
dbx500-cpufreq.c:(.text.dbx500_cpufreq_ready+0x4): undefined reference to `cpufreq_cooling_register'

This adds the same dependency that we have in other cpufreq drivers,
forcing the driver to be disabled when we can't possibly link it.

Fixes: 19678ffb9fd6 ("cpufreq: dbx500: Manage cooling device from cpufreq driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/Kconfig.arm | 9 +++++++++
 drivers/cpufreq/Makefile    | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 74ed7e9a7f27..2011fec2d6ad 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -71,6 +71,15 @@ config ARM_HIGHBANK_CPUFREQ
 
 	  If in doubt, say N.
 
+config ARM_DB8500_CPUFREQ
+	tristate "ST-Ericsson DB8500 cpufreq" if COMPILE_TEST && !ARCH_U8500
+	default ARCH_U8500
+	depends on HAS_IOMEM
+	depends on !CPU_THERMAL || THERMAL
+	help
+	  This adds the CPUFreq driver for ST-Ericsson Ux500 (DB8500) SoC
+	  series.
+
 config ARM_IMX6Q_CPUFREQ
 	tristate "Freescale i.MX6 cpufreq support"
 	depends on ARCH_MXC
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index b7e78f063c4f..ab3a42cd29ef 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -53,7 +53,7 @@ obj-$(CONFIG_ARM_DT_BL_CPUFREQ)		+= arm_big_little_dt.o
 
 obj-$(CONFIG_ARM_BRCMSTB_AVS_CPUFREQ)	+= brcmstb-avs-cpufreq.o
 obj-$(CONFIG_ARCH_DAVINCI)		+= davinci-cpufreq.o
-obj-$(CONFIG_UX500_SOC_DB8500)		+= dbx500-cpufreq.o
+obj-$(CONFIG_ARM_DB8500_CPUFREQ)	+= dbx500-cpufreq.o
 obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ)	+= exynos5440-cpufreq.o
 obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ)	+= highbank-cpufreq.o
 obj-$(CONFIG_ARM_IMX6Q_CPUFREQ)		+= imx6q-cpufreq.o
-- 
2.9.0

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

* Re: [PATCH] cpufreq: dbx500: add a Kconfig symbol
  2017-05-11 12:12 [PATCH] cpufreq: dbx500: add a Kconfig symbol Arnd Bergmann
@ 2017-05-11 13:57 ` Viresh Kumar
  2017-05-12  9:18 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2017-05-11 13:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rafael J. Wysocki, Linus Walleij, linux-pm, Linux Kernel Mailing List

On 11 May 2017 at 17:42, Arnd Bergmann <arnd@arndb.de> wrote:
> Moving the cooling code into the cpufreq driver caused a possible build failure
> when the cpu_thermal helper code is a loadable module or disabled:
>
> drivers/cpufreq/dbx500-cpufreq.o: In function `dbx500_cpufreq_ready':
> dbx500-cpufreq.c:(.text.dbx500_cpufreq_ready+0x4): undefined reference to `cpufreq_cooling_register'
>
> This adds the same dependency that we have in other cpufreq drivers,
> forcing the driver to be disabled when we can't possibly link it.
>
> Fixes: 19678ffb9fd6 ("cpufreq: dbx500: Manage cooling device from cpufreq driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/cpufreq/Kconfig.arm | 9 +++++++++
>  drivers/cpufreq/Makefile    | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* Re: [PATCH] cpufreq: dbx500: add a Kconfig symbol
  2017-05-11 12:12 [PATCH] cpufreq: dbx500: add a Kconfig symbol Arnd Bergmann
  2017-05-11 13:57 ` Viresh Kumar
@ 2017-05-12  9:18 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-05-12  9:18 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Rafael J. Wysocki, Viresh Kumar, linux-pm, linux-kernel

On Thu, May 11, 2017 at 2:12 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> Moving the cooling code into the cpufreq driver caused a possible build failure
> when the cpu_thermal helper code is a loadable module or disabled:
>
> drivers/cpufreq/dbx500-cpufreq.o: In function `dbx500_cpufreq_ready':
> dbx500-cpufreq.c:(.text.dbx500_cpufreq_ready+0x4): undefined reference to `cpufreq_cooling_register'
>
> This adds the same dependency that we have in other cpufreq drivers,
> forcing the driver to be disabled when we can't possibly link it.
>
> Fixes: 19678ffb9fd6 ("cpufreq: dbx500: Manage cooling device from cpufreq driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-05-12  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 12:12 [PATCH] cpufreq: dbx500: add a Kconfig symbol Arnd Bergmann
2017-05-11 13:57 ` Viresh Kumar
2017-05-12  9:18 ` Linus Walleij

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).