diff options
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 23 |
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 | ||
289 | static inline void net_dmaengine_get(void) | ||
290 | { | ||
291 | } | ||
292 | static inline void net_dmaengine_put(void) | ||
293 | { | ||
294 | } | ||
295 | #endif | ||
296 | |||
285 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 297 | dma_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); |
287 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 299 | dma_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 | ||
312 | static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx) | ||
313 | { | ||
314 | tx->flags &= ~DMA_CTRL_ACK; | ||
315 | } | ||
316 | |||
300 | static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) | 317 | static 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, | |||
400 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | 417 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); |
401 | #ifdef CONFIG_DMA_ENGINE | 418 | #ifdef CONFIG_DMA_ENGINE |
402 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 419 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
420 | void dma_issue_pending_all(void); | ||
403 | #else | 421 | #else |
404 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 422 | static 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 | } |
426 | static 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); | |||
413 | void dma_async_device_unregister(struct dma_device *device); | 435 | void dma_async_device_unregister(struct dma_device *device); |
414 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); | 436 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); |
415 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); | 437 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); |
416 | void 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) |
418 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | 439 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); |
419 | void dma_release_channel(struct dma_chan *chan); | 440 | void dma_release_channel(struct dma_chan *chan); |