diff mbox

[1/2] ARM: sunxi: Split the various SoCs support in Kconfig

Message ID 1398529014-1152-2-git-send-email-maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard April 26, 2014, 4:16 p.m. UTC
This will allow to better isolate various options, and reduce the overall
kernel size if we're interested in only one of the SoCs.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

Comments

Olof Johansson April 28, 2014, 5:02 p.m. UTC | #1
Hi,

On Sat, Apr 26, 2014 at 9:16 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> This will allow to better isolate various options, and reduce the overall
> kernel size if we're interested in only one of the SoCs.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
>  1 file changed, 29 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index b57d7d53b9d3..23575010ff49 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -1,14 +1,37 @@
>  config ARCH_SUNXI
> -       bool "Allwinner A1X SOCs" if ARCH_MULTI_V7
> -       select ARCH_HAS_RESET_CONTROLLER
> +       bool "Allwinner SoCs" if ARCH_MULTI_V7
>         select ARCH_REQUIRE_GPIOLIB
> -       select ARM_GIC
> -       select ARM_PSCI
>         select CLKSRC_MMIO
>         select GENERIC_IRQ_CHIP
> -       select HAVE_ARM_ARCH_TIMER
>         select PINCTRL
>         select PINCTRL_SUNXI
> -       select RESET_CONTROLLER
>         select SUN4I_TIMER
> +
> +if ARCH_SUNXI
> +
> +menu "Allwinner SoCs variants"
> +
> +config MACH_SUN4I
> +       bool "Allwinner A10 (sun4i) SoCs support"

If you add "default MACH_SUNXI" then you don't have to churn the
defconfigs, but it'll still make it possible for people to turn it
off.


-Olof
Arnd Bergmann April 28, 2014, 6:07 p.m. UTC | #2
On Saturday 26 April 2014 18:16:53 Maxime Ripard wrote:
> This will allow to better isolate various options, and reduce the overall
> kernel size if we're interested in only one of the SoCs.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Looks good, just one small request:


> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index b57d7d53b9d3..23575010ff49 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -1,14 +1,37 @@
>  config ARCH_SUNXI
> -       bool "Allwinner A1X SOCs" if ARCH_MULTI_V7
> -       select ARCH_HAS_RESET_CONTROLLER
> +       bool "Allwinner SoCs" if ARCH_MULTI_V7
>         select ARCH_REQUIRE_GPIOLIB
> -       select ARM_GIC
> -       select ARM_PSCI
>         select CLKSRC_MMIO
>         select GENERIC_IRQ_CHIP
> -       select HAVE_ARM_ARCH_TIMER
>         select PINCTRL
>         select PINCTRL_SUNXI
> -       select RESET_CONTROLLER
>         select SUN4I_TIMER

Please make this 'menuconfig' instead of 'config', so it shows up as
only one line in the main menu. I would like to do this for all platforms
that have sub-options eventually.

	Arnd
Maxime Ripard April 28, 2014, 10:43 p.m. UTC | #3
On Mon, Apr 28, 2014 at 10:02:40AM -0700, Olof Johansson wrote:
> Hi,
> 
> On Sat, Apr 26, 2014 at 9:16 AM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > This will allow to better isolate various options, and reduce the overall
> > kernel size if we're interested in only one of the SoCs.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
> >  1 file changed, 29 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> > index b57d7d53b9d3..23575010ff49 100644
> > --- a/arch/arm/mach-sunxi/Kconfig
> > +++ b/arch/arm/mach-sunxi/Kconfig
> > @@ -1,14 +1,37 @@
> >  config ARCH_SUNXI
> > -       bool "Allwinner A1X SOCs" if ARCH_MULTI_V7
> > -       select ARCH_HAS_RESET_CONTROLLER
> > +       bool "Allwinner SoCs" if ARCH_MULTI_V7
> >         select ARCH_REQUIRE_GPIOLIB
> > -       select ARM_GIC
> > -       select ARM_PSCI
> >         select CLKSRC_MMIO
> >         select GENERIC_IRQ_CHIP
> > -       select HAVE_ARM_ARCH_TIMER
> >         select PINCTRL
> >         select PINCTRL_SUNXI
> > -       select RESET_CONTROLLER
> >         select SUN4I_TIMER
> > +
> > +if ARCH_SUNXI
> > +
> > +menu "Allwinner SoCs variants"
> > +
> > +config MACH_SUN4I
> > +       bool "Allwinner A10 (sun4i) SoCs support"
> 
> If you add "default MACH_SUNXI" then you don't have to churn the
> defconfigs, but it'll still make it possible for people to turn it
> off.

