Skip to content
Permalink
Browse files

drivers: entropy: nrf5: Fix dependency of the enabling Kconfig option

This driver makes use of the nRF RNG peripheral, so it can be used only
for SoCs that are equipped with one, and not all nRF SoCs are.
The option enabling the driver should then depend on `HAS_HW_NRF_RNG`,
which indicates the presence of this peripheral in a given SoC.

This patch removes also entries disabling this driver in default
configurations for nRF9160 SoC, as these were needed only because
of the invalid dependency of the ENTROPY_NRF5_RNG option.

A minor adjustment of Kconfig files of the nrf52_bsim board was
required as well, so that this board's configuration can properly
handle this corrected dependency.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
  • Loading branch information...
anangl authored and ioannisg committed Aug 8, 2019
1 parent 73df065 commit 16162f25b5097fb34fa99241a0372e7feb250bdc
@@ -25,6 +25,3 @@ CONFIG_UART_CONSOLE=y

# additional board options
CONFIG_GPIO_AS_PINRESET=y

# entropy driver doesn't support nRF9160 yet
CONFIG_ENTROPY_NRF5_RNG=n
@@ -28,6 +28,3 @@ CONFIG_UART_CONSOLE=y

# additional board options
CONFIG_GPIO_AS_PINRESET=y

# entropy driver doesn't support nRF9160 yet
CONFIG_ENTROPY_NRF5_RNG=n
@@ -2,6 +2,12 @@

if BOARD_NRF52_BSIM

# The following file is normally parsed only for the ARM architecture, which is
# used by Nordic SoCs, so to make the symbols defined in this file available for
# the simulated nrf52_bsim board, which uses the POSIX architecture, the file
# must be read also from here.
source "soc/arm/nordic_nrf/Kconfig.peripherals"

comment "NRF52_BSIM options"

config PRINTK_HOOK_INIT_PRIORITY
@@ -10,6 +10,10 @@ config BOARD_NRF52_BSIM
select CONSOLE_HAS_DRIVER
select NRF_RTC_TIMER
select CLOCK_CONTROL
# Indicate that the nRF RNG peripheral is present (actually a model
# of it), so that the corresponding driver becomes available (see
# dependencies of the ENTROPY_NRF5_RNG option).
select HAS_HW_NRF_RNG
help
Will produce a console Linux process which can be executed natively.
It needs the BabbleSim simulator both in compile time and to execute
@@ -16,7 +16,7 @@ if !ENTROPY_NRF_FORCE_ALT

menuconfig ENTROPY_NRF5_RNG
bool "nRF5 RNG driver"
depends on SOC_COMPATIBLE_NRF
depends on HAS_HW_NRF_RNG
select ENTROPY_HAS_DRIVER
default y
help

0 comments on commit 16162f2

Please sign in to comment.
You can’t perform that action at this time.