summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/uart_buffering.c7
-rw-r--r--include/config.h10
2 files changed, 17 insertions, 0 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index 8ff8f1cc12..86a3482951 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -68,6 +68,12 @@ static int __tx_char(void *context, int c)
if (c == '\n' && __tx_char(NULL, '\r'))
return 1;
+#if defined CONFIG_POLLING_UART
+ (void) tx_buf_next;
+ (void) tx_buf_new_tail;
+ uart_write_char(c);
+#else
+
tx_buf_next = TX_BUF_NEXT(tx_buf_head);
if (tx_buf_next == tx_buf_tail)
return 1;
@@ -89,6 +95,7 @@ static int __tx_char(void *context, int c)
tx_buf[tx_buf_head] = c;
tx_buf_head = tx_buf_next;
+#endif
return 0;
}
diff --git a/include/config.h b/include/config.h
index 603062f6da..983184d909 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1220,6 +1220,16 @@
*/
#undef CONFIG_PMU_POWERINFO
+/*
+ * Enable this config to make console UART self sufficient (no other
+ * initialization required before uart_init(), no interrupts, uart_tx_char()
+ * does not exit until character finished transmitting).
+ *
+ * This is useful during early hardware bringup, each platform needs to
+ * implement its own code to support this.
+ */
+#undef CONFIG_POLLING_UART
+
/*****************************************************************************/
/*