OSDN Git Service

serial: stm32: Add support of TC bit status check
authorErwan Le Ray <erwan.leray@st.com>
Tue, 21 May 2019 15:45:45 +0000 (17:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 07:58:29 +0000 (09:58 +0200)
commit64c32eab660386f9904bb295a104c9c425e9f8b2
treec04d6032038a507e27f2730f7ffb189cde4d4961
parentb83b957c91f68e53f0dc596e129e8305761f2a32
serial: stm32: Add support of TC bit status check

Adds a check on the Transmission Complete bit status before closing the
com port. Prevents the port closure before the end of the transmission.
TC poll loop is moved from stm32_tx_dma_complete to stm32_shutdown
routine, in order to check TC before shutdown in both dma and
PIO tx modes.
TC clear is added in stm32_transmit_char routine, in order to be cleared
before transmitting in both dma and PIO tx modes.

Fixes: 3489187204eb ("serial: stm32: adding dma support")
Signed-off-by: Erwan Le Ray <erwan.leray@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c