@@ -991,7 +991,7 @@ config ARCH_MX6
imply SYS_THUMB_BUILD
imply SPL_SEPARATE_BSS
-if ARCH_MX6
+if ARCH_MX6 && SPL
config SPL_LDSCRIPT
default "arch/arm/mach-omap2/u-boot-spl.lds"
endif
@@ -2349,7 +2349,11 @@ source "arch/arm/Kconfig.debug"
endmenu
+if SPL
+
config SPL_LDSCRIPT
default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
+
+endif
@@ -76,6 +76,7 @@ config ARMV8_SEC_FIRMWARE_SUPPORT
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_ARMV8_SEC_FIRMWARE_SUPPORT
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.
@@ -81,10 +81,14 @@ config LOGLEVEL
8 - debug content
9 - debug hardware I/O
+if SPL
+
config SPL_LOGLEVEL
int
default LOGLEVEL
+endif
+
config TPL_LOGLEVEL
int
default LOGLEVEL
@@ -241,6 +245,7 @@ config SYS_STDIO_DEREGISTER
config SPL_SYS_STDIO_DEREGISTER
bool "Allow deregistering stdio devices in SPL"
+ depends on SPL
help
Generally there is no need to deregister stdio devices since they
are never deactivated. But if a stdio device is used which can be
@@ -19,6 +19,8 @@ config SPL
help
If you want to build SPL as well as the normal image, say Y.
+if SPL
+
config SPL_FRAMEWORK
bool "Support SPL based upon the common SPL framework"
depends on SPL
@@ -150,8 +152,6 @@ config HANDOFF
in boot. It is available in gd->handoff. The state state is set up
in SPL (or TPL if that is being used).
-if SPL
-
config SPL_HANDOFF
bool "Pass hand-off information from SPL to U-Boot proper"
depends on HANDOFF && SPL_BLOBLIST
@@ -3,6 +3,7 @@ config FIRMWARE
config SPL_FIRMWARE
bool "Enable Firmware driver support in SPL"
+ depends on SPL
depends on FIRMWARE
config SPL_ARM_PSCI_FW
@@ -490,6 +490,7 @@ config DM_PCA953X
config SPL_DM_PCA953X
bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports in SPL"
+ depends on SPL
depends on DM_GPIO
help
Say yes here to provide access to several register-oriented
@@ -504,6 +504,7 @@ config FS_LOADER
config SPL_FS_LOADER
bool "Enable loader driver for file system"
+ depends on SPL
help
This is file system generic loader which can be used to load
the file image from the storage into target such as memory.
@@ -123,6 +123,7 @@ config MMC_IO_VOLTAGE
config SPL_MMC_IO_VOLTAGE
bool "Support IO voltage configuration in SPL"
+ depends on SPL
help
IO voltage configuration allows selecting the voltage level of the IO
lines (not the level of main supply). This is required for UHS
@@ -153,6 +154,7 @@ config MMC_HS400_ES_SUPPORT
config SPL_MMC_HS400_ES_SUPPORT
bool "enable HS400 Enhanced Strobe support in SPL"
+ depends on SPL
help
The HS400 Enhanced Strobe mode is support by some eMMC. The bus
frequency is up to 200MHz. This mode does not tune the IO.
@@ -166,6 +168,7 @@ config MMC_HS400_SUPPORT
config SPL_MMC_HS400_SUPPORT
bool "enable HS400 support in SPL"
+ depends on SPL
select SPL_MMC_HS200_SUPPORT
help
The HS400 mode is support by some eMMC. The bus frequency is up to
@@ -179,6 +182,7 @@ config MMC_HS200_SUPPORT
config SPL_MMC_HS200_SUPPORT
bool "enable HS200 support in SPL"
+ depends on SPL
help
The HS200 mode is support by some eMMC. The bus frequency is up to
200MHz. This mode requires tuning the IO.
@@ -478,6 +482,7 @@ config MMC_SDHCI_ADMA
config SPL_MMC_SDHCI_ADMA
bool "Support SDHCI ADMA2 in SPL"
+ depends on SPL
depends on MMC_SDHCI
select MMC_SDHCI_ADMA_HELPERS
help
@@ -248,6 +248,7 @@ config SPI_FLASH_MTD
config SPL_SPI_FLASH_MTD
bool "SPI flash MTD support for SPL"
+ depends on SPL
depends on SPI_FLASH
help
Enable the MTD support for the SPI flash layer in SPL.
@@ -29,6 +29,7 @@ config POWER_LEGACY
config SPL_POWER_LEGACY
bool "Legacy power support in SPL"
+ depends on SPL
default y if POWER_LEGACY
help
Note: This is a legacy option. Use SPL_DM_PMIC instead.
@@ -8,6 +8,7 @@ config ACPI_PMC
config SPL_ACPI_PMC
bool "Power Manager (x86 PMC) support in SPL"
+ depends on SPL
default y if ACPI_PMC
help
Enable support for an x86-style power-management controller which
@@ -163,6 +163,7 @@ config DM_REGULATOR_FIXED
config SPL_DM_REGULATOR_FIXED
bool "Enable Driver Model for REGULATOR Fixed value in SPL"
+ depends on SPL_DM_REGULATOR
depends on DM_REGULATOR_FIXED
select SPL_DM_REGULATOR_COMMON
---help---
@@ -9,6 +9,7 @@ config FS_CBFS
config SPL_FS_CBFS
bool "Enable CBFS (Coreboot Filesystem) in SPL"
+ depends on SPL
help
Define this to enable support for reading from a Coreboot
filesystem. This is a ROM-based filesystem used for accessing files
@@ -239,6 +239,7 @@ config GENERATE_ACPI_TABLE
config SPL_TINY_MEMSET
bool "Use a very small memset() in SPL"
+ depends on SPL
help
The faster memset() is the arch-specific one (if available) enabled
by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
@@ -556,6 +557,7 @@ config MD5
config SPL_MD5
bool "Support MD5 algorithm in SPL"
+ depends on SPL
help
This option enables MD5 support in SPL. MD5 is an algorithm designed
in 1991 that produces a 16-byte digest (or checksum) from its input
@@ -640,6 +642,14 @@ config ZSTD
help
This enables Zstandard decompression library.
+config VPL_LZMA
+ bool "Enable LZMA decompression support for VPL build"
+ default y if LZMA
+ help
+ This enables support for LZMA compression algorithm for VPL boot.
+
+if SPL
+
config SPL_LZ4
bool "Enable LZ4 decompression support in SPL"
help
@@ -653,12 +663,6 @@ config SPL_LZMA
help
This enables support for LZMA compression algorithm for SPL boot.
-config VPL_LZMA
- bool "Enable LZMA decompression support for VPL build"
- default y if LZMA
- help
- This enables support for LZMA compression algorithm for VPL boot.
-
config SPL_LZO
bool "Enable LZO decompression support in SPL"
help
@@ -681,6 +685,8 @@ config SPL_ZSTD
help
This enables Zstandard decompression library in the SPL.
+endif
+
endmenu
config ERRNO_STR
@@ -749,7 +755,7 @@ config SPL_OF_LIBFDT
config SPL_OF_LIBFDT_ASSUME_MASK
hex "Mask of conditions to assume for libfdt"
- depends on SPL_OF_LIBFDT || FIT
+ depends on SPL_OF_LIBFDT || (SPL && FIT)
default 0xff
help
Use this to change the assumptions made by libfdt in SPL about the
It does not make sense to enable SPL options when not building SPL binary. So disallow selecting SPL options for non-SPL builds. Signed-off-by: Pali Rohár <pali@kernel.org> --- Changes in v2: * Move SPL compression options under one big if SPL ... endif --- arch/arm/Kconfig | 6 +++++- arch/arm/cpu/armv8/Kconfig | 2 ++ common/Kconfig | 5 +++++ common/spl/Kconfig | 4 ++-- drivers/firmware/Kconfig | 1 + drivers/gpio/Kconfig | 1 + drivers/misc/Kconfig | 1 + drivers/mmc/Kconfig | 5 +++++ drivers/mtd/spi/Kconfig | 1 + drivers/power/Kconfig | 1 + drivers/power/acpi_pmc/Kconfig | 1 + drivers/power/regulator/Kconfig | 1 + fs/cbfs/Kconfig | 1 + lib/Kconfig | 20 +++++++++++++------- 14 files changed, 40 insertions(+), 10 deletions(-)