serial: stm32: rework RX dma initialization and release
authorErwan Le Ray <erwan.leray@foss.st.com>
Mon, 25 Oct 2021 13:42:27 +0000 (15:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Oct 2021 17:18:47 +0000 (19:18 +0200)
commite0abc903deea0148955af1e7ccabf3e980af7815
tree02951066766dcb90d6f464d53d97ea719b4b409b
parent175003d7f9d15d4d5172f48d51e926acac676ad6
serial: stm32: rework RX dma initialization and release

The RX DMA channel is kept active forever (from the probe). That prevents
going to low power mode when it is used. This change moves the
DMA configuration and enabling procedures to startup routine to allow
transition to low power mode.
The DMA disabling procedure is implemented in stop_rx routine as this
ops has to stop characters reception, and DMA transation in shutdown.
Clean useless dma_async_tx_descriptor initialization to NULL value.

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-2-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c