diff options
Diffstat (limited to 'include/asm-arm/mach/dma.h')
-rw-r--r-- | include/asm-arm/mach/dma.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/asm-arm/mach/dma.h b/include/asm-arm/mach/dma.h new file mode 100644 index 000000000000..31bf716106ee --- /dev/null +++ b/include/asm-arm/mach/dma.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1998-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This header file describes the interface between the generic DMA handler | ||
11 | * (dma.c) and the architecture-specific DMA backends (dma-*.c) | ||
12 | */ | ||
13 | |||
14 | struct dma_struct; | ||
15 | typedef struct dma_struct dma_t; | ||
16 | |||
17 | struct dma_ops { | ||
18 | int (*request)(dmach_t, dma_t *); /* optional */ | ||
19 | void (*free)(dmach_t, dma_t *); /* optional */ | ||
20 | void (*enable)(dmach_t, dma_t *); /* mandatory */ | ||
21 | void (*disable)(dmach_t, dma_t *); /* mandatory */ | ||
22 | int (*residue)(dmach_t, dma_t *); /* optional */ | ||
23 | int (*setspeed)(dmach_t, dma_t *, int); /* optional */ | ||
24 | char *type; | ||
25 | }; | ||
26 | |||
27 | struct dma_struct { | ||
28 | struct scatterlist buf; /* single DMA */ | ||
29 | int sgcount; /* number of DMA SG */ | ||
30 | struct scatterlist *sg; /* DMA Scatter-Gather List */ | ||
31 | |||
32 | unsigned int active:1; /* Transfer active */ | ||
33 | unsigned int invalid:1; /* Address/Count changed */ | ||
34 | unsigned int using_sg:1; /* using scatter list? */ | ||
35 | dmamode_t dma_mode; /* DMA mode */ | ||
36 | int speed; /* DMA speed */ | ||
37 | |||
38 | unsigned int lock; /* Device is allocated */ | ||
39 | const char *device_id; /* Device name */ | ||
40 | |||
41 | unsigned int dma_base; /* Controller base address */ | ||
42 | int dma_irq; /* Controller IRQ */ | ||
43 | struct scatterlist cur_sg; /* Current controller buffer */ | ||
44 | unsigned int state; | ||
45 | |||
46 | struct dma_ops *d_ops; | ||
47 | }; | ||
48 | |||
49 | /* Prototype: void arch_dma_init(dma) | ||
50 | * Purpose : Initialise architecture specific DMA | ||
51 | * Params : dma - pointer to array of DMA structures | ||
52 | */ | ||
53 | extern void arch_dma_init(dma_t *dma); | ||
54 | |||
55 | extern void isa_init_dma(dma_t *dma); | ||