.. | .. |
---|
77 | 77 | state->last = complete; |
---|
78 | 78 | state->used = used; |
---|
79 | 79 | state->residue = 0; |
---|
| 80 | + state->in_flight_bytes = 0; |
---|
80 | 81 | } |
---|
81 | 82 | return dma_async_is_complete(cookie, complete, used); |
---|
82 | 83 | } |
---|
.. | .. |
---|
85 | 86 | { |
---|
86 | 87 | if (state) |
---|
87 | 88 | state->residue = residue; |
---|
| 89 | +} |
---|
| 90 | + |
---|
| 91 | +static inline void dma_set_in_flight_bytes(struct dma_tx_state *state, |
---|
| 92 | + u32 in_flight_bytes) |
---|
| 93 | +{ |
---|
| 94 | + if (state) |
---|
| 95 | + state->in_flight_bytes = in_flight_bytes; |
---|
88 | 96 | } |
---|
89 | 97 | |
---|
90 | 98 | struct dmaengine_desc_callback { |
---|
.. | .. |
---|
171 | 179 | return cb->callback || cb->callback_result; |
---|
172 | 180 | } |
---|
173 | 181 | |
---|
| 182 | +struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); |
---|
| 183 | +struct dma_chan *dma_get_any_slave_channel(struct dma_device *device); |
---|
| 184 | + |
---|
| 185 | +#ifdef CONFIG_DEBUG_FS |
---|
| 186 | +#include <linux/debugfs.h> |
---|
| 187 | + |
---|
| 188 | +static inline struct dentry * |
---|
| 189 | +dmaengine_get_debugfs_root(struct dma_device *dma_dev) { |
---|
| 190 | + return dma_dev->dbg_dev_root; |
---|
| 191 | +} |
---|
| 192 | +#else |
---|
| 193 | +struct dentry; |
---|
| 194 | +static inline struct dentry * |
---|
| 195 | +dmaengine_get_debugfs_root(struct dma_device *dma_dev) |
---|
| 196 | +{ |
---|
| 197 | + return NULL; |
---|
| 198 | +} |
---|
| 199 | +#endif /* CONFIG_DEBUG_FS */ |
---|
| 200 | + |
---|
174 | 201 | #endif |
---|