From: Tomasz Figa <hidden> Date: 2012-10-08 13:02:21
This patch series aims to consolidate low level Kconfig entries for Exynos
SoC series by adding missing or removing wrong dependencies, renaming
entries to match a single naming convention and introducing a common
parent entry for EXYNOS4212 and EXYNOS4412.
See particular patches for more detailed descriptions.
Tomasz Figa (4):
ARM: EXYNOS: Kconfig: Rename CPU_EXYNOS4210 to SOC_EXYNOS4210
ARM: EXYNOS: Kconfig: Sort out dependencies between options
ARM: EXYNOS: Kconfig: Group EXYNOS{4212,4412} into EXYNOS4X12
ARM: EXYNOS: Kconfig: Remove dependencies on particular SoCs from DT
machines
arch/arm/mach-exynos/Kconfig | 42 +++++++++++++++-----------------
arch/arm/mach-exynos/Makefile | 4 +--
arch/arm/mach-exynos/common.h | 4 +--
arch/arm/plat-samsung/include/plat/cpu.h | 2 +-
drivers/cpufreq/Kconfig.arm | 4 +--
drivers/devfreq/Kconfig | 2 +-
drivers/mmc/host/sdhci-s3c.c | 2 +-
drivers/tty/serial/samsung.c | 3 +--
8 files changed, 30 insertions(+), 33 deletions(-)
--
1.7.12
From: Tomasz Figa <hidden> Date: 2012-10-08 13:02:22
This patch renames CONFIG_CPU_EXYNOS4210 to CONFIG_SOC_EXYNOS4210 to
match the convention used by rest of Exynos SoCs and correctly represent
the reality (Exynos4210 is a SoC, not a CPU).
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 14 +++++++-------
arch/arm/mach-exynos/Makefile | 2 +-
arch/arm/mach-exynos/common.h | 2 +-
arch/arm/plat-samsung/include/plat/cpu.h | 2 +-
drivers/cpufreq/Kconfig.arm | 2 +-
drivers/devfreq/Kconfig | 2 +-
drivers/mmc/host/sdhci-s3c.c | 2 +-
drivers/tty/serial/samsung.c | 2 +-
8 files changed, 14 insertions(+), 14 deletions(-)
@@ -404,7 +404,7 @@ comment "Flattened Device Tree based board for EXYNOS SoCs"configMACH_EXYNOS4_DTbool"Samsung Exynos4 Machine using device tree"depends onARCH_EXYNOS4-selectCPU_EXYNOS4210+selectSOC_EXYNOS4210selectUSE_OFselectARM_AMBAselectHAVE_SAMSUNG_KEYPADifINPUT_KEYBOARD
From: Tomasz Figa <hidden> Date: 2012-10-08 13:02:23
This patch modifies the dependencies between Exynos-related Kconfig
options to represent the real dependencies between code units more
closely.
Originally it was possible to enable ARCH_EXYNOS{4,5} without any
SOC_EXYNOS_{4,5}.* enabled, which could end with compilation or link
errors. Now ARCH_EXYNOS{4,5} is only selected when there is a
SOC_EXYNOS_{4,5}.* enabled, which requires it.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 ++++++---------
drivers/devfreq/Kconfig | 2 +-
drivers/mmc/host/sdhci-s3c.c | 2 +-
drivers/tty/serial/samsung.c | 3 +--
4 files changed, 9 insertions(+), 13 deletions(-)
@@ -397,7 +395,6 @@ config MACH_SMDK4412selectMACH_SMDK4212helpMachinesupportforSamsungSMDK4412-endifcomment"Flattened Device Tree based board for EXYNOS SoCs"
From: Tomasz Figa <hidden> Date: 2012-10-08 13:02:24
This patch adds CONFIG_EXYNOS4X12, which is automatically selected
whenever there is at least one SoC from Exynos4x12 line enabled. All the
shared dependencies of EXYNOS{4212,4412} are moved to this new
option.
This fixes build with Exynos4412 enabled and Exynos4212 and Exynos4210
disabled and also allows to simplify conditional compilation in several
places.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 +++++++++------
arch/arm/mach-exynos/Makefile | 2 +-
arch/arm/mach-exynos/common.h | 2 +-
drivers/cpufreq/Kconfig.arm | 2 +-
4 files changed, 12 insertions(+), 9 deletions(-)
From: Tomasz Figa <hidden> Date: 2012-10-08 13:02:25
MACH_EXYNOS{4,5}_DT are used for whole SoC lines, so they should depend
on ARCH_EXYNOS{4,5} rather than on particular SoCs.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 2 --
1 file changed, 2 deletions(-)
@@ -404,7 +404,6 @@ comment "Flattened Device Tree based board for EXYNOS SoCs"configMACH_EXYNOS4_DTbool"Samsung Exynos4 Machine using device tree"depends onARCH_EXYNOS4-selectSOC_EXYNOS4210selectUSE_OFselectARM_AMBAselectHAVE_SAMSUNG_KEYPADifINPUT_KEYBOARD
From: Kukjin Kim <hidden> Date: 2012-10-23 12:24:54
Tomasz Figa wrote:
This patch renames CONFIG_CPU_EXYNOS4210 to CONFIG_SOC_EXYNOS4210 to
match the convention used by rest of Exynos SoCs and correctly represent
the reality (Exynos4210 is a SoC, not a CPU).
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Rafael J. Wysocki <redacted>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chris Ball <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grant Likely <redacted>
Cc: Linus Walleij <redacted>
Cc: Zhang Rui <rui.zhang@intel.com>
(+ MyungJoo Ham)
MyungJoo, should be fixed separately with this.
8<--------------------------------------
From: Kukjin Kim <redacted>
Subject: PM / devfreq: fix the dependency for EXYNOS4212 and EXYNOS4412
The CPU_EXYNOS4212 and CPU_EXYNOS4412 should be fixed.
From: Kukjin Kim <hidden> Date: 2012-10-23 12:35:32
Tomasz Figa wrote:
quoted hunk
This patch modifies the dependencies between Exynos-related Kconfig
options to represent the real dependencies between code units more
closely.
Originally it was possible to enable ARCH_EXYNOS{4,5} without any
SOC_EXYNOS_{4,5}.* enabled, which could end with compilation or link
errors. Now ARCH_EXYNOS{4,5} is only selected when there is a
SOC_EXYNOS_{4,5}.* enabled, which requires it.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 ++++++---------
drivers/devfreq/Kconfig | 2 +-
drivers/mmc/host/sdhci-s3c.c | 2 +-
drivers/tty/serial/samsung.c | 3 +--
4 files changed, 9 insertions(+), 13 deletions(-)
Basically, I agree with your approach. Its CONFIG_ARCH_EXYNOSx depends on
selecting own SOC.
BTW, I'm thinking, which one selecting is better to us board? Or SoC?...
# machine support
-if ARCH_EXYNOS4
-
Well, according to removing above, we can select following exynos4210 boards
on other stuff. Of course, when select board, regarding soc is selected
though. So I'm thinking I said as above.
quoted hunk
comment "EXYNOS4210 Boards"
config MACH_SMDKC210
@@ -397,7 +395,6 @@ config MACH_SMDK4412 select MACH_SMDK4212 help Machine support for Samsung SMDK4412-endif comment "Flattened Device Tree based board for EXYNOS SoCs"
From: Kukjin Kim <hidden> Date: 2012-10-23 12:42:04
Tomasz Figa wrote:
quoted hunk
This patch adds CONFIG_EXYNOS4X12, which is automatically selected
whenever there is at least one SoC from Exynos4x12 line enabled. All the
shared dependencies of EXYNOS{4212,4412} are moved to this new
option.
This fixes build with Exynos4412 enabled and Exynos4212 and Exynos4210
disabled and also allows to simplify conditional compilation in several
places.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 +++++++++------
arch/arm/mach-exynos/Makefile | 2 +-
arch/arm/mach-exynos/common.h | 2 +-
drivers/cpufreq/Kconfig.arm | 2 +-
4 files changed, 12 insertions(+), 9 deletions(-)
Well, do we _really_ need to define CONFIG_SOC_EXYNOS4X12 for supporting
common part of exynos4212 and exynos4412? In my opinion, it will cause
confusion rather than reducing code size. Let's just use its own name for
SoC.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
From: Kukjin Kim <hidden> Date: 2012-10-23 13:27:41
Tomasz Figa wrote:
quoted hunk
MACH_EXYNOS{4,5}_DT are used for whole SoC lines, so they should depend
on ARCH_EXYNOS{4,5} rather than on particular SoCs.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 2 --
1 file changed, 2 deletions(-)
Hmm...your comment is correct, but we need to think again its selecting
order, between ARCH name, SoC and board. In addition, in case of MACH_XXX_DT
depending on SoC is rather to be supposed...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
From: Tomasz Figa <hidden> Date: 2012-10-23 18:29:49
Hi Kgene,
Thanks for your comments.
On Tuesday 23 of October 2012 21:24:54 Kukjin Kim wrote:
Tomasz Figa wrote:
quoted
This patch renames CONFIG_CPU_EXYNOS4210 to CONFIG_SOC_EXYNOS4210 to
match the convention used by rest of Exynos SoCs and correctly
represent the reality (Exynos4210 is a SoC, not a CPU).
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Rafael J. Wysocki <redacted>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chris Ball <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grant Likely <redacted>
Cc: Linus Walleij <redacted>
Cc: Zhang Rui <rui.zhang@intel.com>
(+ MyungJoo Ham)
MyungJoo, should be fixed separately with this.
8<--------------------------------------
From: Kukjin Kim <redacted>
Subject: PM / devfreq: fix the dependency for EXYNOS4212 and EXYNOS4412
The CPU_EXYNOS4212 and CPU_EXYNOS4412 should be fixed.
Indeed, in result this would make my patch:
- depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412
+ depends on SOC_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412
(with your patch as a dependency)
quoted hunk
quoted
select ARCH_HAS_OPP
select DEVFREQ_GOV_SIMPLE_ONDEMAND
help
diff --git a/drivers/mmc/host/sdhci-s3c.c
b/drivers/mmc/host/sdhci-s3c.c index a50c205..b090415 100644
From: Tomasz Figa <hidden> Date: 2012-10-23 18:57:20
On Tuesday 23 of October 2012 21:35:32 Kukjin Kim wrote:
Tomasz Figa wrote:
quoted
This patch modifies the dependencies between Exynos-related Kconfig
options to represent the real dependencies between code units more
closely.
Originally it was possible to enable ARCH_EXYNOS{4,5} without any
SOC_EXYNOS_{4,5}.* enabled, which could end with compilation or link
errors. Now ARCH_EXYNOS{4,5} is only selected when there is a
SOC_EXYNOS_{4,5}.* enabled, which requires it.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 ++++++---------
drivers/devfreq/Kconfig | 2 +-
drivers/mmc/host/sdhci-s3c.c | 2 +-
drivers/tty/serial/samsung.c | 3 +--
4 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-exynos/Kconfig
b/arch/arm/mach-exynos/Kconfig index 05dcd07..9f91892 100644
Basically, I agree with your approach. Its CONFIG_ARCH_EXYNOSx depends
on selecting own SOC.
BTW, I'm thinking, which one selecting is better to us board? Or SoC?...
IMHO board selecting SoC selecting arch seems to represent reality the
best, because a board is based on particular SoC, which is based on
particular arch (family).
quoted
# machine support
-if ARCH_EXYNOS4
-
Well, according to removing above, we can select following exynos4210
boards on other stuff. Of course, when select board, regarding soc is
selected though. So I'm thinking I said as above.
Sorry, I'm not sure what you mean.
quoted
comment "EXYNOS4210 Boards"
config MACH_SMDKC210
@@ -397,7 +395,6 @@ config MACH_SMDK4412 select MACH_SMDK4212 help Machine support for Samsung SMDK4412-endif comment "Flattened Device Tree based board for EXYNOS SoCs"
I don't think so, because it depends on SoC not architecture. In
addition, we don't know ARM_EXYNOS4_BUS_DEVFREQ is available on
upcoming exynos4...
Hmm, good point, but wouldn't this apply as well to any Makefile option
using CONFIG_ARCH_EXYNOS4 at the moment? (e.g. clock-exynos4.o, dev-
audio.o, etc.)
Best regards,
Tomasz Figa
From: Tomasz Figa <hidden> Date: 2012-10-23 19:00:16
On Tuesday 23 of October 2012 21:42:04 Kukjin Kim wrote:
Tomasz Figa wrote:
quoted
This patch adds CONFIG_EXYNOS4X12, which is automatically selected
whenever there is at least one SoC from Exynos4x12 line enabled. All
the shared dependencies of EXYNOS{4212,4412} are moved to this new
option.
This fixes build with Exynos4412 enabled and Exynos4212 and Exynos4210
disabled and also allows to simplify conditional compilation in
several
places.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 15 +++++++++------
arch/arm/mach-exynos/Makefile | 2 +-
arch/arm/mach-exynos/common.h | 2 +-
drivers/cpufreq/Kconfig.arm | 2 +-
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-exynos/Kconfig
b/arch/arm/mach-exynos/Kconfig index 9f91892..6ea95f0 100644
Well, do we _really_ need to define CONFIG_SOC_EXYNOS4X12 for supporting
common part of exynos4212 and exynos4412? In my opinion, it will cause
confusion rather than reducing code size. Let's just use its own name
for SoC.
There are files that must be compiled if any of these SoCs is enabled, for
example clock-exynos4212.o (it contains clocks for both of them regardless
of the misleading name).
This common Kconfig entry would be used in Makefiles for such cases.
Best regards,
Tomasz Figa
From: Tomasz Figa <hidden> Date: 2012-10-23 19:28:42
On Tuesday 23 of October 2012 22:27:41 Kukjin Kim wrote:
Tomasz Figa wrote:
quoted
MACH_EXYNOS{4,5}_DT are used for whole SoC lines, so they should
depend
on ARCH_EXYNOS{4,5} rather than on particular SoCs.
Signed-off-by: Tomasz Figa <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-exynos/Kconfig
b/arch/arm/mach-exynos/Kconfig index 6ea95f0..2e82ce7 100644
Hmm...your comment is correct, but we need to think again its selecting
order, between ARCH name, SoC and board. In addition, in case of
MACH_XXX_DT depending on SoC is rather to be supposed...
With device tree the situation is a bit different than with boards,
because mach-exynos4-dt does not limit the scope to a single SoC, but
rather to the whole Exynos4 arch/family.
Making MACH_EXYNOS4_DT select all SOC_EXYNOS4* would remove the ability to
enable/disable support for particular Exynos4 SoCs, so in my opinion it is
not a good option.
Selecting ARCH_EXYNOS4 is not enough for the kernel to work, because at
least one SoC must be enabled.
So I think that letting the user select the SoCs he want to be supported
and making MACH_EXYNOS4_DT depend on at least one of Exynos4 SoCs (which
is implied by ARCH_EXYNOS4 enabled) is the most reasonable variant.
Btw. Maybe this could go in pair with something like
static char const *exynos4_dt_compat[] __initdata = {
+#ifdef CONFIG_SOC_EXYNOS4210
"samsung,exynos4210",
+#endif
/* and so on for any Exynos4 SoCs added in future... */
NULL
};
to make the kernel reject booting DT-enabled boards with unsupported SoCs.
What do you think?
Best regards,
Tomasz Figa