ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-pxa / dma.h
1 /*
2  *  linux/include/asm-arm/arch-pxa/dma.h
3  *
4  *  Author:     Nicolas Pitre
5  *  Created:    Jun 15, 2001
6  *  Copyright:  MontaVista Software, Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  */
12 #ifndef __ASM_ARCH_DMA_H
13 #define __ASM_ARCH_DMA_H
14
15 #define MAX_DMA_ADDRESS         0xffffffff
16
17 /* No DMA as the rest of the world see it */
18 #define MAX_DMA_CHANNELS        0
19
20 /*
21  * Descriptor structure for PXA's DMA engine
22  * Note: this structure must always be aligned to a 16-byte boundary.
23  */
24
25 typedef struct {
26         volatile u32 ddadr;     /* Points to the next descriptor + flags */
27         volatile u32 dsadr;     /* DSADR value for the current transfer */
28         volatile u32 dtadr;     /* DTADR value for the current transfer */
29         volatile u32 dcmd;      /* DCMD value for the current transfer */
30 } pxa_dma_desc;
31
32 /*
33  * DMA registration
34  */
35
36 typedef enum {
37         DMA_PRIO_HIGH = 0,
38         DMA_PRIO_MEDIUM = 4,
39         DMA_PRIO_LOW = 8
40 } pxa_dma_prio;
41
42 int pxa_request_dma (char *name,
43                          pxa_dma_prio prio,
44                          void (*irq_handler)(int, void *, struct pt_regs *),
45                          void *data);
46
47 void pxa_free_dma (int dma_ch);
48
49 #endif /* _ASM_ARCH_DMA_H */