Skip to content
Permalink
Browse files

drivers: serial: sifive: Fix UART extern interrupts

IRQ_CONNECT and irq_enable calls in the SiFive UART driver were
misconfigured when the conversion to DeviceTree support occurred.

See also: #10613

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
  • Loading branch information...
nmeum authored and nashif committed Apr 30, 2019
1 parent f940237 commit ec2f50363500ab9938c594cacf85f7db1c07d232
Showing with 4 additions and 4 deletions.
  1. +4 −4 drivers/serial/uart_sifive.c
@@ -399,12 +399,12 @@ DEVICE_AND_API_INIT(uart_sifive_0, DT_SIFIVE_UART_0_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void uart_sifive_irq_cfg_func_0(void)
{
IRQ_CONNECT(DT_SIFIVE_UART_0_IRQ_0,
IRQ_CONNECT(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_0_IRQ_0,
CONFIG_UART_SIFIVE_PORT_0_IRQ_PRIORITY,
uart_sifive_irq_handler, DEVICE_GET(uart_sifive_0),
0);

irq_enable(DT_SIFIVE_UART_0_IRQ_0);
irq_enable(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_0_IRQ_0);
}
#endif

@@ -438,12 +438,12 @@ DEVICE_AND_API_INIT(uart_sifive_1, DT_SIFIVE_UART_1_LABEL,
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
static void uart_sifive_irq_cfg_func_1(void)
{
IRQ_CONNECT(DT_SIFIVE_UART_1_IRQ_0,
IRQ_CONNECT(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_1_IRQ_0,
CONFIG_UART_SIFIVE_PORT_1_IRQ_PRIORITY,
uart_sifive_irq_handler, DEVICE_GET(uart_sifive_1),
0);

irq_enable(DT_SIFIVE_UART_1_IRQ_0);
irq_enable(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_1_IRQ_0);
}
#endif

0 comments on commit ec2f503

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