Right, thanks!
Maxime Ripard April 28, 2014, 10:45 p.m. UTC | #4
On Mon, Apr 28, 2014 at 08:07:38PM +0200, Arnd Bergmann wrote:
> On Saturday 26 April 2014 18:16:53 Maxime Ripard wrote:
> > This will allow to better isolate various options, and reduce the overall
> > kernel size if we're interested in only one of the SoCs.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Looks good, just one small request:
> 
> 
> > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> > index b57d7d53b9d3..23575010ff49 100644
> > --- a/arch/arm/mach-sunxi/Kconfig
> > +++ b/arch/arm/mach-sunxi/Kconfig
> > @@ -1,14 +1,37 @@
> >  config ARCH_SUNXI
> > -       bool "Allwinner A1X SOCs" if ARCH_MULTI_V7
> > -       select ARCH_HAS_RESET_CONTROLLER
> > +       bool "Allwinner SoCs" if ARCH_MULTI_V7
> >         select ARCH_REQUIRE_GPIOLIB
> > -       select ARM_GIC
> > -       select ARM_PSCI
> >         select CLKSRC_MMIO
> >         select GENERIC_IRQ_CHIP
> > -       select HAVE_ARM_ARCH_TIMER
> >         select PINCTRL
> >         select PINCTRL_SUNXI
> > -       select RESET_CONTROLLER
> >         select SUN4I_TIMER
> 
> Please make this 'menuconfig' instead of 'config', so it shows up as
> only one line in the main menu. I would like to do this for all platforms
> that have sub-options eventually.

Ok, sure, I'll send a v2 with Olof comments as well.

Thanks!
Maxime
diff mbox

Patch

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b57d7d53b9d3..23575010ff49 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1,14 +1,37 @@ 
 config ARCH_SUNXI
-	bool "Allwinner A1X SOCs" if ARCH_MULTI_V7
-	select ARCH_HAS_RESET_CONTROLLER
+	bool "Allwinner SoCs" if ARCH_MULTI_V7
 	select ARCH_REQUIRE_GPIOLIB
-	select ARM_GIC
-	select ARM_PSCI
 	select CLKSRC_MMIO
 	select GENERIC_IRQ_CHIP
-	select HAVE_ARM_ARCH_TIMER
 	select PINCTRL
 	select PINCTRL_SUNXI
-	select RESET_CONTROLLER
 	select SUN4I_TIMER
+
+if ARCH_SUNXI
+
+menu "Allwinner SoCs variants"
+
+config MACH_SUN4I
+	bool "Allwinner A10 (sun4i) SoCs support"
+
+config MACH_SUN5I
+	bool "Allwinner A10s / A13 (sun5i) SoCs support"
+	select SUN5I_HSTIMER
+
+config MACH_SUN6I
+	bool "Allwinner A31 (sun6i) SoCs support"
+	select ARCH_HAS_RESET_CONTROLLER
+	select ARM_GIC
+	select RESET_CONTROLLER
+	select SUN5I_HSTIMER
+
+config MACH_SUN7I
+	bool "Allwinner A20 (sun7i) SoCs support"
+	select ARM_GIC
+	select ARM_PSCI
+	select HAVE_ARM_ARCH_TIMER
 	select SUN5I_HSTIMER
+
+endmenu
+
+endif