diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-05-17 19:30:58 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-05-17 19:30:58 -0400 |
commit | 0b28330e39bbe0ffee4c56b09fc415fcec595ea3 (patch) | |
tree | fcf504879883763557e696eff81427b1ab78f76b /include/linux/dmaengine.h | |
parent | 058276303dbc4ed089c1f7dad0871810b1f5ddf1 (diff) | |
parent | caa20d974c86af496b419eef70010e63b7fab7ac (diff) |
Merge branch 'ioat' into dmaengine
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 17456571ff7a..5204f018931b 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -245,11 +245,71 @@ struct dma_async_tx_descriptor { | |||
245 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | 245 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); |
246 | dma_async_tx_callback callback; | 246 | dma_async_tx_callback callback; |
247 | void *callback_param; | 247 | void *callback_param; |
248 | #ifndef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | ||
248 | struct dma_async_tx_descriptor *next; | 249 | struct dma_async_tx_descriptor *next; |
249 | struct dma_async_tx_descriptor *parent; | 250 | struct dma_async_tx_descriptor *parent; |
250 | spinlock_t lock; | 251 | spinlock_t lock; |
252 | #endif | ||
251 | }; | 253 | }; |
252 | 254 | ||
255 | #ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | ||
256 | static inline void txd_lock(struct dma_async_tx_descriptor *txd) | ||
257 | { | ||
258 | } | ||
259 | static inline void txd_unlock(struct dma_async_tx_descriptor *txd) | ||
260 | { | ||
261 | } | ||
262 | static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next) | ||
263 | { | ||
264 | BUG(); | ||
265 | } | ||
266 | static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd) | ||
267 | { | ||
268 | } | ||
269 | static inline void txd_clear_next(struct dma_async_tx_descriptor *txd) | ||
270 | { | ||
271 | } | ||
272 | static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd) | ||
273 | { | ||
274 | return NULL; | ||
275 | } | ||
276 | static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd) | ||
277 | { | ||
278 | return NULL; | ||
279 | } | ||
280 | |||
281 | #else | ||
282 | static inline void txd_lock(struct dma_async_tx_descriptor *txd) | ||
283 | { | ||
284 | spin_lock_bh(&txd->lock); | ||
285 | } | ||
286 | static inline void txd_unlock(struct dma_async_tx_descriptor *txd) | ||
287 | { | ||
288 | spin_unlock_bh(&txd->lock); | ||
289 | } | ||
290 | static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next) | ||
291 | { | ||
292 | txd->next = next; | ||
293 | next->parent = txd; | ||
294 | } | ||
295 | static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd) | ||
296 | { | ||
297 | txd->parent = NULL; | ||
298 | } | ||
299 | static inline void txd_clear_next(struct dma_async_tx_descriptor *txd) | ||
300 | { | ||
301 | txd->next = NULL; | ||
302 | } | ||
303 | static inline struct dma_async_tx_descriptor *txd_parent(struct dma_async_tx_descriptor *txd) | ||
304 | { | ||
305 | return txd->parent; | ||
306 | } | ||
307 | static inline struct dma_async_tx_descriptor *txd_next(struct dma_async_tx_descriptor *txd) | ||
308 | { | ||
309 | return txd->next; | ||
310 | } | ||
311 | #endif | ||
312 | |||
253 | /** | 313 | /** |
254 | * struct dma_tx_state - filled in to report the status of | 314 | * struct dma_tx_state - filled in to report the status of |
255 | * a transfer. | 315 | * a transfer. |