diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-06-09 13:38:58 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-06-09 13:48:51 +0200 |
commit | 64578b59ff73a1a96f166cf518f58477285117f4 (patch) | |
tree | 9c65451386539468b7fffca1731b927cc480152e /tools/thermal/tmon/tui.c | |
parent | 7ed3ad7562ccdd9dca296b30a556865c772d99e6 (diff) |
tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty
Currently the tx_empty callback only considers the Transmit Complete
Flag (TC). The reference manual is not quite clear if the TC flag
covers the TX FIFO too. Debug prints on real hardware have shown that
from time to time the TC flag is asserted (indicating Transmitter
idle) while there are still data in the TX FIFO. Hence, in this case
the serial core will call the shutdown callback even though there are
data remaining in the TX FIFO buffers.
Avoid early shutdowns by considering the TX FIFO empty flag too. Also
avoid theoretical race conditions between DMA and the driver by
checking whether the TX DMA is in progress too.
Diffstat (limited to 'tools/thermal/tmon/tui.c')
0 files changed, 0 insertions, 0 deletions