drivers: serial: ns16550: Fixed set_baud_rate usage in line ctrl set
Added pclk parameter to set_baud_rate function in line_ctrl_set api which was missed during update of set_baud_rate function definition update. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
This commit is contained in:
parent
b8d3e9c50e
commit
712dab4f04
|
@ -950,12 +950,21 @@ static int uart_ns16550_line_ctrl_set(const struct device *dev,
|
|||
uint32_t ctrl, uint32_t val)
|
||||
{
|
||||
struct uart_ns16550_dev_data *data = dev->data;
|
||||
uint32_t mdc, chg;
|
||||
const struct uart_ns16550_device_config *const dev_cfg = dev->config;
|
||||
uint32_t mdc, chg, pclk = 0U;
|
||||
k_spinlock_key_t key;
|
||||
|
||||
if (dev_cfg->sys_clk_freq != 0U) {
|
||||
pclk = dev_cfg->sys_clk_freq;
|
||||
} else {
|
||||
if (device_is_ready(dev_cfg->clock_dev)) {
|
||||
clock_control_get_rate(dev_cfg->clock_dev, dev_cfg->clock_subsys, &pclk);
|
||||
}
|
||||
}
|
||||
|
||||
switch (ctrl) {
|
||||
case UART_LINE_CTRL_BAUD_RATE:
|
||||
set_baud_rate(dev, val);
|
||||
set_baud_rate(dev, val, pclk);
|
||||
return 0;
|
||||
|
||||
case UART_LINE_CTRL_RTS:
|
||||
|
|
Loading…
Reference in a new issue