]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
sm: Rework the Kconfig logic here
authorTom Rini <trini@konsulko.com>
Mon, 4 Aug 2025 21:51:11 +0000 (15:51 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 Aug 2025 16:58:46 +0000 (10:58 -0600)
The symbol "SM" is a library symbol and should not be prompted for. It
should be selected by the drivers that use it. In this case we need to
add a SANDBOX_SM symbol for the sandbox driver. The meson SM driver
cannot build on other platforms, so add the appropriate dependency.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
configs/sandbox_defconfig
drivers/sm/Kconfig
drivers/sm/Makefile

index e9a70b2604429a3add332c36c8a70f3b7df049bc..8c6693c693f6ab447592ceae6727c0a13cefea95 100644 (file)
@@ -324,7 +324,7 @@ CONFIG_RTC_RV8803=y
 CONFIG_RTC_HT1380=y
 CONFIG_SCSI=y
 CONFIG_SANDBOX_SERIAL=y
-CONFIG_SM=y
+CONFIG_SANDBOX_SM=y
 CONFIG_SMEM=y
 CONFIG_SANDBOX_SMEM=y
 CONFIG_SOUND=y
index 926af28633084b3c7a9c396dfb745fa2eeb52c64..8e500ed2ede503a8918f4045db3b301f6bff149c 100644 (file)
@@ -1,8 +1,17 @@
 config SM
-       bool "Enable Secure Monitor driver support"
+       bool
 
 config MESON_SM
        bool "Amlogic Secure Monitor driver"
+       depends on ARCH_MESON
        select SM
        help
          Say y here to enable the Amlogic secure monitor driver.
+
+config SANDBOX_SM
+       bool "Sandbox Secure Monitor driver"
+       depends on SANDBOX
+       select SM
+       help
+         Say y here to enable the Sandbox driver for the secure monitor
+         uclass.
index da81ee898abfed0a802ee77cc51a2bc87e86bf1e..5ac947350bded587e0b76604b97ed3d67db3d8db 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-y += sm-uclass.o
-obj-$(CONFIG_SANDBOX) += sandbox-sm.o
+obj-$(CONFIG_SM) += sm-uclass.o
+obj-$(CONFIG_SANDBOX_SM) += sandbox-sm.o
 obj-$(CONFIG_MESON_SM) += meson-sm.o