diff mbox series

[12/20] arm: mach-sc5xx: clean up Kconfig

Message ID 20240828-sc5xx-upstreaming-patches-v1-12-44d9adfdf327@analog.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series arm: Initial support for Analog Devices SC5xx boards | expand

Commit Message

Oliver Gaskell via B4 Relay Aug. 28, 2024, 10:02 a.m. UTC
From: Oliver Gaskell <Oliver.Gaskell@analog.com>

Moves common options between all SC5xx series boards to the ARCH_SC5XX
option instead of duplicating them.

Also, it was possible to select multiple of the SoC support options.
Given a U-Boot binary can only support a single platform, this moves
the SoC selection to a `choice`, making them mutually exclusive.

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
---
 arch/arm/Kconfig            |  8 ++++++++
 arch/arm/mach-sc5xx/Kconfig | 31 +++++++++++--------------------
 2 files changed, 19 insertions(+), 20 deletions(-)

Comments

Tom Rini Sept. 4, 2024, 9:22 p.m. UTC | #1
On Wed, Aug 28, 2024 at 11:02:20AM +0100, Oliver Gaskell wrote:
> Moves common options between all SC5xx series boards to the ARCH_SC5XX
> option instead of duplicating them.
> 
> Also, it was possible to select multiple of the SoC support options.
> Given a U-Boot binary can only support a single platform, this moves
> the SoC selection to a `choice`, making them mutually exclusive.
> 
> Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
> ---
>  arch/arm/Kconfig            |  8 ++++++++
>  arch/arm/mach-sc5xx/Kconfig | 31 +++++++++++--------------------
>  2 files changed, 19 insertions(+), 20 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index ba0359fed5..69decaa591 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1868,6 +1868,14 @@ config TARGET_LS1046AFRWY
>  
>  config ARCH_SC5XX
>  	bool "Analog Devices SC5XX-processor family"
> +	select SPL
> +	select SUPPORT_SPL
> +	select PANIC_HANG
> +	select DM
> +	select SPL_DM
> +	select DM_SERIAL
> +	select TIMER
> +	select ADI_SC5XX_TIMER

This should be sorted. It's not required but it makes adding more things
later easier. And yes, there's many unsorted examples. This applies
throughout the series.
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ba0359fed5..69decaa591 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1868,6 +1868,14 @@  config TARGET_LS1046AFRWY
 
 config ARCH_SC5XX
 	bool "Analog Devices SC5XX-processor family"
+	select SPL
+	select SUPPORT_SPL
+	select PANIC_HANG
+	select DM
+	select SPL_DM
+	select DM_SERIAL
+	select TIMER
+	select ADI_SC5XX_TIMER
 
 config TARGET_SL28
 	bool "Support sl28"
diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig
index 3846b4fd5b..d99b02b574 100644
--- a/arch/arm/mach-sc5xx/Kconfig
+++ b/arch/arm/mach-sc5xx/Kconfig
@@ -13,47 +13,38 @@ 
 
 if ARCH_SC5XX
 
+choice
+	prompt "SC5xx SoC Select"
+	help
+	  Selects which series of Analog Devices SC5xx chips to support.
+
 config SC57X
-	bool
-	select SUPPORT_SPL
+	bool "SC57x series"
 	select CPU_V7A
-	select PANIC_HANG
 	select COMMON_CLK_ADI_SC57X
-	select TIMER
-	select ADI_SC5XX_TIMER
 
 config SC58X
-	bool
-	select SUPPORT_SPL
+	bool "SC58x series"
 	select CPU_V7A
-	select PANIC_HANG
 	select COMMON_CLK_ADI_SC58X
-	select TIMER
-	select ADI_SC5XX_TIMER
 
 config SC59X
-	bool
-	select SUPPORT_SPL
+	bool "SC59x 32-bit series"
 	select CPU_V7A
-	select PANIC_HANG
 	select COMMON_CLK_ADI_SC594
-	select TIMER
-	select ADI_SC5XX_TIMER
 	select NOP_PHY
 
 config SC59X_64
-	bool
-	select SUPPORT_SPL
-	select PANIC_HANG
+	bool "SC59x 64-bit series"
 	select MMC_SDHCI_ADMA_FORCE_32BIT
 	select ARM64
-	select DM
-	select DM_SERIAL
 	select COMMON_CLK_ADI_SC598
 	select GICV3
 	select GIC_600_CLEAR_RDPD
 	select NOP_PHY
 
+endchoice
+
 config SC_BOOT_MODE
 	int "SC5XX boot mode select"
 	default 1