Skip to content

Commit

Permalink
drivers: uart_cc13xx_cc26xx: Get clock frequency from DTS
Browse files Browse the repository at this point in the history
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 Jul 24, 2019
1 parent 9e9f5ce commit 08f8abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/serial/uart_cc13xx_cc26xx.c
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 08f8abc

Please sign in to comment.