lkml.org 
[lkml]   [2015]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 4/6] dmaengine: edma: Add support for DMA filter mapping to slave devices
Date
Add support for providing device to filter_fn mapping so client drivers
can switch to use the dma_request_chan() API.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/edma.c | 6 ++++++
include/linux/platform_data/edma.h | 3 +++
2 files changed, 9 insertions(+)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 0675e268d577..587ceb9308b3 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -2297,6 +2297,12 @@ static int edma_probe(struct platform_device *pdev)
edma_set_chmap(&ecc->slave_chans[i], ecc->dummy_slot);
}

+ if (info->devnames) {
+ ecc->dma_slave.filter_map.devnames = info->devnames;
+ ecc->dma_slave.filter_map.devcnt = info->devcnt;
+ ecc->dma_slave.filter_map.filter_fn = edma_filter_fn;
+ }
+
ret = dma_async_device_register(&ecc->dma_slave);
if (ret) {
dev_err(dev, "slave ddev registration failed (%d)\n", ret);
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index e2878baeb90e..58a4dcba0bdf 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -76,6 +76,9 @@ struct edma_soc_info {

s8 (*queue_priority_mapping)[2];
const s16 (*xbar_chans)[2];
+
+ char **devnames;
+ int devcnt;
};

#endif
--
2.6.3


\
 
 \ /
  Last update: 2015-11-27 09:41    [W:2.149 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site