From 170e93bb17efb1ad7b3fc6be2bdb207f803ccdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Zi=C4=99cik?= Date: Thu, 11 Apr 2019 14:28:52 +0200 Subject: [PATCH] drivers: uart_cc32xx: Get clock frequency from DTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uart_cc32xx 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_cc32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_cc32xx.c b/drivers/serial/uart_cc32xx.c index 1e0d4fe92f1..0b29ed83c4b 100644 --- a/drivers/serial/uart_cc32xx.c +++ b/drivers/serial/uart_cc32xx.c @@ -38,7 +38,7 @@ static void uart_cc32xx_isr(void *arg); static const struct uart_device_config uart_cc32xx_dev_cfg_0 = { .base = (void *)DT_TI_CC32XX_UART_4000C000_BASE_ADDRESS, - .sys_clk_freq = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, + .sys_clk_freq = DT_TI_CC32XX_UART_4000C000_CLOCKS_CLOCK_FREQUENCY, }; static struct uart_cc32xx_dev_data_t uart_cc32xx_dev_data_0 = {