summaryrefslogtreecommitdiff
path: root/drivers/dma/stm32-dma.c
diff options
context:
space:
mode:
authorAmelie Delaunay <amelie.delaunay@st.com>2020-01-29 18:36:25 +0300
committerVinod Koul <vkoul@kernel.org>2020-02-25 08:45:05 +0300
commitd7a9e42609cab42bf748a66756270652187df084 (patch)
tree66b529627e650843e603739ccc890e2dd6b720ee /drivers/dma/stm32-dma.c
parent22a0bb297cdca9d02407db603bbed84986ef5c05 (diff)
downloadlinux-d7a9e42609cab42bf748a66756270652187df084.tar.xz
dmaengine: stm32-dma: use dma_set_max_seg_size to set the sg limit
This patch adds dma_set_max_seg_size to define sg dma constraint. This constraint may be taken into account by client to scatter/gather its buffer. Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com> Link: https://lore.kernel.org/r/20200129153628.29329-6-amelie.delaunay@st.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/stm32-dma.c')
-rw-r--r--drivers/dma/stm32-dma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 25f7281932bd..b7e18cfcd439 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -1323,6 +1323,8 @@ static int stm32_dma_probe(struct platform_device *pdev)
reset_control_deassert(rst);
}
+ dma_set_max_seg_size(&pdev->dev, STM32_DMA_ALIGNED_MAX_DATA_ITEMS);
+
dma_cap_set(DMA_SLAVE, dd->cap_mask);
dma_cap_set(DMA_PRIVATE, dd->cap_mask);
dma_cap_set(DMA_CYCLIC, dd->cap_mask);