summaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-03-25 09:13:25 -0700
committerDan Williams <dan.j.williams@intel.com>2009-03-25 09:13:25 -0700
commit729b5d1b8ec72c28e99840b3f300ba67726e3ab9 (patch)
tree8eac6444ea80bf05f461eb77243f56b008ee5083 /include/linux/dmaengine.h
parent06164f3194e01ea4c76941ac60f541d656c8975f (diff)
downloadop-kernel-dev-729b5d1b8ec72c28e99840b3f300ba67726e3ab9.zip
op-kernel-dev-729b5d1b8ec72c28e99840b3f300ba67726e3ab9.tar.gz
dmaengine: allow dma support for async_tx to be toggled
Provide a config option for blocking the allocation of dma channels to the async_tx api. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 96e676e..2afc2c9 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -288,6 +288,24 @@ static inline void net_dmaengine_put(void)
}
#endif
+#ifdef CONFIG_ASYNC_TX_DMA
+#define async_dmaengine_get() dmaengine_get()
+#define async_dmaengine_put() dmaengine_put()
+#define async_dma_find_channel(type) dma_find_channel(type)
+#else
+static inline void async_dmaengine_get(void)
+{
+}
+static inline void async_dmaengine_put(void)
+{
+}
+static inline struct dma_chan *
+async_dma_find_channel(enum dma_transaction_type type)
+{
+ return NULL;
+}
+#endif
+
dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
void *dest, void *src, size_t len);
dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
OpenPOWER on IntegriCloud