OSDN Git Service

serial: stm32: add support of TX FIFO threshold
authorErwan Le Ray <erwan.leray@st.com>
Tue, 18 Jun 2019 10:02:24 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2019 09:17:36 +0000 (11:17 +0200)
commitd075719e62ae7bc7fed3ff5be365c8c384483f15
treef46fa9a3deb6d5d15999bec5ab7f5912620ce4d8
parent5d9176edacc29cadb9a0b52c8aaba67ce5ff4ed4
serial: stm32: add support of TX FIFO threshold

Adds the support of TX FIFO threshold in order to improve the TX FIFO
management:
- TX FIFO threshold irq enabling (instead of relying on tx empty / fifo
  not full irq that generates one irq/char)
- TXCFG is set to half fifo size (e.g. 16/2 = 8 data for a 16 data depth
  FIFO)
- irq rate may be reduced by up to 1/TXCFG,  e.g. 1 over 8 with current
  TXCFG setting.

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
drivers/tty/serial/stm32-usart.h