drivers/rng: simplify Kconfig
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 2 Feb 2020 18:45:35 +0000 (19:45 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 11 Mar 2020 07:29:58 +0000 (08:29 +0100)
For all sandbox systems with DM_RNG we enable RNG_SANDBOX. So we can simply
set the default to yes.

All rng drivers depend on DM_RNG. Use a single 'if' instead of individual
dependencies. Now 'make menuconfig' shows the individual drivers neatly
indented under the DM_RNG entry.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
configs/sandbox64_defconfig
configs/sandbox_defconfig
drivers/rng/Kconfig

index d1c94b6..71a4d7f 100644 (file)
@@ -169,7 +169,6 @@ CONFIG_REMOTEPROC_SANDBOX=y
 CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RNG=y
-CONFIG_RNG_SANDBOX=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_SANDBOX_SERIAL=y
index 45b5475..f96891e 100644 (file)
@@ -189,7 +189,6 @@ CONFIG_REMOTEPROC_SANDBOX=y
 CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RNG=y
-CONFIG_RNG_SANDBOX=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_DEBUG_UART_SANDBOX=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_DEBUG_UART_SANDBOX=y
index 893b89d..c1aa43b 100644 (file)
@@ -6,16 +6,21 @@ config DM_RNG
          This interface is used to initialise the rng device and to
          read the random seed from the device.
 
          This interface is used to initialise the rng device and to
          read the random seed from the device.
 
+if DM_RNG
+
 config RNG_SANDBOX
        bool "Sandbox random number generator"
 config RNG_SANDBOX
        bool "Sandbox random number generator"
-       depends on SANDBOX && DM_RNG
+       depends on SANDBOX
+       default y
        help
          Enable random number generator for sandbox. This is an
          emulation of a rng device.
 
 config RNG_STM32MP1
        bool "Enable random number generator for STM32MP1"
        help
          Enable random number generator for sandbox. This is an
          emulation of a rng device.
 
 config RNG_STM32MP1
        bool "Enable random number generator for STM32MP1"
-       depends on ARCH_STM32MP && DM_RNG
+       depends on ARCH_STM32MP
        default n
        help
          Enable STM32MP1 rng driver.
        default n
        help
          Enable STM32MP1 rng driver.
+
+endif