driver: uart: clock control code refactoring
Small code refactorisation in order to ease up coming support of stm32f1 series by stm32 commom clock control driver Change-Id: I486cfba137cd048d65f0732e10aa29d877bb03e5 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
242ed389a3
commit
424c33825c
1 changed files with 3 additions and 3 deletions
|
@ -285,11 +285,11 @@ static int uart_stm32_init(struct device *dev)
|
||||||
|
|
||||||
__uart_stm32_get_clock(dev);
|
__uart_stm32_get_clock(dev);
|
||||||
/* enable clock */
|
/* enable clock */
|
||||||
#if defined(CONFIG_SOC_SERIES_STM32F1X)
|
#ifdef CONFIG_CLOCK_CONTROL_STM32_CUBE
|
||||||
clock_control_on(data->clock, config->clock_subsys);
|
|
||||||
#elif defined(CONFIG_CLOCK_CONTROL_STM32_CUBE)
|
|
||||||
clock_control_on(data->clock,
|
clock_control_on(data->clock,
|
||||||
(clock_control_subsys_t *)&config->pclken);
|
(clock_control_subsys_t *)&config->pclken);
|
||||||
|
#else
|
||||||
|
clock_control_on(data->clock, config->clock_subsys);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UartHandle->Instance = UART_STRUCT(dev);
|
UartHandle->Instance = UART_STRUCT(dev);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue