diff mbox series

[v3,3/4] soc: renesas: Merge if xxx into menu description

Message ID 87y2m4yeck.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series soc: renesas: use menu for Renesas SoC | expand

Commit Message

Kuninori Morimoto Aug. 24, 2020, 2:22 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current Kconfig is using if - endif.
This patch merges it into each menu description.
This is prepare for menu sorting.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/soc/renesas/Kconfig | 72 +++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 40 deletions(-)

Comments

Geert Uytterhoeven Sept. 1, 2020, 7:55 a.m. UTC | #1
Hi Morimoto-san,

On Mon, Aug 24, 2020 at 4:22 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Current Kconfig is using if - endif.
> This patch merges it into each menu description.
> This is prepare for menu sorting.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks for your patch!

> --- a/drivers/soc/renesas/Kconfig
> +++ b/drivers/soc/renesas/Kconfig
> @@ -44,17 +44,15 @@ config ARCH_RZN1
>         bool
>         select ARM_AMBA
>
> -if ARM && ARCH_RENESAS
> -
>  #comment "Renesas ARM SoCs System Type"
>
>  config ARCH_EMEV2
> -       bool "SoC Platform support for Emma Mobile EV2"
> +       bool "SoC Platform support for Emma Mobile EV2" if ARM && ARCH_RENESAS
>         select HAVE_ARM_SCU if SMP
>         select SYS_SUPPORTS_EM_STI

I'm not convinced duplicating these dependencies is better than a
big #if block.  It does allow you to sort all SoCs alphabetically, but that
mixes ARM32 and ARM64 parts, while choosing between ARM32 and ARM64
is an early and important decision (different ARCH= and CROSS_COMPILE=,
too).
In addition, only one set of Kconfig options is shown to the user
anyway.

What do other people think?

Gr{oetje,eeting}s,

                        Geert
Kuninori Morimoto Sept. 4, 2020, 12:03 a.m. UTC | #2
Hi Geert

> >  config ARCH_EMEV2
> > -       bool "SoC Platform support for Emma Mobile EV2"
> > +       bool "SoC Platform support for Emma Mobile EV2" if ARM && ARCH_RENESAS
> >         select HAVE_ARM_SCU if SMP
> >         select SYS_SUPPORTS_EM_STI
> 
> I'm not convinced duplicating these dependencies is better than a
> big #if block.  It does allow you to sort all SoCs alphabetically, but that
> mixes ARM32 and ARM64 parts, while choosing between ARM32 and ARM64
> is an early and important decision (different ARCH= and CROSS_COMPILE=,
> too).
> In addition, only one set of Kconfig options is shown to the user
> anyway.

OK, so let's keep big #if block.
So how about to having
	"ARM32 platform support ..." and
	"ARM64 platform support" ?
We can keep both #if block and alphabetical order

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Geert Uytterhoeven Sept. 4, 2020, 7:14 a.m. UTC | #3
Hi Morimoto-san,

On Fri, Sep 4, 2020 at 2:03 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> > >  config ARCH_EMEV2
> > > -       bool "SoC Platform support for Emma Mobile EV2"
> > > +       bool "SoC Platform support for Emma Mobile EV2" if ARM && ARCH_RENESAS
> > >         select HAVE_ARM_SCU if SMP
> > >         select SYS_SUPPORTS_EM_STI
> >
> > I'm not convinced duplicating these dependencies is better than a
> > big #if block.  It does allow you to sort all SoCs alphabetically, but that
> > mixes ARM32 and ARM64 parts, while choosing between ARM32 and ARM64
> > is an early and important decision (different ARCH= and CROSS_COMPILE=,
> > too).
> > In addition, only one set of Kconfig options is shown to the user
> > anyway.
>
> OK, so let's keep big #if block.
> So how about to having
>         "ARM32 platform support ..." and
>         "ARM64 platform support" ?
> We can keep both #if block and alphabetical order

Yes, that looks fine to me. Thanks!

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
index 7d63a13e5b78..a6ab506377fb 100644
--- a/drivers/soc/renesas/Kconfig
+++ b/drivers/soc/renesas/Kconfig
@@ -44,17 +44,15 @@  config ARCH_RZN1
 	bool
 	select ARM_AMBA
 
-if ARM && ARCH_RENESAS
-
 #comment "Renesas ARM SoCs System Type"
 
 config ARCH_EMEV2
