mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
Cr50: Fix uart_tx_flush() to really flush
We were just checking to see if the UART TX unit was idle. We also need to be sure there aren't any bytes in the TX FIFO that haven't been clocked out yet. BUG=none BRANCH=none TEST=make buildall, manual Before, "crash watchdog" would truncate the trace dump as it rebooted. Now it doesn't. Change-Id: Icff828445801ce61a0a8f296b3d3e9fb300b7efc Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/311299 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
This commit is contained in:
@@ -57,8 +57,9 @@ void uart_tx_stop(void)
|
||||
|
||||
int uart_tx_in_progress(void)
|
||||
{
|
||||
/* Transmit is in progress if the TX idle bit is not set */
|
||||
return !(GR_UART_STATE(0) & GC_UART_STATE_TXIDLE_MASK);
|
||||
/* Transmit is in progress unless the TX FIFO is empty and idle. */
|
||||
return !(GR_UART_STATE(0) & (GC_UART_STATE_TXIDLE_MASK |
|
||||
GC_UART_STATE_TXEMPTY_MASK));
|
||||
}
|
||||
|
||||
void uart_tx_flush(void)
|
||||
|
||||
Reference in New Issue
Block a user