From 08f8abcfe46d52d6c1bbfe811a06bffef64bd7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Zi=C4=99cik?= Date: Wed, 29 May 2019 13:15:29 +0200 Subject: [PATCH] drivers: uart_cc13xx_cc26xx: Get clock frequency from DTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uart_cc13xx_cc26xx driver used system clock frequency as a base for baudrate calculation. This commit corrects that by obtaining the needed value from DTS. Signed-off-by: Piotr Zięcik --- drivers/serial/uart_cc13xx_cc26xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/uart_cc13xx_cc26xx.c b/drivers/serial/uart_cc13xx_cc26xx.c index 2bdcb67711..fd2a419265 100644 --- a/drivers/serial/uart_cc13xx_cc26xx.c +++ b/drivers/serial/uart_cc13xx_cc26xx.c @@ -361,7 +361,7 @@ static int uart_cc13xx_cc26xx_init_0(struct device *dev) static const struct uart_device_config uart_cc13xx_cc26xx_config_0 = { .regs = DT_TI_CC13XX_CC26XX_UART_40001000_BASE_ADDRESS, - .sys_clk_freq = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, + .sys_clk_freq = DT_TI_CC13XX_CC26XX_UART_40001000_CLOCKS_CLOCK_FREQUENCY, }; static struct uart_cc13xx_cc26xx_data uart_cc13xx_cc26xx_data_0 = { @@ -438,7 +438,7 @@ static int uart_cc13xx_cc26xx_init_1(struct device *dev) static const struct uart_device_config uart_cc13xx_cc26xx_config_1 = { .regs = DT_TI_CC13XX_CC26XX_UART_4000B000_BASE_ADDRESS, - .sys_clk_freq = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, + .sys_clk_freq = DT_TI_CC13XX_CC26XX_UART_4000B000_CLOCKS_CLOCK_FREQUENCY, }; static struct uart_cc13xx_cc26xx_data uart_cc13xx_cc26xx_data_1 = {