diff mbox series

arm64: zynqmp: Do not setup default SPL options without SPL

Message ID 8dc4b799d36f963a3e1ebb5b24793632dc360b61.1710258674.git.michal.simek@amd.com
State Accepted
Commit 425b85158f97b66ef23114f0a6f166dd7b4c4eac
Delegated to: Michal Simek
Headers show
Series arm64: zynqmp: Do not setup default SPL options without SPL | expand

Commit Message

Michal Simek March 12, 2024, 3:51 p.m. UTC
mach Kconfig file select some options independently of if SPL is actually
enabled. It ends up in situation that SPL is disabled but symbols are still
present in .config. That's why add SPL dependency for them but also group
them with other SPL options in ARCH_ZYNQMP fragment with using imply
option. This should ensure the same behavior as default y.

Also fixed SPL_ZYNQMP_PSU_INIT_ENABLED for the same.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

 arch/arm/Kconfig             |  8 ++++++++
 arch/arm/mach-zynqmp/Kconfig | 27 ++-------------------------
 2 files changed, 10 insertions(+), 25 deletions(-)

Comments

Michal Simek March 22, 2024, 11:55 a.m. UTC | #1
On 3/12/24 16:51, Michal Simek wrote:
> mach Kconfig file select some options independently of if SPL is actually
> enabled. It ends up in situation that SPL is disabled but symbols are still
> present in .config. That's why add SPL dependency for them but also group
> them with other SPL options in ARCH_ZYNQMP fragment with using imply
> option. This should ensure the same behavior as default y.
> 
> Also fixed SPL_ZYNQMP_PSU_INIT_ENABLED for the same.
> 
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
> 
>   arch/arm/Kconfig             |  8 ++++++++
>   arch/arm/mach-zynqmp/Kconfig | 27 ++-------------------------
>   2 files changed, 10 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index fde85dc0d537..0cf85edcb45d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1325,6 +1325,14 @@ config ARCH_ZYNQMP
>   	select SPL_DM_SPI_FLASH if SPL_DM_SPI
>   	select SPL_DM_MAILBOX if SPL
>   	imply SPL_FIRMWARE if SPL
> +	imply SPL_FS_FAT if SPL
> +	imply SPL_LIBCOMMON_SUPPORT if SPL
> +	imply SPL_LIBDISK_SUPPORT if SPL
> +	imply SPL_LIBGENERIC_SUPPORT if SPL
> +	imply SPL_MMC if SPL && MMC_SDHCI_ZYNQ
> +	imply SPL_SERIAL if SPL
> +	imply SPL_SPI if SPL && ZYNQ_QSPI
> +	imply SPL_SPI_FLASH_SUPPORT if SPL && ZYNQ_QSPI
>   	select SPL_SEPARATE_BSS if SPL
>   	select SUPPORT_SPL
>   	imply ZYNQMP_IPI if DM_MAILBOX
> diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig
> index 7e7c87d16fa9..eee34380f0a0 100644
> --- a/arch/arm/mach-zynqmp/Kconfig
> +++ b/arch/arm/mach-zynqmp/Kconfig
> @@ -1,29 +1,5 @@
>   if ARCH_ZYNQMP
>   
> -config SPL_FS_FAT
> -	default y
> -
> -config SPL_LIBCOMMON_SUPPORT
> -	default y
> -
> -config SPL_LIBDISK_SUPPORT
> -	default y
> -
> -config SPL_LIBGENERIC_SUPPORT
> -	default y
> -
> -config SPL_MMC
> -	default y if MMC_SDHCI_ZYNQ
> -
> -config SPL_SERIAL
> -	default y
> -
> -config SPL_SPI_FLASH_SUPPORT
> -	default y if ZYNQ_QSPI
> -
> -config SPL_SPI
> -	default y if ZYNQ_QSPI
> -
>   config SYS_BOARD
>   	string "Board name"
>   	default "zynqmp"
> @@ -143,7 +119,8 @@ config ZYNQMP_PSU_INIT_ENABLED
>   
>   config SPL_ZYNQMP_PSU_INIT_ENABLED
>   	bool "Include psu_init in SPL"
> -	default y if SPL
> +	depends on SPL
> +	default y
>   	select BOARD_EARLY_INIT_F
>   	help
>   	  Include psu_init by default in SPL.

Applied.
M
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fde85dc0d537..0cf85edcb45d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1325,6 +1325,14 @@  config ARCH_ZYNQMP
 	select SPL_DM_SPI_FLASH if SPL_DM_SPI
 	select SPL_DM_MAILBOX if SPL
 	imply SPL_FIRMWARE if SPL
+	imply SPL_FS_FAT if SPL
+	imply SPL_LIBCOMMON_SUPPORT if SPL
+	imply SPL_LIBDISK_SUPPORT if SPL
+	imply SPL_LIBGENERIC_SUPPORT if SPL
+	imply SPL_MMC if SPL && MMC_SDHCI_ZYNQ
+	imply SPL_SERIAL if SPL
+	imply SPL_SPI if SPL && ZYNQ_QSPI
+	imply SPL_SPI_FLASH_SUPPORT if SPL && ZYNQ_QSPI
 	select SPL_SEPARATE_BSS if SPL
 	select SUPPORT_SPL
 	imply ZYNQMP_IPI if DM_MAILBOX
diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig
index 7e7c87d16fa9..eee34380f0a0 100644
--- a/arch/arm/mach-zynqmp/Kconfig
+++ b/arch/arm/mach-zynqmp/Kconfig
@@ -1,29 +1,5 @@ 
 if ARCH_ZYNQMP
 
-config SPL_FS_FAT
-	default y
-
-config SPL_LIBCOMMON_SUPPORT
-	default y
-
-config SPL_LIBDISK_SUPPORT
-	default y
-
-config SPL_LIBGENERIC_SUPPORT
-	default y
-
-config SPL_MMC
-	default y if MMC_SDHCI_ZYNQ
-
-config SPL_SERIAL
-	default y
-
-config SPL_SPI_FLASH_SUPPORT
-	default y if ZYNQ_QSPI
-
-config SPL_SPI
-	default y if ZYNQ_QSPI
-
 config SYS_BOARD
 	string "Board name"
 	default "zynqmp"
@@ -143,7 +119,8 @@  config ZYNQMP_PSU_INIT_ENABLED
 
 config SPL_ZYNQMP_PSU_INIT_ENABLED
 	bool "Include psu_init in SPL"
-	default y if SPL
+	depends on SPL
+	default y
 	select BOARD_EARLY_INIT_F
 	help
 	  Include psu_init by default in SPL.