0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 struct dma_struct;
0012 typedef struct dma_struct dma_t;
0013
0014 struct dma_ops {
0015 int (*request)(unsigned int, dma_t *);
0016 void (*free)(unsigned int, dma_t *);
0017 void (*enable)(unsigned int, dma_t *);
0018 void (*disable)(unsigned int, dma_t *);
0019 int (*residue)(unsigned int, dma_t *);
0020 int (*setspeed)(unsigned int, dma_t *, int);
0021 const char *type;
0022 };
0023
0024 struct dma_struct {
0025 void *addr;
0026 unsigned long count;
0027 struct scatterlist buf;
0028 int sgcount;
0029 struct scatterlist *sg;
0030
0031 unsigned int active:1;
0032 unsigned int invalid:1;
0033
0034 unsigned int dma_mode;
0035 int speed;
0036
0037 unsigned int lock;
0038 const char *device_id;
0039
0040 const struct dma_ops *d_ops;
0041 };
0042
0043
0044
0045
0046 extern int isa_dma_add(unsigned int, dma_t *dma);
0047
0048
0049
0050
0051 extern void isa_init_dma(void);