Skip to content

Commit 8bea4bf

Browse files
committed
tpl: Ensure all TPL symbols in Kconfig have some TPL dependency
Tighten up symbol dependencies in a number of places. Ensure that a TPL specific option has at least a direct dependency on TPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár <[email protected]> Signed-off-by: Tom Rini <[email protected]>
1 parent 5858b90 commit 8bea4bf

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

arch/x86/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ config SPL_ACPI_GPE
956956

957957
config TPL_ACPI_GPE
958958
bool "Support ACPI general-purpose events in TPL"
959+
depends on TPL
959960
help
960961
Enable a driver for ACPI GPEs to allow peripherals to send interrupts
961962
via ACPI to the OS. In U-Boot this is only used when U-Boot itself

boot/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ config SPL_BOOTSTAGE
622622

623623
config TPL_BOOTSTAGE
624624
bool "Boot timing and reported in TPL"
625-
depends on BOOTSTAGE
625+
depends on BOOTSTAGE && TPL
626626
help
627627
Enable recording of boot time in SPL. To make this visible to U-Boot
628628
proper, enable BOOTSTAGE_STASH as well. This will stash the timing

common/Kconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ config SPL_LOGLEVEL
8787

8888
config TPL_LOGLEVEL
8989
int
90+
depends on TPL
9091
default LOGLEVEL
9192

9293
config VPL_LOGLEVEL
@@ -408,7 +409,7 @@ endif
408409

409410
config TPL_LOG
410411
bool "Enable logging support in TPL"
411-
depends on LOG
412+
depends on LOG && TPL
412413
help
413414
This enables support for logging of status and debug messages. These
414415
can be displayed on the console, recorded in a memory buffer, or

drivers/core/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ config SPL_SYSCON
224224

225225
config TPL_SYSCON
226226
bool "Support system controllers in TPL"
227-
depends on SPL_REGMAP
227+
depends on TPL_REGMAP
228228
help
229229
Many SoCs have a number of system controllers which are dealt with
230230
as a group by a single driver. Some common functionality is provided

drivers/power/acpi_pmc/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config SPL_ACPI_PMC
1717

1818
config TPL_ACPI_PMC
1919
bool "Power Manager (x86 PMC) support in TPL"
20+
depends on TPL
2021
default y if ACPI_PMC
2122
help
2223
Enable support for an x86-style power-management controller which

drivers/ram/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ config SPL_RAM
1919

2020
config TPL_RAM
2121
bool "Enable RAM support in TPL"
22-
depends on RAM
22+
depends on RAM && TPL
2323
help
2424
The RAM subsystem adds a small amount of overhead to the image.
2525
If this is acceptable and you have a need to use RAM drivers in

lib/Kconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ config SPL_TINY_MEMSET
248248

249249
config TPL_TINY_MEMSET
250250
bool "Use a very small memset() in TPL"
251+
depends on TPL
251252
help
252253
The faster memset() is the arch-specific one (if available) enabled
253254
by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
@@ -771,7 +772,7 @@ config TPL_OF_LIBFDT
771772

772773
config TPL_OF_LIBFDT_ASSUME_MASK
773774
hex "Mask of conditions to assume for libfdt"
774-
depends on TPL_OF_LIBFDT || FIT
775+
depends on TPL_OF_LIBFDT || (FIT && TPL)
775776
default 0xff
776777
help
777778
Use this to change the assumptions made by libfdt in TPL about the

0 commit comments

Comments
 (0)