Skip to content
Commit 2b310ec7 authored by Janusz Uzycki's avatar Janusz Uzycki Committed by Greg Kroah-Hartman
Browse files

serial: mxs-auart: fix tx_empty against shift register



tx_empty() should test whether both the transmitter fifo and shifter
for the port is empty, ie. the whole last char was transmitted.
The shift register is empty if AUART_STAT_BUSY is cleared.
The patch fixes the function against the shift register.

According to i.MX23 and i.MX28 Reference Manual:
AUART_STAT_TXFE:
 TX FIFO or transmit holding register is empty.

AUART_STAT_BUSY:
 AUART still transmits bits.
 The BUSY signal goes HIGH as soon as the data is written to the
 transmit FIFO (that is, the FIFO is non-empty) and remains asserted
 HIGH while data is being transmitted.
 BUSY is negated only when the transmit FIFO is empty, and the last
 character has been transmitted from the shift register, including
 the stop bits.

Signed-off-by: default avatarJanusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 08f937f4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment