summaryrefslogtreecommitdiff
path: root/chip/npcx/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/npcx/uart.c')
-rw-r--r--chip/npcx/uart.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/chip/npcx/uart.c b/chip/npcx/uart.c
index a83de311ef..1e4d88f789 100644
--- a/chip/npcx/uart.c
+++ b/chip/npcx/uart.c
@@ -123,10 +123,14 @@ void uart_tx_start(void)
void uart_tx_stop(void)
{
+#ifdef NPCX_UART_FIFO_SUPPORT
+ uartn_tx_stop(CONSOLE_UART, 0);
+#else
uint8_t sleep_ena;
sleep_ena = (pad == UART_DEFAULT_PAD) ? 1 : 0;
uartn_tx_stop(CONSOLE_UART, sleep_ena);
+#endif
}
void uart_tx_flush(void)
@@ -196,6 +200,14 @@ void uart_ec_interrupt(void)
return;
}
#endif
+#ifdef NPCX_UART_FIFO_SUPPORT
+ if (!uartn_tx_in_progress(CONSOLE_UART)) {
+ if (uart_buffer_empty()) {
+ uartn_enable_tx_complete_int(CONSOLE_UART, 0);
+ enable_sleep(SLEEP_MASK_UART);
+ }
+ }
+#endif
/* Default pad. */
/* Read input FIFO until empty, then fill output FIFO */