1 /*
2  * linux/include/asm/dma.h: Defines for using and allocating dma channels.
3  */
4 
5 #ifndef _ASM_DMA_H
6 #define _ASM_DMA_H
7 
8 /* it's useless on the Etrax, but unfortunately needed by the new
9    bootmem allocator (but this should do it for this) */
10 
11 #define MAX_DMA_ADDRESS PAGE_OFFSET
12 
13 /* TODO: check nbr of channels on Etrax-100LX */
14 
15 #define MAX_DMA_CHANNELS	10
16 
17 /* dma0 and dma1 used for network (ethernet) */
18 #define NETWORK_TX_DMA_NBR 0
19 #define NETWORK_RX_DMA_NBR 1
20 
21 /* dma2 and dma3 shared by par0, scsi0, ser2 and ata */
22 #define PAR0_TX_DMA_NBR 2
23 #define PAR0_RX_DMA_NBR 3
24 #define SCSI0_TX_DMA_NBR 2
25 #define SCSI0_RX_DMA_NBR 3
26 #define SER2_TX_DMA_NBR 2
27 #define SER2_RX_DMA_NBR 3
28 #define ATA_TX_DMA_NBR 2
29 #define ATA_RX_DMA_NBR 3
30 
31 /* dma4 and dma5 shared by par1, scsi1, ser3 and extdma0 */
32 #define PAR1_TX_DMA_NBR 4
33 #define PAR1_RX_DMA_NBR 5
34 #define SCSI1_TX_DMA_NBR 4
35 #define SCSI1_RX_DMA_NBR 5
36 #define SER3_TX_DMA_NBR 4
37 #define SER3_RX_DMA_NBR 5
38 #define EXTDMA0_TX_DMA_NBR 4
39 #define EXTDMA0_RX_DMA_NBR 5
40 
41 /* dma6 and dma7 shared by ser0, extdma1 and mem2mem */
42 #define SER0_TX_DMA_NBR 6
43 #define SER0_RX_DMA_NBR 7
44 #define EXTDMA1_TX_DMA_NBR 6
45 #define EXTDMA1_RX_DMA_NBR 7
46 #define MEM2MEM_TX_DMA_NBR 6
47 #define MEM2MEM_RX_DMA_NBR 7
48 
49 /* dma8 and dma9 shared by ser1 and usb */
50 #define SER1_TX_DMA_NBR 8
51 #define SER1_RX_DMA_NBR 9
52 #define USB_TX_DMA_NBR 8
53 #define USB_RX_DMA_NBR 9
54 
55 /* These are in kernel/dma.c: */
56 extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
57 extern void free_dma(unsigned int dmanr);	                    /* release it */
58 
59 #endif /* _ASM_DMA_H */
60