summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.com>2019-06-24 11:49:58 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-25 01:37:54 +0000
commit23b0aa42da0e04e36893d9e8e1662f2b58ff621f (patch)
tree2299f7a5bf75d274418ee8d91deec828de56f9f9 /chip
parent0c6820b6fb2f8f2f4fdfe0f2612cb0c766059644 (diff)
downloadchrome-ec-23b0aa42da0e04e36893d9e8e1662f2b58ff621f.tar.gz
ISH: fix UART output error
Currently when there're a lot of prints to UART we don't see all of the prints. For example, -------- code -------- for (i = 0, v = 0x000FFFF; i < 1000; i++, v++) CPRINTF(">> UART TEST [%d] = 0x%08x\n", i, v); ---------------------- -------- output -------- >> UART TEST [0] = 0x0000ffff >> UART TEST [1] = 0x00010000 : : >> UART TEST [56] = 0x00010037 >> UART TEST [57] = 0x00010038 >> UART TEST>>>>>>>>>>>>>>[0.407104 HC 0x400b err 1] <<= print error ------------------------ It only happens with lots of prints and, based on the output, it looks like we are overwriting data before it's sent out. So This patch changes the bit used to see if transmitter is ready for new data from DTRQ to TEMT. BUG=none BRANCH=none TEST=Ran the code above and verified the output on Arcara platform. Change-Id: I21e9209510cade39f95e161f23ee373007b90e50 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1672755 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/ish/uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/ish/uart.c b/chip/ish/uart.c
index 4629f16418..63709e86c7 100644
--- a/chip/ish/uart.c
+++ b/chip/ish/uart.c
@@ -96,7 +96,7 @@ void uart_tx_flush(void)
int uart_tx_ready(void)
{
- return LSR(ISH_DEBUG_UART) & LSR_TDRQ;
+ return LSR(ISH_DEBUG_UART) & LSR_TEMT;
}
int uart_rx_available(void)