dmaengine: stm32-dma: add alternate REQ/ACK protocol management
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Thu, 24 Jun 2021 09:39:59 +0000 (11:39 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 28 Jul 2021 07:09:48 +0000 (12:39 +0530)
commit2b5b74054c214ed2192713b88799fbc4cda8a1fe
treec96a42aeca6e13521c2107917ce66ee7e19bac23
parentef94b0413bf4e0d328989fecf5b773e82c8794ac
dmaengine: stm32-dma: add alternate REQ/ACK protocol management

STM32 USART/UART is not managing correctly the default DMA REQ/ACK protocol
leading to possibly lock the DMA stream.
Default protocol consists in maintaining ACK signal up to the removal of
REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.

This patch retrieves the need of the alternative protocol through the
device tree, and sets the protocol accordingly.
It also unwrap STM32_DMA_DIRECT_MODE_GET macro definition for consistency
with new STM32_DMA_ALT_ACK_MODE_GET macro definition.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20210624093959.142265-3-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dma.c