]> git.baikalelectronics.ru Git - kernel.git/commit
serial: mxs-auart: fix tx_empty against shift register
authorJanusz Uzycki <j.uzycki@elproma.com.pl>
Tue, 18 Nov 2014 17:37:13 +0000 (18:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 01:06:39 +0000 (17:06 -0800)
commitedc5873a306712a62cd5354dc17f8335ec33e1c8
tree1efcf338fabd759c6b5f5d52b3bcbbc62943de7f
parenta142a2988247014698c6079105bd481090b23994
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: Janusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mxs-auart.c