-	bool "SoC Platform support for Emma Mobile EV2"
+	bool "SoC Platform support for Emma Mobile EV2" if ARM && ARCH_RENESAS
 	select HAVE_ARM_SCU if SMP
 	select SYS_SUPPORTS_EM_STI
 
 config ARCH_R7S72100
-	bool "SoC Platform support for RZ/A1H"
+	bool "SoC Platform support for RZ/A1H" if ARM && ARCH_RENESAS
 	select ARM_ERRATA_754322
 	select PM
 	select PM_GENERIC_DOMAINS
@@ -63,14 +61,14 @@  config ARCH_R7S72100
 	select SYS_SUPPORTS_SH_MTU2
 
 config ARCH_R7S9210
-	bool "SoC Platform support for RZ/A2"
+	bool "SoC Platform support for RZ/A2" if ARM && ARCH_RENESAS
 	select PM
 	select PM_GENERIC_DOMAINS
 	select RENESAS_OSTM
 	select RENESAS_RZA1_IRQC
 
 config ARCH_R8A73A4
-	bool "SoC Platform support for R-Mobile APE6"
+	bool "SoC Platform support for R-Mobile APE6" if ARM && ARCH_RENESAS
 	select ARCH_RMOBILE
 	select ARM_ERRATA_798181 if SMP
 	select ARM_ERRATA_814220
@@ -78,49 +76,49 @@  config ARCH_R8A73A4
 	select RENESAS_IRQC
 
 config ARCH_R8A7740
-	bool "SoC Platform support for R-Mobile A1"
+	bool "SoC Platform support for R-Mobile A1" if ARM && ARCH_RENESAS
 	select ARCH_RMOBILE
 	select ARM_ERRATA_754322
 	select RENESAS_INTC_IRQPIN
 
 config ARCH_R8A7742
-	bool "SoC Platform support for RZ/G1H"
+	bool "SoC Platform support for RZ/G1H" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select ARM_ERRATA_814220
 	select SYSC_R8A7742
 
 config ARCH_R8A7743
-	bool "SoC Platform support for RZ/G1M"
+	bool "SoC Platform support for RZ/G1M" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select SYSC_R8A7743
 
 config ARCH_R8A7744
-	bool "SoC Platform support for RZ/G1N"
+	bool "SoC Platform support for RZ/G1N" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select SYSC_R8A7743
 
 config ARCH_R8A7745
-	bool "SoC Platform support for RZ/G1E"
+	bool "SoC Platform support for RZ/G1E" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_814220
 	select SYSC_R8A7745
 
 config ARCH_R8A77470
-	bool "SoC Platform support for RZ/G1C"
+	bool "SoC Platform support for RZ/G1C" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_814220
 	select SYSC_R8A77470
 
 config ARCH_R8A7778
-	bool "SoC Platform support for R-Car M1A"
+	bool "SoC Platform support for R-Car M1A" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN1
 	select ARM_ERRATA_754322
 
 config ARCH_R8A7779
-	bool "SoC Platform support for R-Car H1"
+	bool "SoC Platform support for R-Car H1" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN1
 	select ARM_ERRATA_754322
 	select ARM_GLOBAL_TIMER
@@ -129,7 +127,7 @@  config ARCH_R8A7779
 	select SYSC_R8A7779
 
 config ARCH_R8A7790
-	bool "SoC Platform support for R-Car H2"
+	bool "SoC Platform support for R-Car H2" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select ARM_ERRATA_814220
@@ -137,38 +135,38 @@  config ARCH_R8A7790
 	select SYSC_R8A7790
 
 config ARCH_R8A7791
-	bool "SoC Platform support for R-Car M2-W"
+	bool "SoC Platform support for R-Car M2-W" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select I2C
 	select SYSC_R8A7791
 
 config ARCH_R8A7792
-	bool "SoC Platform support for R-Car V2H"
+	bool "SoC Platform support for R-Car V2H" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select SYSC_R8A7792
 
 config ARCH_R8A7793
-	bool "SoC Platform support for R-Car M2-N"
+	bool "SoC Platform support for R-Car M2-N" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_798181 if SMP
 	select I2C
 	select SYSC_R8A7791
 
 config ARCH_R8A7794
