[PATCH 1/4] bsp/zynq-uart: Remove zynq_uart_instances from header

Jeff Kubascik Jeff.Kubascik at dornerworks.com
Sat Apr 6 00:53:47 UTC 2019


From: Jeff Kubascik <jeff.kubascik at dornerworks.com>

This variable is BSP specific and should be removed from the driver
header file.
---
 bsps/arm/xilinx-zynq/console/debug-console.c | 2 ++
 bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h | 4 +---
 bsps/arm/xilinx-zynq/start/bspreset.c        | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bsps/arm/xilinx-zynq/console/debug-console.c b/bsps/arm/xilinx-zynq/console/debug-console.c
index 38c0050e90..bc89a7f152 100644
--- a/bsps/arm/xilinx-zynq/console/debug-console.c
+++ b/bsps/arm/xilinx-zynq/console/debug-console.c
@@ -19,6 +19,8 @@
 
 #include <bspopts.h>
 
+extern zynq_uart_context zynq_uart_instances[2];
+
 static void zynq_debug_console_out(char c)
 {
   rtems_termios_device_context *base =
diff --git a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h b/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
index 76a0723f57..73fb663a29 100644
--- a/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
+++ b/bsps/arm/xilinx-zynq/include/bsp/zynq-uart.h
@@ -40,9 +40,7 @@ typedef struct {
   rtems_vector_number irq;
 } zynq_uart_context;
 
-const rtems_termios_device_handler zynq_uart_handler;
-
-extern zynq_uart_context zynq_uart_instances[2];
+extern const rtems_termios_device_handler zynq_uart_handler;
 
 #define ZYNQ_UART_DEFAULT_BAUD 115200
 
diff --git a/bsps/arm/xilinx-zynq/start/bspreset.c b/bsps/arm/xilinx-zynq/start/bspreset.c
index b57354c9e2..59c05eb417 100644
--- a/bsps/arm/xilinx-zynq/start/bspreset.c
+++ b/bsps/arm/xilinx-zynq/start/bspreset.c
@@ -16,6 +16,8 @@
 #include <bsp/bootcard.h>
 #include <bsp/zynq-uart.h>
 
+extern zynq_uart_context zynq_uart_instances[2];
+
 void bsp_reset(void)
 {
   volatile uint32_t *slcr_unlock = (volatile uint32_t *) 0xf8000008;
-- 
2.17.1




More information about the devel mailing list