drivers/entropy: stm32: Convert driver to dt based configuration

Convert stm32 entropy driver to configuration based on device tree.
Select HAS_DTS_ENTROPY symbols and configure CONFIG_ENTROPY_NAME
in fixup files.

Since rng node is not enabled (or available) on all boards, it could
happen that symbol ENTROPY_STM32_RNG is not enabled and hence
ENTROPY_HAS_DRIVER not selected which ends up with a symbol
ENTROPY_NAME defined throufg Kconfig selection. Thus, in fixup file,
CONFIG_ENTROPY_NAME is defined only if not already defined.

Additionally, update boards that used to configure entropy by default.
On these boards, enable rng device in device tree and remove Kconfig
related configuration (which should not be part of default
configuration).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-04-03 11:55:50 +02:00 committed by Kumar Gala
commit 92c4092283
11 changed files with 35 additions and 21 deletions

View file

@ -44,4 +44,8 @@
#define DT_WDT_0_NAME DT_LABEL(DT_INST(0, st_stm32_watchdog))
#ifndef CONFIG_ENTROPY_NAME
#define CONFIG_ENTROPY_NAME DT_LABEL(DT_INST(0, st_stm32_rng))
#endif
/* End of SoC Level DTS fixup file */