Skip to content

Commit 251f486

Browse files
nmeumnashif
authored andcommitted
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>
1 parent 9ca3f9a commit 251f486

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/serial/uart_sifive.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,12 @@ DEVICE_AND_API_INIT(uart_sifive_0, DT_SIFIVE_UART_0_LABEL,
399399
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
400400
static void uart_sifive_irq_cfg_func_0(void)
401401
{
402-
IRQ_CONNECT(DT_SIFIVE_UART_0_IRQ_0,
402+
IRQ_CONNECT(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_0_IRQ_0,
403403
CONFIG_UART_SIFIVE_PORT_0_IRQ_PRIORITY,
404404
uart_sifive_irq_handler, DEVICE_GET(uart_sifive_0),
405405
0);
406406

407-
irq_enable(DT_SIFIVE_UART_0_IRQ_0);
407+
irq_enable(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_0_IRQ_0);
408408
}
409409
#endif
410410

@@ -438,12 +438,12 @@ DEVICE_AND_API_INIT(uart_sifive_1, DT_SIFIVE_UART_1_LABEL,
438438
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
439439
static void uart_sifive_irq_cfg_func_1(void)
440440
{
441-
IRQ_CONNECT(DT_SIFIVE_UART_1_IRQ_0,
441+
IRQ_CONNECT(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_1_IRQ_0,
442442
CONFIG_UART_SIFIVE_PORT_1_IRQ_PRIORITY,
443443
uart_sifive_irq_handler, DEVICE_GET(uart_sifive_1),
444444
0);
445445

446-
irq_enable(DT_SIFIVE_UART_1_IRQ_0);
446+
irq_enable(RISCV_MAX_GENERIC_IRQ + DT_SIFIVE_UART_1_IRQ_0);
447447
}
448448
#endif
449449

0 commit comments

Comments
 (0)