From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: vinod.koul@intel.com, arnd@arndb.de, andy.shevchenko@gmail.com
Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
nsekhar@ti.com, tony@atomide.com
Subject: [PATCH V03 4/5] dmaengine: edma: Add support for DMA filter mapping to slave devices
Date: Mon, 14 Dec 2015 22:47:41 +0200 [thread overview]
Message-ID: <1450126062-8063-5-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1450126062-8063-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>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/dma/edma.c | 4 ++++
include/linux/platform_data/edma.h | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 16fe773fb846..2e8acde6b134 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -2314,6 +2314,10 @@ static int edma_probe(struct platform_device *pdev)
edma_set_chmap(&ecc->slave_chans[i], ecc->dummy_slot);
}
+ ecc->dma_slave.filter.map = info->slave_map;
+ ecc->dma_slave.filter.mapcnt = info->slavecnt;
+ ecc->dma_slave.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 4299f4ba03bd..0a533f94438f 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -53,12 +53,16 @@ enum dma_event_q {
#define EDMA_CTLR(i) ((i) >> 16)
#define EDMA_CHAN_SLOT(i) ((i) & 0xffff)
+#define EDMA_FILTER_PARAM(ctlr, chan) ((int[]) { EDMA_CTLR_CHAN(ctlr, chan) })
+
struct edma_rsv_info {
const s16 (*rsv_chans)[2];
const s16 (*rsv_slots)[2];
};
+struct dma_slave_map;
+
/* platform_data for EDMA driver */
struct edma_soc_info {
/*
@@ -76,6 +80,9 @@ struct edma_soc_info {
s8 (*queue_priority_mapping)[2];
const s16 (*xbar_chans)[2];
+
+ const struct dma_slave_map *slave_map;
+ int slavecnt;
};
#endif
--
2.6.4
next prev parent reply other threads:[~2015-12-14 20:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 20:47 [PATCH V03 0/5] dmaengine: New 'universal' API for requesting channel Peter Ujfalusi
2015-12-14 20:47 ` [PATCH V03 1/5] dmaengine: core: Skip mask matching when it is not provided to private_candidate Peter Ujfalusi
2015-12-14 20:47 ` [PATCH V03 2/5] dmaengine: core: Move and merge the code paths using private_candidate Peter Ujfalusi
2015-12-14 20:47 ` [PATCH V03 3/5] dmaengine: core: Introduce new, universal API to request a channel Peter Ujfalusi
2015-12-14 20:47 ` Peter Ujfalusi [this message]
2015-12-14 20:47 ` [PATCH V03 5/5] dmaengine: omap-dma: Add support for DMA filter mapping to slave devices Peter Ujfalusi
2015-12-18 5:49 ` [PATCH V03 0/5] dmaengine: New 'universal' API for requesting channel Vinod Koul
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=1450126062-8063-5-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=tony@atomide.com \
--cc=vinod.koul@intel.com \
/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