Skip to contentSkip to conversation

rng: Tighten some rng driver dependencies

PATCH In review Tom Rini 1 participant 2 messages Sep 26, 2025 – Oct 9, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 rng: Tighten some rng driver dependencies

In this case, the NPCM RNG driver also provides some of the functions that are implemented in the generic LIB_RAND file, so only allow this to be built when that is disabled. The exynos RNG driver depends on ARM SMCCC calls and so cannot be built outside of that. Express these requirements in Kconfig as well.

---
 drivers/rng/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rng/Kconfig +2 -2
index b35d8c66b9c6..19b2b7076774 100644
@@ -40,7 +40,7 @@ config RNG_MSM
 
 config RNG_NPCM
 	bool "Nuvoton NPCM SoCs Random Number Generator support"
-	depends on DM_RNG
+	depends on DM_RNG && !LIB_RAND
 	help
 	  Enable random number generator on NPCM SoCs.
 	  This unit can provide 750 to 1000 random bits per second
@@ -122,7 +122,7 @@ config RNG_TURRIS_RWTM
 
 config RNG_EXYNOS
 	bool "Samsung Exynos True Random Number Generator support"
-	depends on DM_RNG
+	depends on DM_RNG && ARM
 	help
 	  Enable support for True Random Number Generator (TRNG) available on
 	  Exynos SoCs.
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 8 lines · Tom Rini

In this case, the NPCM RNG driver also provides some of the functions that are implemented in the generic LIB_RAND file, so only allow this to be built when that is disabled. The exynos RNG driver depends on ARM SMCCC calls and so cannot be built outside of that. Express these requirements in Kconfig as well.

[...]

Applied to u-boot/master, thanks!

[1/1] rng: Tighten some rng driver dependencies

      commit: af4acc7186fac32b69e2a0ad5e1ffb4677bfa825
Signature · 1 line
Tom