diff mbox

[1/1] ARM: EXYNOS: Consolidate Kconfig entries

Message ID 1391687996-26011-1-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat Feb. 6, 2014, 11:59 a.m. UTC
Instead of repeating the Kconfig entries for every SoC, move them under
ARCH_EXYNOS4 and 5 and move the entries common to both 4 and 5 under
ARCH_EXYNOS. Also, since the individual SoCs do not have any specific
machine/platform code, keep them as boolean symbols instead of user
selectable and select them from Exynos4 and 5 config symbols. Individual
SoC symbols can be removed eventually once the driver Kconfig dependencies
on these symbols are removed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/Kconfig             |   12 ++++++
 arch/arm/mach-exynos/Kconfig |   97 ++++++++++--------------------------------
 2 files changed, 35 insertions(+), 74 deletions(-)

Comments

Sachin Kamat Feb. 10, 2014, 4:50 a.m. UTC | #1
On 7 February 2014 22:03, Tomasz Figa <t.figa@samsung.com> wrote:
> On 06.02.2014 19:59, Olof Johansson wrote:
>>
>> On Thu, Feb 6, 2014 at 10:43 AM, Bartlomiej Zolnierkiewicz
>> <b.zolnierkie@samsung.com> wrote:
>>
>>>>> Well, once again, seeing some numbers would be good. :)
>>>>
>>>>
>>>> What numbers do you want? Size comparisons with all SoC options on vs
>>>> only one?
>>>
>>>
>>> Yes, size comparisions with all SoCs (for given family) turned on vs
>>> only one turned on (done on kernel without this patch applied).
>>>
>>> Also size comparisons for ARCH_EXYNOS4 and ARCH_EXYNOS5 both turned
>>> on vs only ARCH_EXYNOS4 or ARCH_EXYNOS5 turned on (with this patch
>>> applied).
>>
>>
>> exynos_defconfig-based build data below.
>>
>>     text    data     bss     dec     hex filename
>> 5109986  319952  270196 5700134  56fa26 obj-tmp/vmlinux   # all 4+5 SoCs
>> enabled
>> 5088312  296912  270196 5655420  564b7c obj-tmp/vmlinux  # EXYNOS5
>> off, all EXYNOS4 SoCs enabled
>> 5088032  296896  270196 5655124  564a54 obj-tmp/vmlinux  # Only 4210
>> enabled
>> 5079205  299928  270068 5649201  563331 obj-tmp/vmlinux  # EXYNOS4
>> off, all EXYNOS5 SoCs enabled
>> 5063355  286792  270068 5620215  55c1f7 obj-tmp/vmlinux   # Only 5250
>> enabled
>> 5067815  298152  270068 5636035  55ffc3 obj-tmp/vmlinux    # Only
>> 5250+5420 enabled
>> 5053357  278480  269364 5601201  5577b1 obj-tmp/vmlinux  # Only 5440
>> enabled
>>
>> The main difference of disabling 5440 is that it removed the PCI
>> support, which explains that reduction in size.
>>
>> So, I would argue that theere might be some value in disabling whole
>> families (since it saves about 20k of text and the same of data), but
>> that there's less gain per SoC member. 5440 is an oddball in this
>> setup so it might make sense to treat it differently due to the PCI
>> aspect.
>
>
> Well, the numbers basically represent what I expected. Thanks for checking
> this.

Thanks to Olof for coming out with these numbers.

>So I second this patch even more now,

Thanks Tomasz :)

> but maybe let's change it a bit
> and introduce third entry for Exynos5440, since it doesn't really belong to
> either of ARCHs. Candidates that come to my mind are ARCH_EXYNOS5440 (seems
> to specific) or ARCH_EXYNOS5_SERVER. Feel free to suggest anything better,
> though.

Though Exynos5440 belongs to the Exynos5 family, it is different in a
few ways and hence
I preferred to keep it as a separate entry for now. I agree with your
suggestion to have a third
ARCH category but I would prefer to wait for a while until we have one
more candidate for this
category so that we have a bit more data for naming and grouping.
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e25419817791..56a9990ef58e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -829,18 +829,30 @@  config ARCH_S5PV210
 
 config ARCH_EXYNOS
 	bool "Samsung EXYNOS"
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_CPUFREQ
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_SPARSEMEM_ENABLE
+	select ARM_AMBA
 	select ARM_GIC
+	select CLKSRC_OF
 	select COMMON_CLK
 	select CPU_V7
 	select GENERIC_CLOCKEVENTS
+	select HAVE_ARM_SCU if SMP
 	select HAVE_S3C2410_I2C if I2C
 	select HAVE_S3C2410_WATCHDOG if WATCHDOG
 	select HAVE_S3C_RTC if RTC_CLASS
