include/drivers/clock_control: stm32: Add XXX_ENABLED and XXX_FREQ

Add STM32_FOO_ENABLED and STM32_FOO_FREQ to STM32 fixed clocks:
HSI, HSE, MSI(S), CSI, LSI, LSE..

Replace STM32_LSE_CLOCK by STM32_LSE_FREQ and when possible
replace by new STM32_LSE_ENABLED when making sense.

Fix STM32_PLL3_FOO_ENABLE to STM32_PLL3_FOO_ENABLED

Additionally, add STM32_PLL_FOO_ENABLED definitions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2022-01-18 11:44:01 +01:00 committed by Carles Cufí
commit ceb8579854
7 changed files with 68 additions and 46 deletions

View file

@ -452,7 +452,7 @@ int stm32_clock_control_init(const struct device *dev)
#if STM32_MSI_PLL_MODE
#ifndef STM32_LSE_CLOCK
#ifndef STM32_LSE_ENABLED
#error "MSI Hardware auto calibration requires LSE clock activation"
#endif
/* Enable MSI hardware auto calibration */