soc: stm32f3xx: support of Cube LL Clock driver

After introduction of STM32Cube based clock control driver for
stm32 family, provide its support on stm32f3x soc.
Clean up will have to be done afterwards.

Change-Id: I20480579f12a6fc1f1f6a51589981ac3f1d63ef0
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2017-02-09 09:15:01 +01:00 committed by Maureen Helm
commit 7ed7ccc020
3 changed files with 21 additions and 1 deletions

View file

@ -42,8 +42,12 @@ static int stm32f3_init(struct device *arg)
irq_unlock(key);
/* Update CMSIS SystemCoreClock variable (HCLK) */
#ifdef CONFIG_CLOCK_CONTROL_STM32_CUBE
/* At reset, System core clock is set to 4MHz */
SystemCoreClock = 4000000;
#else
SystemCoreClock = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */
return 0;
}