Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #4771: 0001-aarch64-versal-Fix-uart-interrupt-issues.patch

File 0001-aarch64-versal-Fix-uart-interrupt-issues.patch, 1.5 KB (added by Aaron N, on 12/05/22 at 22:28:42)
  • bsps/aarch64/xilinx-versal/dev/serial/versal-uart.c

    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  
    3131
    3232#include <bspopts.h>
    3333
    34 #ifdef VERSAL_CONSOLE_USE_INTERRUPTS
    3534static uint32_t versal_uart_intr_all(void)
    3635{
    3736  return VERSAL_UARTI_OEI |
    static uint32_t versal_uart_intr_all(void) 
    4746    VERSAL_UARTI_RIMI;
    4847}
    4948
     49#ifdef VERSAL_CONSOLE_USE_INTERRUPTS
    5050static void versal_uart_intr_clear(volatile versal_uart *regs, uint32_t ints)
    5151{
    5252  regs->uarticr = ints;
    static void versal_uart_intr_enable(volatile versal_uart *regs, uint32_t ints) 
    6161{
    6262  regs->uartimsc |= ints;
    6363}
     64#endif
    6465
    6566static void versal_uart_intr_disable(volatile versal_uart *regs, uint32_t ints)
    6667{
    static void versal_uart_intr_disableall(volatile versal_uart *regs) 
    7273  versal_uart_intr_disable(regs, versal_uart_intr_all());
    7374}
    7475
     76#ifdef VERSAL_CONSOLE_USE_INTERRUPTS
    7577static bool versal_uart_flags_clear(volatile versal_uart *regs, uint32_t flags)
    7678{
    7779  return (regs->uartfr & flags) == 0;