diff options
author | Jon Hunter <jon-hunter@ti.com> | 2012-09-14 18:41:57 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-06 23:57:45 -0500 |
commit | 9a6cecc846169159bfce511f4c0034bb96eea1ca (patch) | |
tree | e5d0dcef464741a0988e4355744a33cb55e6bcd4 /include/linux/dmaengine.h | |
parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) |
dmaengine: add helper function to request a slave DMA channel
Currently slave DMA channels are requested by calling dma_request_channel()
and requires DMA clients to pass various filter parameters to obtain the
appropriate channel.
With device-tree being used by architectures such as arm and the addition of
device-tree helper functions to extract the relevant DMA client information
from device-tree, add a new function to request a slave DMA channel using
device-tree. This function is currently a simple wrapper that calls the
device-tree of_dma_request_slave_channel() function.
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d3201e438d16..8cd0e2556d04 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -974,6 +974,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | |||
974 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 974 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
975 | void dma_issue_pending_all(void); | 975 | void dma_issue_pending_all(void); |
976 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | 976 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); |
977 | struct dma_chan *dma_request_slave_channel(struct device *dev, char *name); | ||
977 | void dma_release_channel(struct dma_chan *chan); | 978 | void dma_release_channel(struct dma_chan *chan); |
978 | #else | 979 | #else |
979 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 980 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) |
@@ -988,6 +989,11 @@ static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, | |||
988 | { | 989 | { |
989 | return NULL; | 990 | return NULL; |
990 | } | 991 | } |
992 | static inline struct dma_chan *dma_request_slave_channel(struct device *dev, | ||
993 | char *name) | ||
994 | { | ||
995 | return NULL | ||
996 | } | ||
991 | static inline void dma_release_channel(struct dma_chan *chan) | 997 | static inline void dma_release_channel(struct dma_chan *chan) |
992 | { | 998 | { |
993 | } | 999 | } |