diff mbox

dma: rcar-hpbdma: add dma_dev->directions

Message ID 87r3v8uy5p.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Headers show

Commit Message

Kuninori Morimoto Jan. 6, 2015, 8:10 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ecc19d17868be9c9f8f00ed928791533c420f3e0
(dmaengine: Add a warning for drivers not using the generic slave
caps retrieval) added WARN() for DMA_SLAVE.
Kernel will shows WARNING without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/dma/sh/rcar-hpbdma.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Lars-Peter Clausen Jan. 7, 2015, 2:22 p.m. UTC | #1
On 01/06/2015 09:10 AM, Kuninori Morimoto wrote:
[...]
>   	dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);
> +	dma_dev->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM);

You should also set the other capabilities: src_addr_widths, dst_addr_widths 
and residue_granularity.

- Lars

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 20a6f6f..0a1fdbd 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -595,6 +595,7 @@  static int hpb_dmae_probe(struct platform_device *pdev)
 
 	dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask);
 	dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);
+	dma_dev->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM);
 
 	hpbdev->shdma_dev.ops = &hpb_dmae_ops;
 	hpbdev->shdma_dev.desc_size = sizeof(struct hpb_desc);