Skip to contentSkip to conversation

ARM: sunxi: Split Kconfig entries

PATCH Superseded Maxime Ripard 3 participants 7 messages Apr 26, 2014 – Apr 28, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: sunxi: Split Kconfig entries

Hi everyone,

This patch adds a few Kconfig option for all the supported Allwinner SoCs family.

Hopefully, this will reduce the size of the kernel images when we're interested in only or a few of these family, but not all of them.

Maxime Ripard (2):
ARM: sunxi: Split the various SoCs support in Kconfig
ARM: Enable the new Allwinner SoCs support options

 arch/arm/configs/multi_v7_defconfig |  6 ++++++
 arch/arm/configs/sunxi_defconfig    |  5 +++++
 arch/arm/mach-sunxi/Kconfig         | 35 +++++++++++++++++++++++++++++------
 3 files changed, 40 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

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

This will allow to better isolate various options, and reduce the overall kernel size if we're interested in only one of the SoCs.

---
 arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
arch/arm/mach-sunxi/Kconfig +29 -6
index b57d7d53b9d3..23575010ff49 100644
@@ -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
Signature · 1 line
1.9.1
#2 lore raw

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

Hi,

Quoted 24 lines · Maxime Ripard

This will allow to better isolate various options, and reduce the overall kernel size if we're interested in only one of the SoCs.

---
 arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
arch/arm/mach-sunxi/Kconfig +1 -5
index b57d7d53b9d3..23575010ff49 100644
@@ -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

arch/arm/mach-sunxi/Kconfig line 15

Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +7 -1
        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

#3 lore raw

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

Quoted 34 lines · Olof Johansson

Hi,

Quoted 30 lines · Maxime Ripard

This will allow to better isolate various options, and reduce the overall kernel size if we're interested in only one of the SoCs.

---
 arch/arm/mach-sunxi/Kconfig | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
arch/arm/mach-sunxi/Kconfig +4 -6
index b57d7d53b9d3..23575010ff49 100644
@@ -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
+
Quoted 8 lines

arch/arm/mach-sunxi/Kconfig line 15

Quoted 4 lines
arch/arm/mach-sunxi/Kconfig +4 -0
+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!

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140428/7c83757b/attachment.sig>
#4 lore raw

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

In reply to Maxime Ripard
Quoted 4 lines · 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.

Looks good, just one small request:

Quoted 9 lines
arch/arm/mach-sunxi/Kconfig +1 -2
index b57d7d53b9d3..23575010ff49 100644
@@ -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

arch/arm/mach-sunxi/Kconfig line 8

Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +0 -4
        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

#5 lore raw

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

Quoted 24 lines · Arnd Bergmann
Quoted 4 lines · 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.

Looks good, just one small request:

Quoted 15 lines
arch/arm/mach-sunxi/Kconfig +1 -5
index b57d7d53b9d3..23575010ff49 100644
@@ -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
Quoted 8 lines

arch/arm/mach-sunxi/Kconfig line 8

Quoted 4 lines
arch/arm/mach-sunxi/Kconfig +0 -1
        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

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140428/b7df91d3/attachment.sig>
#6 lore raw

PATCH 2/2 ARM: Enable the new Allwinner SoCs support options

In reply to Maxime Ripard

Enable the new Kconfig option related to SoC support in multi_v7 and sunxi defconfigs.

While we're at it, also enable the missing Allwinnner SPI options.

---
 arch/arm/configs/multi_v7_defconfig | 6 ++++++
 arch/arm/configs/sunxi_defconfig    | 5 +++++
 2 files changed, 11 insertions(+)
arch/arm/configs/multi_v7_defconfig +6 -0
index d4e8a47a2f7c..f5fcfc142691 100644
@@ -48,6 +48,10 @@ CONFIG_MACH_SPEAR1310=y
 CONFIG_MACH_SPEAR1340=y
 CONFIG_ARCH_STI=y
 CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN4I=y
+CONFIG_MACH_SUN5I=y
+CONFIG_MACH_SUN6I=y
+CONFIG_MACH_SUN7I=y
 CONFIG_ARCH_SIRF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_ARCH_TEGRA_2x_SOC=y
@@ -184,6 +188,8 @@ CONFIG_SPI_OMAP24XX=y
 CONFIG_SPI_ORION=y
 CONFIG_SPI_PL022=y
 CONFIG_SPI_SIRF=y
+CONFIG_SPI_SUN4I=y
+CONFIG_SPI_SUN6I=y
 CONFIG_SPI_TEGRA114=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
arch/arm/configs/sunxi_defconfig +5 -0
index b5df4a511b0a..78732ed10d0e 100644
@@ -2,6 +2,10 @@ CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN4I=y
+CONFIG_MACH_SUN5I=y
+CONFIG_MACH_SUN6I=y
+CONFIG_MACH_SUN7I=y
 CONFIG_SMP=y
 CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
@@ -50,6 +54,7 @@ CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_SPI=y
+CONFIG_SPI_SUN4I=y
 CONFIG_SPI_SUN6I=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HWMON is not set
Signature · 1 line
1.9.1