aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v10/svinto.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-cris/arch-v10/svinto.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-cris/arch-v10/svinto.h')
-rw-r--r--include/asm-cris/arch-v10/svinto.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/asm-cris/arch-v10/svinto.h b/include/asm-cris/arch-v10/svinto.h
new file mode 100644
index 000000000000..0881a1af7cee
--- /dev/null
+++ b/include/asm-cris/arch-v10/svinto.h
@@ -0,0 +1,64 @@
1#ifndef _ASM_CRIS_SVINTO_H
2#define _ASM_CRIS_SVINTO_H
3
4#include "sv_addr_ag.h"
5
6extern unsigned int genconfig_shadow; /* defined and set in head.S */
7
8/* dma stuff */
9
10enum { /* Available in: */
11 d_eol = (1 << 0), /* flags */
12 d_eop = (1 << 1), /* flags & status */
13 d_wait = (1 << 2), /* flags */
14 d_int = (1 << 3), /* flags */
15 d_txerr = (1 << 4), /* flags */
16 d_stop = (1 << 4), /* status */
17 d_ecp = (1 << 4), /* flags & status */
18 d_pri = (1 << 5), /* flags & status */
19 d_alignerr = (1 << 6), /* status */
20 d_crcerr = (1 << 7) /* status */
21};
22
23/* Do remember that DMA does not go through the MMU and needs
24 * a real physical address, not an address virtually mapped or
25 * paged. Therefore the buf/next ptrs below are unsigned long instead
26 * of void * to give a warning if you try to put a pointer directly
27 * to them instead of going through virt_to_phys/phys_to_virt.
28 */
29
30typedef struct etrax_dma_descr {
31 unsigned short sw_len; /* 0-1 */
32 unsigned short ctrl; /* 2-3 */
33 unsigned long next; /* 4-7 */
34 unsigned long buf; /* 8-11 */
35 unsigned short hw_len; /* 12-13 */
36 unsigned char status; /* 14 */
37 unsigned char fifo_len; /* 15 */
38} etrax_dma_descr;
39
40
41/* Use this for constant numbers only */
42#define RESET_DMA_NUM( n ) \
43 *R_DMA_CH##n##_CMD = IO_STATE( R_DMA_CH0_CMD, cmd, reset )
44
45/* Use this for constant numbers or symbols,
46 * having two macros makes it possible to use constant expressions.
47 */
48#define RESET_DMA( n ) RESET_DMA_NUM( n )
49
50
51/* Use this for constant numbers only */
52#define WAIT_DMA_NUM( n ) \
53 while( (*R_DMA_CH##n##_CMD & IO_MASK( R_DMA_CH0_CMD, cmd )) != \
54 IO_STATE( R_DMA_CH0_CMD, cmd, hold ) )
55
56/* Use this for constant numbers or symbols
57 * having two macros makes it possible to use constant expressions.
58 */
59#define WAIT_DMA( n ) WAIT_DMA_NUM( n )
60
61extern void prepare_rx_descriptor(struct etrax_dma_descr *desc);
62extern void flush_etrax_cache(void);
63
64#endif