From 9b3c716a827d350537386955772ed3dd39bf126c Mon Sep 17 00:00:00 2001
From: Aaron Nyholm <aaron.nyholm@southerninnovation.com>
Date: Tue, 6 Dec 2022 09:32:49 +1100
Subject: [PATCH] aarch64/versal: Fix uart interrupt issues
Tested on VCK190
---
bsps/aarch64/xilinx-versal/dev/serial/versal-uart.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bsps/aarch64/xilinx-versal/dev/serial/versal-uart.c b/bsps/aarch64/xilinx-versal/dev/serial/versal-uart.c
index b009f83c37..bf469f66b2 100644
a
|
b
|
|
31 | 31 | |
32 | 32 | #include <bspopts.h> |
33 | 33 | |
34 | | #ifdef VERSAL_CONSOLE_USE_INTERRUPTS |
35 | 34 | static uint32_t versal_uart_intr_all(void) |
36 | 35 | { |
37 | 36 | return VERSAL_UARTI_OEI | |
… |
… |
static uint32_t versal_uart_intr_all(void) |
47 | 46 | VERSAL_UARTI_RIMI; |
48 | 47 | } |
49 | 48 | |
| 49 | #ifdef VERSAL_CONSOLE_USE_INTERRUPTS |
50 | 50 | static void versal_uart_intr_clear(volatile versal_uart *regs, uint32_t ints) |
51 | 51 | { |
52 | 52 | regs->uarticr = ints; |
… |
… |
static void versal_uart_intr_enable(volatile versal_uart *regs, uint32_t ints) |
61 | 61 | { |
62 | 62 | regs->uartimsc |= ints; |
63 | 63 | } |
| 64 | #endif |
64 | 65 | |
65 | 66 | static void versal_uart_intr_disable(volatile versal_uart *regs, uint32_t ints) |
66 | 67 | { |
… |
… |
static void versal_uart_intr_disableall(volatile versal_uart *regs) |
72 | 73 | versal_uart_intr_disable(regs, versal_uart_intr_all()); |
73 | 74 | } |
74 | 75 | |
| 76 | #ifdef VERSAL_CONSOLE_USE_INTERRUPTS |
75 | 77 | static bool versal_uart_flags_clear(volatile versal_uart *regs, uint32_t flags) |
76 | 78 | { |
77 | 79 | return (regs->uartfr & flags) == 0; |