]> git.baikalelectronics.ru Git - kernel.git/commit
serial: stm32: update throttle and unthrottle ops for dma mode
authorErwan Le Ray <erwan.leray@foss.st.com>
Wed, 20 Oct 2021 15:03:32 +0000 (17:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Oct 2021 08:36:29 +0000 (10:36 +0200)
commitac196eccc122275ae67fa469c3a03a13f02c0a76
tree5daa872c93a40eea24e60eefd7d3ecb27a09a2e9
parente46cc93fdc260cec37d3c54a96c6fefc2a882093
serial: stm32: update throttle and unthrottle ops for dma mode

Disable DMA request line (if enabled) to switch in PIO mode in throttle
ops, so the RX data gets queues into the FIFO. The hardware flow control
is triggered when the RX FIFO is full.

Switch back to DMA mode (re-enable DMA request line) in unthrottle ops.
Hardware flow control is stopped when FIFO is not full anymore.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Link: https://lore.kernel.org/r/20211020150332.10214-4-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c
drivers/tty/serial/stm32-usart.h