Merge tag 'dmaengine-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
[sfrench/cifs-2.6.git] / drivers / dma / fsl-edma-main.c
index 8fff86c16614d7627181f33930241c5be710e2cc..402f0058a180c8042ff35eea5f556c9e5d648df6 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <dt-bindings/dma/fsl-edma.h>
+#include <linux/bitfield.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
@@ -599,7 +600,8 @@ static int fsl_edma_probe(struct platform_device *pdev)
                                        DMAENGINE_ALIGN_32_BYTES;
 
        /* Per worst case 'nbytes = 1' take CITER as the max_seg_size */
-       dma_set_max_seg_size(fsl_edma->dma_dev.dev, 0x3fff);
+       dma_set_max_seg_size(fsl_edma->dma_dev.dev,
+                            FIELD_GET(EDMA_TCD_ITER_MASK, EDMA_TCD_ITER_MASK));
 
        fsl_edma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;