aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:17 -0500
committerDan Williams <dan.j.williams@intel.com>2009-01-06 13:38:17 -0500
commitaa1e6f1a385eb2b04171ec841f3b760091e4a8ee (patch)
tree1401e7f1e867e5d4a769b648605e0317d25d5ccb /include/linux/dmaengine.h
parent209b84a88fe81341b4d8d465acc4a67cb7c3feb3 (diff)
dmaengine: kill struct dma_client and supporting infrastructure
All users have been converted to either the general-purpose allocator, dma_find_channel, or dma_request_channel. Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h50
1 files changed, 1 insertions, 49 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 37d95db156d3..db050e97d2b4 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -29,20 +29,6 @@
29#include <linux/dma-mapping.h> 29#include <linux/dma-mapping.h>
30 30
31/** 31/**
32 * enum dma_state - resource PNP/power management state
33 * @DMA_RESOURCE_SUSPEND: DMA device going into low power state
34 * @DMA_RESOURCE_RESUME: DMA device returning to full power
35 * @DMA_RESOURCE_AVAILABLE: DMA device available to the system
36 * @DMA_RESOURCE_REMOVED: DMA device removed from the system
37 */
38enum dma_state {
39 DMA_RESOURCE_SUSPEND,
40 DMA_RESOURCE_RESUME,
41 DMA_RESOURCE_AVAILABLE,
42 DMA_RESOURCE_REMOVED,
43};
44
45/**
46 * enum dma_state_client - state of the channel in the client 32 * enum dma_state_client - state of the channel in the client
47 * @DMA_ACK: client would like to use, or was using this channel 33 * @DMA_ACK: client would like to use, or was using this channel
48 * @DMA_DUP: client has already seen this channel, or is not using this channel 34 * @DMA_DUP: client has already seen this channel, or is not using this channel
@@ -170,23 +156,6 @@ struct dma_chan {
170 156
171void dma_chan_cleanup(struct kref *kref); 157void dma_chan_cleanup(struct kref *kref);
172 158
173/*
174 * typedef dma_event_callback - function pointer to a DMA event callback
175 * For each channel added to the system this routine is called for each client.
176 * If the client would like to use the channel it returns '1' to signal (ack)
177 * the dmaengine core to take out a reference on the channel and its
178 * corresponding device. A client must not 'ack' an available channel more
179 * than once. When a channel is removed all clients are notified. If a client
180 * is using the channel it must 'ack' the removal. A client must not 'ack' a
181 * removed channel more than once.
182 * @client - 'this' pointer for the client context
183 * @chan - channel to be acted upon
184 * @state - available or removed
185 */
186struct dma_client;
187typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client,
188 struct dma_chan *chan, enum dma_state state);
189
190/** 159/**
191 * typedef dma_filter_fn - callback filter for dma_request_channel 160 * typedef dma_filter_fn - callback filter for dma_request_channel
192 * @chan: channel to be reviewed 161 * @chan: channel to be reviewed
@@ -199,21 +168,6 @@ typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client,
199 */ 168 */
200typedef enum dma_state_client (*dma_filter_fn)(struct dma_chan *chan, void *filter_param); 169typedef enum dma_state_client (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
201 170
202/**
203 * struct dma_client - info on the entity making use of DMA services
204 * @event_callback: func ptr to call when something happens
205 * @cap_mask: only return channels that satisfy the requested capabilities
206 * a value of zero corresponds to any capability
207 * @slave: data for preparing slave transfer. Must be non-NULL iff the
208 * DMA_SLAVE capability is requested.
209 * @global_node: list_head for global dma_client_list
210 */
211struct dma_client {
212 dma_event_callback event_callback;
213 dma_cap_mask_t cap_mask;
214 struct list_head global_node;
215};
216
217typedef void (*dma_async_tx_callback)(void *dma_async_param); 171typedef void (*dma_async_tx_callback)(void *dma_async_param);
218/** 172/**
219 * struct dma_async_tx_descriptor - async transaction descriptor 173 * struct dma_async_tx_descriptor - async transaction descriptor
@@ -285,8 +239,7 @@ struct dma_device {
285 int dev_id; 239 int dev_id;
286 struct device *dev; 240 struct device *dev;
287 241
288 int (*device_alloc_chan_resources)(struct dma_chan *chan, 242 int (*device_alloc_chan_resources)(struct dma_chan *chan);
289 struct dma_client *client);
290 void (*device_free_chan_resources)(struct dma_chan *chan); 243 void (*device_free_chan_resources)(struct dma_chan *chan);
291 244
292 struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( 245 struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)(
@@ -320,7 +273,6 @@ struct dma_device {
320 273
321void dmaengine_get(void); 274void dmaengine_get(void);
322void dmaengine_put(void); 275void dmaengine_put(void);
323void dma_async_client_chan_request(struct dma_client *client);
324dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, 276dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
325 void *dest, void *src, size_t len); 277 void *dest, void *src, size_t len);
326dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, 278dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,