dmaengine: stm32-dma: set dma_device max_sg_burst
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Mon, 17 Jan 2022 09:17:40 +0000 (10:17 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 15 Feb 2022 05:42:07 +0000 (11:12 +0530)
commit728f6c783313fc789197837dce1f97d1f930cafe
treeb31e0de6179a0b34550a5b2a3233f804b06ed4a7
parent177360e04b70b1d3937471e42201cdbb831a82da
dmaengine: stm32-dma: set dma_device max_sg_burst

Some stm32-dma consumers [1] rather use dma_get_slave_caps() to get
max_sg_burst of their DMA channel as dma_get_max_seg_size() is specific to
the DMA controller.
All stm32-dma channels have the same features so, don't need to implement
device_caps ops. Let dma_get_slave_caps() relies on dma_device
configuration.
That's why this patch sets dma_device max_sg_burst to the maximum segment
size, which is the maximum of data items that can be transferred without
software intervention.

[1] https://lore.kernel.org/lkml/20220110103739.118426-1-alain.volmat@foss.st.com/
    "media: stm32: dcmi: create a dma scatterlist based on DMA max_sg_burst value"

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Tested-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/20220117091740.11064-1-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dma.c