1
2
3
4
5
6
7
8
9
10
11struct dma_struct;
12typedef struct dma_struct dma_t;
13
14struct dma_ops {
15 int (*request)(unsigned int, dma_t *);
16 void (*free)(unsigned int, dma_t *);
17 void (*enable)(unsigned int, dma_t *);
18 void (*disable)(unsigned int, dma_t *);
19 int (*residue)(unsigned int, dma_t *);
20 int (*setspeed)(unsigned int, dma_t *, int);
21 const char *type;
22};
23
24struct dma_struct {
25 void *addr;
26 unsigned long count;
27 struct scatterlist buf;
28 int sgcount;
29 struct scatterlist *sg;
30
31 unsigned int active:1;
32 unsigned int invalid:1;
33
34 unsigned int dma_mode;
35 int speed;
36
37 unsigned int lock;
38 const char *device_id;
39
40 const struct dma_ops *d_ops;
41};
42
43
44
45
46extern int isa_dma_add(unsigned int, dma_t *dma);
47
48
49
50
51extern void isa_init_dma(void);
52