dmaengine: stm32-mdma: set in_flight_bytes in case CRQA flag is set
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Wed, 4 Oct 2023 16:35:30 +0000 (18:35 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 9 Oct 2023 05:40:30 +0000 (11:10 +0530)
commit584970421725b7805db84714b857851fdf7203a9
tree5ccfcd4336a1dc98cc93ad75e8c9a1e8419375b0
parenta4b306eb83579c07b63dc65cd5bae53b7b4019d0
dmaengine: stm32-mdma: set in_flight_bytes in case CRQA flag is set

CRQA flag is set by hardware when the channel request become active and
the channel is enabled. It is cleared by hardware, when the channel request
is completed.
So when it is set, it means MDMA is transferring bytes.
This information is useful in case of STM32 DMA and MDMA chaining,
especially when the user pauses DMA before stopping it, to trig one last
MDMA transfer to get the latest bytes of the SRAM buffer to the
destination buffer.
STM32 DCMI driver can then use this to know if the last MDMA transfer in
case of chaining is done.

Fixes: 696874322771 ("dmaengine: stm32-mdma: add support to be triggered by STM32 DMA")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231004163531.2864160-3-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-mdma.c