[PATCH 3/3] Fixed ability to enable polling on the console using configure for imx7

Lou Woods irnhorse4 at gmail.com
Tue Mar 26 13:56:07 UTC 2019


From: Lou Woods <Lou.Woods at OARCorp.com>

---
 bsps/arm/imx/console/console-config.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/bsps/arm/imx/console/console-config.c b/bsps/arm/imx/console/console-config.c
index 8b8d9fb..d28f3c9 100644
--- a/bsps/arm/imx/console/console-config.c
+++ b/bsps/arm/imx/console/console-config.c
@@ -33,7 +33,7 @@
 typedef struct {
   rtems_termios_device_context base;
   volatile imx_uart *regs;
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   rtems_vector_number irq;
   int tx_in_progress;
 #endif
@@ -111,7 +111,7 @@ static void imx_uart_init_context(
   rtems_termios_device_context_initialize(&ctx->base, "UART");
   node = fdt_path_offset(fdt, serial);
   ctx->regs = imx_get_reg_of_node(fdt, node);
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   ctx->irq = imx_get_irq_of_node(fdt, node, 0);
 #endif
 }
@@ -178,7 +178,7 @@ BSP_output_char_function_type BSP_output_char = imx_output_char_init;
 
 BSP_polling_getchar_function_type BSP_poll_char = NULL;
 
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
 static void imx_uart_interrupt(void *arg)
 {
   rtems_termios_tty *tty;
@@ -242,7 +242,7 @@ static bool imx_uart_first_open(
 {
   imx_uart_context *ctx;
   volatile imx_uart *regs;
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   rtems_status_code sc;
   uint32_t ufcr;
 #endif
@@ -257,7 +257,7 @@ static bool imx_uart_first_open(
   rtems_termios_set_initial_baud(tty, 115200);
   imx_uart_set_attributes(base, term);
 
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   ufcr = regs->ufcr;
   ufcr = IMX_UART_UFCR_RXTL_SET(ufcr, 16);
   ufcr = IMX_UART_UFCR_TXTL_SET(ufcr, IMX_UART_TX_FIFO_LEVEL);
@@ -285,7 +285,7 @@ static void imx_uart_last_close(
   rtems_libio_open_close_args_t *args
 )
 {
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   imx_uart_context *ctx;
 
   ctx = (imx_uart_context *) base;
@@ -299,7 +299,7 @@ static void imx_uart_write(
   size_t len
 )
 {
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   imx_uart_context *ctx;
   volatile imx_uart *regs;
   int n;
@@ -339,7 +339,7 @@ static const rtems_termios_device_handler imx_uart_handler = {
   .last_close = imx_uart_last_close,
   .write = imx_uart_write,
   .set_attributes = imx_uart_set_attributes,
-#ifdef CONSOLE_USE_INTERRUPTS
+#if CONSOLE_USE_INTERRUPTS
   .mode = TERMIOS_IRQ_DRIVEN
 #else
   .poll_read = imx_uart_read_polled,
-- 
1.8.3.1




More information about the devel mailing list