drivers: entropy: stm32: RCC_HSI48_SUPPORT not always defined

RCC_HSI48_SUPPORT is not always defined even if SOC support HSI48.
Ex: STM32H7 family which support HSI48 but doesn't have
switch RCC_HSI48_SUPPORT.
This switch is usefull when in the same STM32 family some soc have
HSI487 and some other soc not.

So instead, use CMSIS register defines (which depends on family)

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2020-08-26 10:23:10 +02:00 committed by Ioannis Glaropoulos
parent 6493af2714
commit 7b8624a058

View file

@ -176,7 +176,8 @@ static int entropy_stm32_rng_init(struct device *dev)
* Linear Feedback Shift Register
*/
LL_RCC_SetRNGClockSource(LL_RCC_RNG_CLKSOURCE_PLLSAI1);
#elif defined(RCC_HSI48_SUPPORT)
#elif defined(RCC_CR2_HSI48ON) || defined(RCC_CR_HSI48ON) \
|| defined(RCC_CRRCR_HSI48ON)
#if CONFIG_SOC_SERIES_STM32L0X
/* We need SYSCFG to control VREFINT, so make sure it is clocked */