All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: 'Tomasz Figa' <t.figa@samsung.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, kyungmin.park@samsung.com,
	m.szyprowski@samsung.com
Subject: Re: [PATCH 4/4] ARM: EXYNOS: Kconfig: Remove dependencies on particular SoCs from DT machines
Date: Tue, 23 Oct 2012 21:28:42 +0200	[thread overview]
Message-ID: <16893010.3V1YKccvQL@flatron> (raw)
In-Reply-To: <020a01cdb122$2d888ae0$8899a0a0$%kim@samsung.com>

On Tuesday 23 of October 2012 22:27:41 Kukjin Kim wrote:
> Tomasz Figa wrote:
> > 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 <t.figa@samsung.com>
> > 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
> > --- a/arch/arm/mach-exynos/Kconfig
> > +++ b/arch/arm/mach-exynos/Kconfig
> > @@ -404,7 +404,6 @@ comment "Flattened Device Tree based board for
> > EXYNOS SoCs"
> > 
> >  config MACH_EXYNOS4_DT
> >  
> >  	bool "Samsung Exynos4 Machine using device tree"
> >  	depends on ARCH_EXYNOS4
> > 
> > -	select SOC_EXYNOS4210
> > 
> >  	select USE_OF
> >  	select ARM_AMBA
> >  	select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
> > 
> > @@ -419,7 +418,6 @@ config MACH_EXYNOS4_DT
> > 
> >  config MACH_EXYNOS5_DT
> >  
> >  	bool "SAMSUNG EXYNOS5 Machine using device tree"
> >  	depends on ARCH_EXYNOS5
> > 
> > -	select SOC_EXYNOS5250
> > 
> >  	select USE_OF
> >  	select ARM_AMBA
> >  	help
> > 
> > --
> > 1.7.12
> 
> 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

WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: EXYNOS: Kconfig: Remove dependencies on particular SoCs from DT machines
Date: Tue, 23 Oct 2012 21:28:42 +0200	[thread overview]
Message-ID: <16893010.3V1YKccvQL@flatron> (raw)
In-Reply-To: <020a01cdb122$2d888ae0$8899a0a0$%kim@samsung.com>

On Tuesday 23 of October 2012 22:27:41 Kukjin Kim wrote:
> Tomasz Figa wrote:
> > 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 <t.figa@samsung.com>
> > 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
> > --- a/arch/arm/mach-exynos/Kconfig
> > +++ b/arch/arm/mach-exynos/Kconfig
> > @@ -404,7 +404,6 @@ comment "Flattened Device Tree based board for
> > EXYNOS SoCs"
> > 
> >  config MACH_EXYNOS4_DT
> >  
> >  	bool "Samsung Exynos4 Machine using device tree"
> >  	depends on ARCH_EXYNOS4
> > 
> > -	select SOC_EXYNOS4210
> > 
> >  	select USE_OF
> >  	select ARM_AMBA
> >  	select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
> > 
> > @@ -419,7 +418,6 @@ config MACH_EXYNOS4_DT
> > 
> >  config MACH_EXYNOS5_DT
> >  
> >  	bool "SAMSUNG EXYNOS5 Machine using device tree"
> >  	depends on ARCH_EXYNOS5
> > 
> > -	select SOC_EXYNOS5250
> > 
> >  	select USE_OF
> >  	select ARM_AMBA
> >  	help
> > 
> > --
> > 1.7.12
> 
> 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

  reply	other threads:[~2012-10-23 19:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 13:02 [PATCH 0/4] ARM: EXYNOS: Kconfig cleanup Tomasz Figa
2012-10-08 13:02 ` Tomasz Figa
2012-10-08 13:02 ` [PATCH 1/4] ARM: EXYNOS: Kconfig: Rename CPU_EXYNOS4210 to SOC_EXYNOS4210 Tomasz Figa
2012-10-08 13:02   ` Tomasz Figa
2012-10-23 12:24   ` Kukjin Kim
2012-10-23 12:24     ` Kukjin Kim
2012-10-23 18:29     ` Tomasz Figa
2012-10-23 18:29       ` Tomasz Figa
2012-10-08 13:02 ` [PATCH 2/4] ARM: EXYNOS: Kconfig: Sort out dependencies between options Tomasz Figa
2012-10-08 13:02   ` Tomasz Figa
2012-10-23 12:35   ` Kukjin Kim
2012-10-23 12:35     ` Kukjin Kim
2012-10-23 18:57     ` Tomasz Figa
2012-10-23 18:57       ` Tomasz Figa
2012-10-08 13:02 ` [PATCH 3/4] ARM: EXYNOS: Kconfig: Group EXYNOS{4212,4412} into EXYNOS4X12 Tomasz Figa
2012-10-08 13:02   ` Tomasz Figa
2012-10-23 12:42   ` Kukjin Kim
2012-10-23 12:42     ` Kukjin Kim
2012-10-23 19:00     ` Tomasz Figa
2012-10-23 19:00       ` [PATCH 3/4] ARM: EXYNOS: Kconfig: Group EXYNOS{4212, 4412} " Tomasz Figa
2012-10-08 13:02 ` [PATCH 4/4] ARM: EXYNOS: Kconfig: Remove dependencies on particular SoCs from DT machines Tomasz Figa
2012-10-08 13:02   ` Tomasz Figa
2012-10-23 13:27   ` Kukjin Kim
2012-10-23 13:27     ` Kukjin Kim
2012-10-23 19:28     ` Tomasz Figa [this message]
2012-10-23 19:28       ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16893010.3V1YKccvQL@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=t.figa@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.