From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 4/6] dmaengine: edma: Add support for DMA filter mapping to slave devices
Date: Fri, 27 Nov 2015 10:29:40 +0200 [thread overview]
Message-ID: <1448612982-28141-5-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1448612982-28141-1-git-send-email-peter.ujfalusi@ti.com>
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
next prev parent reply other threads:[~2015-11-27 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 8:29 [RFC 0/6] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi
2015-11-27 8:29 ` [RFC 1/6] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask() Peter Ujfalusi
2015-11-27 8:29 ` [RFC 2/6] dmaengine: core: Move and merge the code paths using private_candidate Peter Ujfalusi
2015-11-27 8:29 ` [RFC 3/6] dmaengine: core: Introduce new, universal API to request a channel Peter Ujfalusi
2015-11-27 11:00 ` Arnd Bergmann
2015-11-27 11:16 ` Peter Ujfalusi
2015-11-27 11:26 ` Arnd Bergmann
2015-11-27 8:29 ` Peter Ujfalusi [this message]
2015-11-27 8:29 ` [RFC 5/6] ARM: davinci: devices-da8xx: device -> dma instance mapping support Peter Ujfalusi
2015-11-27 8:29 ` [RFC 6/6] mmc: davinci_mmc: Switch to use the new dmaengine API for requesting channel (NOT FOR MERGE) Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448612982-28141-5-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox