Skip to content
Permalink
Browse files

drivers: uart_cc13xx_cc26xx: Get clock frequency from DTS

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 <piotr.ziecik@nordicsemi.no>
  • Loading branch information...
pizi-nordic authored and carlescufi committed May 29, 2019
1 parent 9e9f5ce commit 08f8abcfe46d52d6c1bbfe811a06bffef64bd7e6
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 = {

0 comments on commit 08f8abc

Please sign in to comment.
You can’t perform that action at this time.