-	bool "SoC Platform support for R-Car E2"
+	bool "SoC Platform support for R-Car E2" if ARM && ARCH_RENESAS
 	select ARCH_RCAR_GEN2
 	select ARM_ERRATA_814220
 	select SYSC_R8A7794
 
 config ARCH_R9A06G032
-	bool "SoC Platform support for RZ/N1D"
+	bool "SoC Platform support for RZ/N1D" if ARM && ARCH_RENESAS
 	select ARCH_RZN1
 	select ARM_ERRATA_814220
 
 config ARCH_SH73A0
-	bool "SoC Platform support for SH-Mobile AG5"
+	bool "SoC Platform support for SH-Mobile AG5" if ARM && ARCH_RENESAS
 	select ARCH_RMOBILE
 	select ARM_ERRATA_754322
 	select ARM_GLOBAL_TIMER
@@ -176,47 +174,43 @@  config ARCH_SH73A0
 	select HAVE_ARM_TWD if SMP
 	select RENESAS_INTC_IRQPIN
 
-endif # ARM
-
-if ARM64
-
 config ARCH_R8A774A1
-	bool "SoC Platform support for RZ/G2M"
+	bool "SoC Platform support for RZ/G2M" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A774A1
 	help
 	  This enables support for the Renesas RZ/G2M SoC.
 
 config ARCH_R8A774B1
-	bool "SoC Platform support for RZ/G2N"
+	bool "SoC Platform support for RZ/G2N" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A774B1
 	help
 	  This enables support for the Renesas RZ/G2N SoC.
 
 config ARCH_R8A774C0
-	bool "SoC Platform support for RZ/G2E"
+	bool "SoC Platform support for RZ/G2E" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A774C0
 	help
 	  This enables support for the Renesas RZ/G2E SoC.
 
 config ARCH_R8A774E1
-	bool "SoC Platform support for RZ/G2H"
+	bool "SoC Platform support for RZ/G2H" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A774E1
 	help
 	  This enables support for the Renesas RZ/G2H SoC.
 
 config ARCH_R8A77950
-	bool "SoC Platform support for R-Car H3 ES1.x"
+	bool "SoC Platform support for R-Car H3 ES1.x" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A7795
 	help
 	  This enables support for the Renesas R-Car H3 SoC (revision 1.x).
 
 config ARCH_R8A77951
-	bool "SoC Platform support for R-Car H3 ES2.0+"
+	bool "SoC Platform support for R-Car H3 ES2.0+" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A7795
 	help
@@ -224,56 +218,54 @@  config ARCH_R8A77951
 	  later).
 
 config ARCH_R8A77960
-	bool "SoC Platform support for R-Car M3-W"
+	bool "SoC Platform support for R-Car M3-W" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77960
 	help
 	  This enables support for the Renesas R-Car M3-W SoC.
 
 config ARCH_R8A77961
-	bool "SoC Platform support for R-Car M3-W+"
+	bool "SoC Platform support for R-Car M3-W+" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77961
 	help
 	  This enables support for the Renesas R-Car M3-W+ SoC.
 
 config ARCH_R8A77965
-	bool "SoC Platform support for R-Car M3-N"
+	bool "SoC Platform support for R-Car M3-N" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77965
 	help
 	  This enables support for the Renesas R-Car M3-N SoC.
 
 config ARCH_R8A77970
-	bool "SoC Platform support for R-Car V3M"
+	bool "SoC Platform support for R-Car V3M" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77970
 	help
 	  This enables support for the Renesas R-Car V3M SoC.
 
 config ARCH_R8A77980
-	bool "SoC Platform support for R-Car V3H"
+	bool "SoC Platform support for R-Car V3H" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77980
 	help
 	  This enables support for the Renesas R-Car V3H SoC.
 
 config ARCH_R8A77990
-	bool "SoC Platform support for R-Car E3"
+	bool "SoC Platform support for R-Car E3" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77990
 	help
 	  This enables support for the Renesas R-Car E3 SoC.
 
 config ARCH_R8A77995
-	bool "SoC Platform support for R-Car D3"
+	bool "SoC Platform support for R-Car D3" if ARM64
 	select ARCH_RCAR_GEN3
 	select SYSC_R8A77995
 	help
 	  This enables support for the Renesas R-Car D3 SoC.
 
-endif # ARM64
-
 # SoC
 config SYSC_R8A7742
 	bool "System Controller support for RZ/G1H" if COMPILE_TEST