diff mbox series

[3/3,V2] dmaengine: axi-dmac: assign `copy_align` property

Message ID 20190521141425.26176-3-alexandru.ardelean@analog.com (mailing list archive)
State Changes Requested
Headers show
Series [1/3,V2] include: fpga: adi-axi-common.h: add common regs & defs header | expand

Commit Message

Alexandru Ardelean May 21, 2019, 2:14 p.m. UTC
The `copy_align` property is a generic property that describes alignment
for DMA memcpy & sg ops.
It serves mostly an informational purpose, and can be used in DMA tests, to
pass the info to know what alignment to expect.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/dma/dma-axi-dmac.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index 196e6c429182..88f9986e0e14 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -762,6 +762,8 @@  static int axi_dmac_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk_disable;
 
+	dma_dev->copy_align = (dmac->chan.address_align_mask + 1);
+
 	axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_MASK, 0x00);
 
 	ret = dma_async_device_register(dma_dev);