Skip to content

Commit baed6b3

Browse files
lkundrakvinodkoul
authored andcommitted
dmaengine: mmp_tdma: Fill in slave capabilities
This makes dma_get_slave_caps() work with the device so that it could actually be used with soc-generic-dmaengine-pcm. Signed-off-by: Lubomir Rintel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4719d4b commit baed6b3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/dma/mmp_tdma.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,17 @@ static int mmp_tdma_probe(struct platform_device *pdev)
703703
tdev->device.device_terminate_all = mmp_tdma_terminate_all;
704704
tdev->device.copy_align = DMAENGINE_ALIGN_8_BYTES;
705705

706+
tdev->device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
707+
if (type == MMP_AUD_TDMA) {
708+
tdev->device.max_burst = SZ_128;
709+
tdev->device.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
710+
tdev->device.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
711+
} else if (type == PXA910_SQU) {
712+
tdev->device.max_burst = SZ_32;
713+
}
714+
tdev->device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
715+
tdev->device.descriptor_reuse = true;
716+
706717
dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
707718
platform_set_drvdata(pdev, tdev);
708719

0 commit comments

Comments
 (0)