devices: entropy: Initialize drivers during PRE_KERNEL_1 stage

To ensure that early code that requires entropy has the HWRNG devices
fully initialized, initialize them all during PRE_KERNEL_1 stage.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
Leandro Pereira 2018-05-22 15:08:38 -07:00 committed by Andrew Boie
commit 30e558f333
4 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ static int entropy_mcux_rnga_init(struct device *);
DEVICE_AND_API_INIT(entropy_mcux_rnga, CONFIG_ENTROPY_NAME,
entropy_mcux_rnga_init, NULL, NULL,
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&entropy_mcux_rnga_api_funcs);
static int entropy_mcux_rnga_init(struct device *dev)

View file

@ -32,7 +32,7 @@ static int entropy_mcux_trng_init(struct device *);
DEVICE_AND_API_INIT(entropy_mcux_trng, CONFIG_ENTROPY_NAME,
entropy_mcux_trng_init, NULL, NULL,
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&entropy_mcux_trng_api_funcs);
static int entropy_mcux_trng_init(struct device *dev)

View file

@ -210,7 +210,7 @@ static struct entropy_stm32_rng_dev_data entropy_stm32_rng_data = {
DEVICE_AND_API_INIT(entropy_stm32_rng, CONFIG_ENTROPY_NAME,
entropy_stm32_rng_init,
&entropy_stm32_rng_data, &entropy_stm32_rng_config,
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&entropy_stm32_rng_api);
#endif

View file

@ -63,6 +63,6 @@ static const struct entropy_driver_api entropy_native_posix_api_funcs = {
DEVICE_AND_API_INIT(entropy_native_posix, CONFIG_ENTROPY_NAME,
entropy_native_posix_init, NULL, NULL,
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
&entropy_native_posix_api_funcs);