summaryrefslogtreecommitdiffstats
path: root/bsps/arm/xilinx-zynq
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2024-03-18 14:47:59 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2024-03-27 20:22:53 +0100
commit4c2da2c3435ddeaa394b2351aa441c3bb1f3a7c9 (patch)
tree6b5a61acf3ad95c28fc6435c84845e6d8b7118c8 /bsps/arm/xilinx-zynq
parentbsps: Move declarations to <bsp/irq-generic.h> (diff)
downloadrtems-4c2da2c3435ddeaa394b2351aa441c3bb1f3a7c9.tar.bz2
dev/serial: Simplify some Zynq UART functions
Make the initialization and polled functions independent of the Termios context. This helps to implement the kernel I/O support without a dependency on the Termios framework.
Diffstat (limited to 'bsps/arm/xilinx-zynq')
-rw-r--r--bsps/arm/xilinx-zynq/console/debug-console.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/bsps/arm/xilinx-zynq/console/debug-console.c b/bsps/arm/xilinx-zynq/console/debug-console.c
index d398ca7988..4c636038af 100644
--- a/bsps/arm/xilinx-zynq/console/debug-console.c
+++ b/bsps/arm/xilinx-zynq/console/debug-console.c
@@ -44,24 +44,18 @@
static void zynq_debug_console_out(char c)
{
- rtems_termios_device_context *base =
- &zynq_uart_instances[BSP_CONSOLE_MINOR].base;
-
- zynq_uart_write_polled(base, c);
+ zynq_uart_write_char_polled(zynq_uart_instances[BSP_CONSOLE_MINOR].regs, c);
}
static void zynq_debug_console_early_init(char c);
static void zynq_debug_console_init(void)
{
- rtems_termios_device_context *base =
- &zynq_uart_instances[BSP_CONSOLE_MINOR].base;
-
if (BSP_output_char != zynq_debug_console_early_init) {
return;
}
- zynq_uart_initialize(base);
+ zynq_uart_initialize(zynq_uart_instances[BSP_CONSOLE_MINOR].regs);
BSP_output_char = zynq_debug_console_out;
}
@@ -73,10 +67,7 @@ static void zynq_debug_console_early_init(char c)
static int zynq_debug_console_in(void)
{
- rtems_termios_device_context *base =
- &zynq_uart_instances[BSP_CONSOLE_MINOR].base;
-
- return zynq_uart_read_polled(base);
+ return zynq_uart_read_char_polled(zynq_uart_instances[BSP_CONSOLE_MINOR].regs);
}
BSP_output_char_function_type BSP_output_char = zynq_debug_console_early_init;