Home
last modified time | relevance | path

Searched hist:"6 eeb348c8482862a788a2903e3fc45e76d4ea6b5" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/tty/serial/
H A Dstm32-usart.cdiff 6eeb348c8482862a788a2903e3fc45e76d4ea6b5 Mon Oct 25 08:42:28 CDT 2021 Erwan Le Ray <erwan.leray@foss.st.com> serial: stm32: terminate / restart DMA transfer at suspend / resume

DMA prevents the system to suspend when an UART RX wake-up source is
using DMA. DMA can't suspend while DMA channels are still active.

Terminate DMA transfer at suspend, and restart a new DMA transfer at
resume. Create stm32_usart_start_rx_dma_cyclic function to factorize
dma RX initialization. Move RX DMA code related to wakeup into
stm32_usart_serial_en_wakeup() routine to ease further improvements
on wakeup from low power modes.

Don't enable/disable wakeup on uninitialized port.

There may be data residue in the RX FIFO while suspending. Flush it at
suspend time. Receiver timeout interrupt won't trigger later in low power
mode, so call stm32_usart_receive_chars() in case there's data to handle.

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/20211025134229.8456-3-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>