OSDN Git Service

serial: stm32: add RX and TX FIFO flush
authorErwan Le Ray <erwan.leray@st.com>
Tue, 18 Jun 2019 10:02:26 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2019 09:17:36 +0000 (11:17 +0200)
commit84872dc448fe0ae11fe8412f4966e9c431a45b8f
tree38c487121a9a239cfdee11211fd0cfe600a0dc29
parentd0a6a7bcc3fa0e97efce1d9a5c4cca6f3474c6bb
serial: stm32: add RX and TX FIFO flush

Adds a flush of RX and TX FIFOs, and fixes some errors:
- adds RX FIFO flush in startup fonction
- removes the useless transmitter enabling in startup fonction
  (e.g. receiver only, see Documentation/serial/driver)
- configures FIFO threshold before enabling it, rather than after
- flushes both TX and RX in set_termios function

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