summaryrefslogtreecommitdiffstats
path: root/include/linux/dma
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-08-10 18:52:18 +0200
committerVinod Koul <vinod.koul@intel.com>2013-08-14 13:55:15 +0530
commit13b3006b8ebd60926a60fc378ff6fe8affa9a194 (patch)
tree93c92d4f95fc53ab9f8e5e14ee7c2e21e2141781 /include/linux/dma
parent1ac0e845c10685f3643fe81a08c13be4b9416bce (diff)
downloadlinux-13b3006b8ebd60926a60fc378ff6fe8affa9a194.tar.gz
linux-13b3006b8ebd60926a60fc378ff6fe8affa9a194.tar.bz2
linux-13b3006b8ebd60926a60fc378ff6fe8affa9a194.zip
dma: mmp_pdma: add filter function
PXA peripherals need to obtain specific DMA request ids which will eventually be stored in the DRCMR register. Currently, clients are expected to store that number inside the slave config block as slave_id, which is unfortunately incompatible with the way DMA resources are handled in DT environments. This patch adds a filter function which stores the filter parameter passed in by of-dma.c into the channel's drcmr register. For backward compatability, cfg->slave_id is still used if set to a non-zero value. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/dma')
-rw-r--r--include/linux/dma/mmp-pdma.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/dma/mmp-pdma.h b/include/linux/dma/mmp-pdma.h
new file mode 100644
index 000000000000..2dc9b2bc18fc
--- /dev/null
+++ b/include/linux/dma/mmp-pdma.h
@@ -0,0 +1,15 @@
+#ifndef _MMP_PDMA_H_
+#define _MMP_PDMA_H_
+
+struct dma_chan;
+
+#ifdef CONFIG_MMP_PDMA
+bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param);
+#else
+static inline bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param)
+{
+ return false;
+}
+#endif
+
+#endif /* _MMP_PDMA_H_ */