Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: sun6i: Set the maximum segment size

The sun6i DMA engine supports segment sizes up to 2^25-1 bytes. This is
explicitly stated in newer SoC documentation (H6, D1), and it is implied
in older documentation by the 25-bit width of the "bytes left in the
current segment" register field.

Exposing the real segment size limit (instead of the 64k default)
reduces the number of SG list segments needed for a transaction.

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20230101193605.50285-1-samuel@sholland.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Samuel Holland and committed by
Vinod Koul
3dfaa68f ad4ce078

+3
+3
drivers/dma/sun6i-dma.c
··· 9 9 10 10 #include <linux/clk.h> 11 11 #include <linux/delay.h> 12 + #include <linux/dma-mapping.h> 12 13 #include <linux/dmaengine.h> 13 14 #include <linux/dmapool.h> 14 15 #include <linux/interrupt.h> ··· 1334 1333 platform_set_drvdata(pdev, sdc); 1335 1334 INIT_LIST_HEAD(&sdc->pending); 1336 1335 spin_lock_init(&sdc->lock); 1336 + 1337 + dma_set_max_seg_size(&pdev->dev, SZ_32M - 1); 1337 1338 1338 1339 dma_cap_set(DMA_PRIVATE, sdc->slave.cap_mask); 1339 1340 dma_cap_set(DMA_MEMCPY, sdc->slave.cap_mask);