Patchwork dma: axi-dmac: assign `copy_align` property

login
register
mail settings
Submitter Alexandru Ardelean
Date Feb. 15, 2019, 11:02 a.m.
Message ID <20190215110226.30647-1-alexandru.ardelean@analog.com>
Download mbox | patch
Permalink /patch/727383/
State New
Headers show

Comments

Alexandru Ardelean - Feb. 15, 2019, 11:02 a.m.
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(+)
Vinod Koul - Feb. 25, 2019, 6:55 a.m.
On 15-02-19, 13:02, Alexandru Ardelean wrote:
> 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.

This looks fine but fails to apply for me. When sending patches please
send against the tree you wish this patch to be applied to..

Also please fix the subsystem tag..
Ardelean, Alexandru - Feb. 26, 2019, 7:19 a.m.
On Mon, 2019-02-25 at 12:25 +0530, Vinod Koul wrote:
> [External]

> 

> 

> On 15-02-19, 13:02, Alexandru Ardelean wrote:

> > 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.

> 

> This looks fine but fails to apply for me. When sending patches please

> send against the tree you wish this patch to be applied to..


Weird, I remember patching this into one of the brances from here:
https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git/

I forget which one [probably the `next` branch ?]

I'll re-visit this.

> 

> Also please fix the subsystem tag..


Ack

> 

> --

> ~Vinod
Vinod Koul - Feb. 26, 2019, 8:03 a.m.
On 26-02-19, 07:19, Ardelean, Alexandru wrote:
> On Mon, 2019-02-25 at 12:25 +0530, Vinod Koul wrote:
> > [External]
> > 
> > 
> > On 15-02-19, 13:02, Alexandru Ardelean wrote:
> > > 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.
> > 
> > This looks fine but fails to apply for me. When sending patches please
> > send against the tree you wish this patch to be applied to..
> 
> Weird, I remember patching this into one of the brances from here:
> https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git/
> 
> I forget which one [probably the `next` branch ?]

next one is typically fine.

Patch

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index a54157ab00b2..a58aee7090dd 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -814,6 +814,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);