* [PATCH] cpufreq: scmi: add COMMON_CLK dependency
@ 2020-12-03 22:55 Arnd Bergmann
2020-12-07 6:33 ` Viresh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-12-03 22:55 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, Sudeep Holla
Cc: Arnd Bergmann, linux-pm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Wtihout CONFIG_COMMON_CLK, the scmi driver fails to link:
arm-linux-gnueabi-ld: drivers/cpufreq/scmi-cpufreq.o: in function `scmi_cpufreq_probe':
scmi-cpufreq.c:(.text+0x20c): undefined reference to `devm_of_clk_add_hw_provider'
arm-linux-gnueabi-ld: scmi-cpufreq.c:(.text+0x22c): undefined reference to `of_clk_hw_simple_get'
Add a Kconfig dependency for it.
Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/cpufreq/Kconfig.arm | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 1f73fa75b1a0..434ef03d2762 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -264,6 +264,7 @@ config ARM_SA1110_CPUFREQ
config ARM_SCMI_CPUFREQ
tristate "SCMI based CPUfreq driver"
depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
+ depends on COMMON_CLK
select PM_OPP
help
This adds the CPUfreq driver support for ARM platforms using SCMI
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: scmi: add COMMON_CLK dependency
2020-12-03 22:55 [PATCH] cpufreq: scmi: add COMMON_CLK dependency Arnd Bergmann
@ 2020-12-07 6:33 ` Viresh Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-12-07 6:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafael J. Wysocki, Sudeep Holla, Arnd Bergmann, linux-pm, linux-kernel
On 03-12-20, 23:55, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Wtihout CONFIG_COMMON_CLK, the scmi driver fails to link:
>
> arm-linux-gnueabi-ld: drivers/cpufreq/scmi-cpufreq.o: in function `scmi_cpufreq_probe':
> scmi-cpufreq.c:(.text+0x20c): undefined reference to `devm_of_clk_add_hw_provider'
> arm-linux-gnueabi-ld: scmi-cpufreq.c:(.text+0x22c): undefined reference to `of_clk_hw_simple_get'
>
> Add a Kconfig dependency for it.
>
> Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/cpufreq/Kconfig.arm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 1f73fa75b1a0..434ef03d2762 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -264,6 +264,7 @@ config ARM_SA1110_CPUFREQ
> config ARM_SCMI_CPUFREQ
> tristate "SCMI based CPUfreq driver"
> depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
> + depends on COMMON_CLK
> select PM_OPP
> help
> This adds the CPUfreq driver support for ARM platforms using SCMI
This is already fixed by:
commit f943849f7206 ("cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK")
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: scmi: add COMMON_CLK dependency
2020-12-04 11:38 ` Sudeep Holla
@ 2020-12-04 13:46 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2020-12-04 13:46 UTC (permalink / raw)
To: Sudeep Holla
Cc: Rafael J. Wysocki, Viresh Kumar, Arnd Bergmann, Linux PM list,
linux-kernel
On Fri, Dec 4, 2020 at 12:38 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Fri, Dec 04, 2020 at 12:17:46AM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > Wtihout CONFIG_COMMON_CLK, the scmi driver fails to link:
> >
> > arm-linux-gnueabi-ld: drivers/cpufreq/scmi-cpufreq.o: in function `scmi_cpufreq_probe':
> > scmi-cpufreq.c:(.text+0x20c): undefined reference to `devm_of_clk_add_hw_provider'
> > arm-linux-gnueabi-ld: scmi-cpufreq.c:(.text+0x22c): undefined reference to `of_clk_hw_simple_get'
> >
> > Add a Kconfig dependency for it.
> >
>
> There is a fix already upstream in later -rc(rc6 IIRC), I assume you are
> seeing this prior to that.
>
> Commit f943849f7206 ("cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK")
Ok, I missed that during my rebase.
> Since the only dependency on CONFIG_COMMON_CLK is to satisfy OPP adding
> dummy clock provider, I avoided adding dependency on CLK for this driver
> as this works fine for !CONFIG_COMMON_CLK.
Right. I don't think it makes much difference either way, though I usually
prefer code checks to be written as
/* dummy clock provider as needed by OPP if clocks property is used */
if (IS_ENABLED(CONFIG_COMMON_CLK) &&
of_find_property(dev->of_node, "#clock-cells", NULL))
devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
which helps readability as well as compile coverage. Doesn't matter
here either, since there are only two lines inside.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: scmi: add COMMON_CLK dependency
2020-12-03 23:17 Arnd Bergmann
@ 2020-12-04 11:38 ` Sudeep Holla
2020-12-04 13:46 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Sudeep Holla @ 2020-12-04 11:38 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rafael J. Wysocki, Viresh Kumar, Sudeep Holla, Arnd Bergmann,
linux-pm, linux-kernel
On Fri, Dec 04, 2020 at 12:17:46AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Wtihout CONFIG_COMMON_CLK, the scmi driver fails to link:
>
> arm-linux-gnueabi-ld: drivers/cpufreq/scmi-cpufreq.o: in function `scmi_cpufreq_probe':
> scmi-cpufreq.c:(.text+0x20c): undefined reference to `devm_of_clk_add_hw_provider'
> arm-linux-gnueabi-ld: scmi-cpufreq.c:(.text+0x22c): undefined reference to `of_clk_hw_simple_get'
>
> Add a Kconfig dependency for it.
>
There is a fix already upstream in later -rc(rc6 IIRC), I assume you are
seeing this prior to that.
Commit f943849f7206 ("cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK")
Since the only dependency on CONFIG_COMMON_CLK is to satisfy OPP adding
dummy clock provider, I avoided adding dependency on CLK for this driver
as this works fine for !CONFIG_COMMON_CLK.
--
Regards,
Sudeep
P.S: There are 2 copies of this patch, I chose to reply on this, other
one is @[1]
[1] https://lore.kernel.org/lkml/20201203225550.1478195-1-arnd@kernel.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] cpufreq: scmi: add COMMON_CLK dependency
@ 2020-12-03 23:17 Arnd Bergmann
2020-12-04 11:38 ` Sudeep Holla
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-12-03 23:17 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, Sudeep Holla
Cc: Arnd Bergmann, linux-pm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Wtihout CONFIG_COMMON_CLK, the scmi driver fails to link:
arm-linux-gnueabi-ld: drivers/cpufreq/scmi-cpufreq.o: in function `scmi_cpufreq_probe':
scmi-cpufreq.c:(.text+0x20c): undefined reference to `devm_of_clk_add_hw_provider'
arm-linux-gnueabi-ld: scmi-cpufreq.c:(.text+0x22c): undefined reference to `of_clk_hw_simple_get'
Add a Kconfig dependency for it.
Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/cpufreq/Kconfig.arm | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 1f73fa75b1a0..434ef03d2762 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -264,6 +264,7 @@ config ARM_SA1110_CPUFREQ
config ARM_SCMI_CPUFREQ
tristate "SCMI based CPUfreq driver"
depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
+ depends on COMMON_CLK
select PM_OPP
help
This adds the CPUfreq driver support for ARM platforms using SCMI
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-07 6:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 22:55 [PATCH] cpufreq: scmi: add COMMON_CLK dependency Arnd Bergmann
2020-12-07 6:33 ` Viresh Kumar
2020-12-03 23:17 Arnd Bergmann
2020-12-04 11:38 ` Sudeep Holla
2020-12-04 13:46 ` Arnd Bergmann
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).