diff mbox series

[3/4] arm64: Kconfig: Fix VEXPRESS driver dependencies

Message ID 8f539b28c25d22b8f515c131cd6b24c309f7ca90.1568239378.git.amit.kucheria@linaro.org
State New
Headers show
Series None | expand

Commit Message

Amit Kucheria Sept. 11, 2019, 10:18 p.m. UTC
Push various VEXPRESS drivers behind ARCH_VEXPRESS dependency so that it
doesn't get enabled by default on other platforms.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>

---
 drivers/bus/Kconfig           | 2 +-
 drivers/clk/versatile/Kconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Arnd Bergmann Sept. 12, 2019, 9:17 a.m. UTC | #1
On Thu, Sep 12, 2019 at 12:19 AM Amit Kucheria <amit.kucheria@linaro.org> wrote:
>

> Push various VEXPRESS drivers behind ARCH_VEXPRESS dependency so that it

> doesn't get enabled by default on other platforms.

>

> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---

>  drivers/bus/Kconfig           | 2 +-

>  drivers/clk/versatile/Kconfig | 4 ++--

>  2 files changed, 3 insertions(+), 3 deletions(-)

>

> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig

> index d80e8d70bf10..b2b1beee9953 100644

> --- a/drivers/bus/Kconfig

> +++ b/drivers/bus/Kconfig

> @@ -166,7 +166,7 @@ config UNIPHIER_SYSTEM_BUS

>

>  config VEXPRESS_CONFIG

>         bool "Versatile Express configuration bus"

> -       default y if ARCH_VEXPRESS

> +       depends on ARCH_VEXPRESS

>         depends on ARM || ARM64

>         depends on OF


Removing the 'default y' breaks existing defconfig files,

Adding the 'depends on ARCH_VEXPRESS' unnecessarily limits
compile-testing. I'd rather extend it to other architectures than
limit it to builds that have vexpress enabled.

> diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig

> index ac766855ba16..826750292c1e 100644

> --- a/drivers/clk/versatile/Kconfig

> +++ b/drivers/clk/versatile/Kconfig

> @@ -5,8 +5,8 @@ config ICST

>  config COMMON_CLK_VERSATILE

>         bool "Clock driver for ARM Reference designs"

>         depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \

> -               ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \

> -               COMPILE_TEST

> +               ARCH_VERSATILE || ARCH_VEXPRESS || COMPILE_TEST

> +       depends on ARM64


It's definitely wrong to limit this to 64 bit.

      Arnd
Sudeep Holla Sept. 13, 2019, 10:12 a.m. UTC | #2
On Thu, Sep 12, 2019 at 03:48:47AM +0530, Amit Kucheria wrote:
> Push various VEXPRESS drivers behind ARCH_VEXPRESS dependency so that it

> doesn't get enabled by default on other platforms.

>


I couldn't understand the motivation for these changes from the cover letter.

> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---

>  drivers/bus/Kconfig           | 2 +-

>  drivers/clk/versatile/Kconfig | 4 ++--

>  2 files changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig

> index d80e8d70bf10..b2b1beee9953 100644

> --- a/drivers/bus/Kconfig

> +++ b/drivers/bus/Kconfig

> @@ -166,7 +166,7 @@ config UNIPHIER_SYSTEM_BUS

>  

>  config VEXPRESS_CONFIG

>  	bool "Versatile Express configuration bus"

> -	default y if ARCH_VEXPRESS

> +	depends on ARCH_VEXPRESS

>  	depends on ARM || ARM64

>  	depends on OF

>  	select REGMAP

> diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig

> index ac766855ba16..826750292c1e 100644

> --- a/drivers/clk/versatile/Kconfig

> +++ b/drivers/clk/versatile/Kconfig

> @@ -5,8 +5,8 @@ config ICST

>  config COMMON_CLK_VERSATILE

>  	bool "Clock driver for ARM Reference designs"

>  	depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \

> -		ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \

> -		COMPILE_TEST

> +		ARCH_VERSATILE || ARCH_VEXPRESS || COMPILE_TEST

> +	depends on ARM64


This will break 32-bit platforms.

--
Regards,
Sudeep
Amit Kucheria Sept. 20, 2019, 8:12 p.m. UTC | #3
On Fri, Sep 13, 2019 at 3:12 AM Sudeep Holla <sudeep.holla@arm.com> wrote:
>

> On Thu, Sep 12, 2019 at 03:48:47AM +0530, Amit Kucheria wrote:

> > Push various VEXPRESS drivers behind ARCH_VEXPRESS dependency so that it

> > doesn't get enabled by default on other platforms.

> >

>

> I couldn't understand the motivation for these changes from the cover letter.


Yes, the cover letter for this series needs to be a lot better. Sorry.
In summary, I found a bunch of drivers in defconfig that were getting
called in early_initcall and core_initcall even when the platform or
COMPILE_TEST was not enabled. So I was just trying to ring fence some
of those drivers as a proof of concept to see if these changes were
acceptable upstream.

Let me try again with a better cover letter and using the pattern Arnd
suggested elsewhere.

> > Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>

> > ---

> >  drivers/bus/Kconfig           | 2 +-

> >  drivers/clk/versatile/Kconfig | 4 ++--

> >  2 files changed, 3 insertions(+), 3 deletions(-)

> >

> > diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig

> > index d80e8d70bf10..b2b1beee9953 100644

> > --- a/drivers/bus/Kconfig

> > +++ b/drivers/bus/Kconfig

> > @@ -166,7 +166,7 @@ config UNIPHIER_SYSTEM_BUS

> >

> >  config VEXPRESS_CONFIG

> >       bool "Versatile Express configuration bus"

> > -     default y if ARCH_VEXPRESS

> > +     depends on ARCH_VEXPRESS

> >       depends on ARM || ARM64

> >       depends on OF

> >       select REGMAP

> > diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig

> > index ac766855ba16..826750292c1e 100644

> > --- a/drivers/clk/versatile/Kconfig

> > +++ b/drivers/clk/versatile/Kconfig

> > @@ -5,8 +5,8 @@ config ICST

> >  config COMMON_CLK_VERSATILE

> >       bool "Clock driver for ARM Reference designs"

> >       depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \

> > -             ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \

> > -             COMPILE_TEST

> > +             ARCH_VERSATILE || ARCH_VEXPRESS || COMPILE_TEST

> > +     depends on ARM64

>

> This will break 32-bit platforms.

>

> --

> Regards,

> Sudeep
diff mbox series

Patch

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index d80e8d70bf10..b2b1beee9953 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -166,7 +166,7 @@  config UNIPHIER_SYSTEM_BUS
 
 config VEXPRESS_CONFIG
 	bool "Versatile Express configuration bus"
-	default y if ARCH_VEXPRESS
+	depends on ARCH_VEXPRESS
 	depends on ARM || ARM64
 	depends on OF
 	select REGMAP
diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig
index ac766855ba16..826750292c1e 100644
--- a/drivers/clk/versatile/Kconfig
+++ b/drivers/clk/versatile/Kconfig
@@ -5,8 +5,8 @@  config ICST
 config COMMON_CLK_VERSATILE
 	bool "Clock driver for ARM Reference designs"
 	depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \
-		ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \
-		COMPILE_TEST
+		ARCH_VERSATILE || ARCH_VEXPRESS || COMPILE_TEST
+	depends on ARM64
 	select REGMAP_MMIO
 	---help---
           Supports clocking on ARM Reference designs: