spl: Ensure all SPL symbols in Kconfig have some SPL dependency
Tighten up symbol dependencies in a number of places. Ensure that a SPL
specific option has at least a direct dependency on SPL. In places
where it's clear that we depend on something more specific, use that
dependency instead. This means in a very small number of places we can
drop redundant dependencies.
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ef79fc3..423fca2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1119,7 +1119,6 @@
select SPL_DM_SERIAL
select SPL_LIBCOMMON_SUPPORT
select SPL_LIBGENERIC_SUPPORT
- select SPL_NAND_SUPPORT if SPL_NAND_DENALI
select SPL_OF_CONTROL
select SPL_SEPARATE_BSS if TARGET_SOCFPGA_SOC64
select SPL_SERIAL
diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 72d12b4..1305238 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -76,6 +76,7 @@
config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
bool "Enable ARMv8 secure monitor firmware framework support for SPL"
+ depends on SPL
select SPL_FIT
select SPL_OF_LIBFDT
help
@@ -83,6 +84,7 @@
config SPL_RECOVER_DATA_SECTION
bool "save/restore SPL data section"
+ depends on SPL
help
Say Y here to save SPL data section for cold boot, and restore
at warm boot in SPL phase.
diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig
index 8f185c1..2ba7454 100644
--- a/arch/arm/mach-imx/imx8/Kconfig
+++ b/arch/arm/mach-imx/imx8/Kconfig
@@ -20,13 +20,13 @@
config IMX8QM
select IMX8
select SUPPORT_SPL
- select SPL_RECOVER_DATA_SECTION
+ select SPL_RECOVER_DATA_SECTION if SPL
bool
config IMX8QXP
select IMX8
select SUPPORT_SPL
- select SPL_RECOVER_DATA_SECTION
+ select SPL_RECOVER_DATA_SECTION if SPL
bool
config SYS_SOC