+	select HAVE_SMP
 	select NEED_MACH_MEMORY_H
+	select PINCTRL
+	select PINCTRL_EXYNOS
+	select PM_GENERIC_DOMAINS if PM
+	select S5P_DEV_MFC
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select SAMSUNG_DMADEV
 	select SPARSE_IRQ
 	select USE_OF
 	help
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 4c414af75ef0..54162ef1656e 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -14,99 +14,33 @@  menu "SAMSUNG EXYNOS SoCs Support"
 config ARCH_EXYNOS4
 	bool "SAMSUNG EXYNOS4"
 	default y
-	select ARM_AMBA
-	select CLKSRC_OF
+	select ARM_CPU_SUSPEND if PM
 	select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
 	select CPU_EXYNOS4210
 	select GIC_NON_BANKED
 	select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
-	select HAVE_ARM_SCU if SMP
-	select HAVE_SMP
 	select MIGHT_HAVE_CACHE_L2X0
-	select PINCTRL
-	select PM_GENERIC_DOMAINS if PM
-	select S5P_DEV_MFC
+	select SOC_EXYNOS4212
+	select SOC_EXYNOS4412
 	help
-	  Samsung EXYNOS4 SoCs based systems
+	  Samsung EXYNOS4 (Cortex-A9) SoC based systems
 
 config ARCH_EXYNOS5
 	bool "SAMSUNG EXYNOS5"
-	select ARM_AMBA
-	select CLKSRC_OF
-	select HAVE_ARM_SCU if SMP
-	select HAVE_SMP
-	select PINCTRL
+	default y
+	select SOC_EXYNOS5250
+	select SOC_EXYNOS5420
 	select USB_ARCH_HAS_XHCI
 	help
-	  Samsung EXYNOS5 (Cortex-A15) SoC based systems
+	  Samsung EXYNOS5 (Cortex-A15/A7) SoC based systems
 
 comment "EXYNOS SoCs"
 
-config CPU_EXYNOS4210
-	bool "SAMSUNG EXYNOS4210"
-	default y
-	depends on ARCH_EXYNOS4
-	select ARCH_HAS_BANDGAP
-	select ARM_CPU_SUSPEND if PM
-	select PINCTRL_EXYNOS
-	select S5P_PM if PM
-	select S5P_SLEEP if PM
-	select SAMSUNG_DMADEV
-	help
-	  Enable EXYNOS4210 CPU support
-
-config SOC_EXYNOS4212
-	bool "SAMSUNG EXYNOS4212"
-	default y
-	depends on ARCH_EXYNOS4
-	select ARCH_HAS_BANDGAP
-	select PINCTRL_EXYNOS
-	select S5P_PM if PM
-	select S5P_SLEEP if PM
-	select SAMSUNG_DMADEV
-	help
-	  Enable EXYNOS4212 SoC support
-
-config SOC_EXYNOS4412
-	bool "SAMSUNG EXYNOS4412"
-	default y
-	depends on ARCH_EXYNOS4
-	select ARCH_HAS_BANDGAP
-	select PINCTRL_EXYNOS
-	select SAMSUNG_DMADEV
-	help
-	  Enable EXYNOS4412 SoC support
-
-config SOC_EXYNOS5250
-	bool "SAMSUNG EXYNOS5250"
-	default y
-	depends on ARCH_EXYNOS5
-	select ARCH_HAS_BANDGAP
-	select PINCTRL_EXYNOS
-	select PM_GENERIC_DOMAINS if PM
-	select S5P_PM if PM
-	select S5P_SLEEP if PM
-	select S5P_DEV_MFC
-	select SAMSUNG_DMADEV
-	help
-	  Enable EXYNOS5250 SoC support
-
-config SOC_EXYNOS5420
-	bool "SAMSUNG EXYNOS5420"
-	default y
-	depends on ARCH_EXYNOS5
-	select PM_GENERIC_DOMAINS if PM
-	select S5P_PM if PM
-	select S5P_SLEEP if PM
-	help
-	  Enable EXYNOS5420 SoC support
-
 config SOC_EXYNOS5440
 	bool "SAMSUNG EXYNOS5440"
 	default y
 	depends on ARCH_EXYNOS5
 	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_OPP
 	select HAVE_ARM_ARCH_TIMER
 	select AUTO_ZRELADDR
@@ -119,4 +53,19 @@  config SOC_EXYNOS5440
 
 endmenu
 
+config CPU_EXYNOS4210
+	bool
+
+config SOC_EXYNOS4212
+	bool
+
+config SOC_EXYNOS4412
+	bool
+
+config SOC_EXYNOS5250
+	bool
+
+config SOC_EXYNOS5420
+	bool
+
 endif