[PATCH] aarch64/versal: Add UART interrupt support
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Nov 22 07:01:32 UTC 2022
Hello Chris,
On 22/11/2022 03:03, chrisj at rtems.org wrote:
> +static void versal_uart_write_support(
> + rtems_termios_device_context *base,
> + const char *buf,
> + size_t len
> +)
> +{
> +#ifdef VERSAL_CONSOLE_USE_INTERRUPTS
> + versal_uart_context *ctx = (versal_uart_context *) base;
> + volatile versal_uart *regs = ctx->regs;
> +
> + if (len > 0) {
> + rtems_interrupt_lock_context lock_context;
> + size_t len_remaining = len;
> + const char *p = &buf[0];
> + rtems_interrupt_lock_acquire(&ctx->interrupt_lock, &lock_context);
you don't need an extra interrupt lock. The rtems_termios_device_context
already contains an interrupt lock, see
rtems_termios_device_lock_acquire(). This lock is held while the write
support handler is called.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list