aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c73f1e2b59b7..3e68469c1885 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -282,6 +282,18 @@ static inline void dmaengine_put(void)
282} 282}
283#endif 283#endif
284 284
285#ifdef CONFIG_NET_DMA
286#define net_dmaengine_get() dmaengine_get()
287#define net_dmaengine_put() dmaengine_put()
288#else
289static inline void net_dmaengine_get(void)
290{
291}
292static inline void net_dmaengine_put(void)
293{
294}
295#endif
296
285dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, 297dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
286 void *dest, void *src, size_t len); 298 void *dest, void *src, size_t len);
287dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, 299dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
@@ -297,6 +309,11 @@ static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
297 tx->flags |= DMA_CTRL_ACK; 309 tx->flags |= DMA_CTRL_ACK;
298} 310}
299 311
312static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
313{
314 tx->flags &= ~DMA_CTRL_ACK;
315}
316
300static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) 317static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
301{ 318{
302 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; 319 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
@@ -400,11 +417,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
400enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); 417enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
401#ifdef CONFIG_DMA_ENGINE 418#ifdef CONFIG_DMA_ENGINE
402enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 419enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
420void dma_issue_pending_all(void);
403#else 421#else
404static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) 422static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
405{ 423{
406 return DMA_SUCCESS; 424 return DMA_SUCCESS;
407} 425}
426static inline void dma_issue_pending_all(void)
427{
428 do { } while (0);
429}
408#endif 430#endif
409 431
410/* --- DMA device --- */ 432/* --- DMA device --- */
@@ -413,7 +435,6 @@ int dma_async_device_register(struct dma_device *device);
413void dma_async_device_unregister(struct dma_device *device); 435void dma_async_device_unregister(struct dma_device *device);
414void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 436void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
415struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 437struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
416void dma_issue_pending_all(void);
417#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 438#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
418struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); 439struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
419void dma_release_channel(struct dma_chan *chan); 440void dma_release_channel(struct dma_chan *chan);