1 | #ifndef VME_AM_DEFINITIONS_H |
---|
2 | #define VME_AM_DEFINITIONS_H |
---|
3 | |
---|
4 | /* vxworks compatible addressing modes */ |
---|
5 | |
---|
6 | /* NOTE: 64-bit *addresses* are not supported [data are]. */ |
---|
7 | |
---|
8 | #ifndef VME_AM_STD_SUP_BLT |
---|
9 | #define VME_AM_STD_SUP_BLT 0x3f |
---|
10 | #endif |
---|
11 | #ifndef VME_AM_STD_SUP_ASCENDING |
---|
12 | #define VME_AM_STD_SUP_ASCENDING 0x3f |
---|
13 | #endif |
---|
14 | #ifndef VME_AM_STD_SUP_PGM |
---|
15 | #define VME_AM_STD_SUP_PGM 0x3e |
---|
16 | #endif |
---|
17 | #ifndef VME_AM_STD_SUP_MBLT |
---|
18 | #define VME_AM_STD_SUP_MBLT 0x3c |
---|
19 | #endif |
---|
20 | #ifndef VME_AM_STD_USR_BLT |
---|
21 | #define VME_AM_STD_USR_BLT 0x3b |
---|
22 | #endif |
---|
23 | #ifndef VME_AM_STD_USR_ASCENDING |
---|
24 | #define VME_AM_STD_USR_ASCENDING 0x3b |
---|
25 | #endif |
---|
26 | #ifndef VME_AM_STD_USR_PGM |
---|
27 | #define VME_AM_STD_USR_PGM 0x3a |
---|
28 | #endif |
---|
29 | #ifndef VME_AM_STD_SUP_DATA |
---|
30 | #define VME_AM_STD_SUP_DATA 0x3d |
---|
31 | #endif |
---|
32 | #ifndef VME_AM_STD_USR_DATA |
---|
33 | #define VME_AM_STD_USR_DATA 0x39 |
---|
34 | #endif |
---|
35 | #ifndef VME_AM_STD_USR_MBLT |
---|
36 | #define VME_AM_STD_USR_MBLT 0x38 |
---|
37 | #endif |
---|
38 | #ifndef VME_AM_EXT_SUP_BLT |
---|
39 | #define VME_AM_EXT_SUP_BLT 0x0f |
---|
40 | #endif |
---|
41 | #ifndef VME_AM_EXT_SUP_ASCENDING |
---|
42 | #define VME_AM_EXT_SUP_ASCENDING 0x0f |
---|
43 | #endif |
---|
44 | #ifndef VME_AM_EXT_SUP_PGM |
---|
45 | #define VME_AM_EXT_SUP_PGM 0x0e |
---|
46 | #endif |
---|
47 | #ifndef VME_AM_EXT_SUP_DATA |
---|
48 | #define VME_AM_EXT_SUP_DATA 0x0d |
---|
49 | #endif |
---|
50 | #ifndef VME_AM_EXT_SUP_MBLT |
---|
51 | #define VME_AM_EXT_SUP_MBLT 0x0c |
---|
52 | #endif |
---|
53 | #ifndef VME_AM_EXT_USR_BLT |
---|
54 | #define VME_AM_EXT_USR_BLT 0x0b |
---|
55 | #endif |
---|
56 | #ifndef VME_AM_EXT_USR_ASCENDING |
---|
57 | #define VME_AM_EXT_USR_ASCENDING 0x0b |
---|
58 | #endif |
---|
59 | #ifndef VME_AM_EXT_USR_PGM |
---|
60 | #define VME_AM_EXT_USR_PGM 0x0a |
---|
61 | #endif |
---|
62 | #ifndef VME_AM_EXT_USR_DATA |
---|
63 | #define VME_AM_EXT_USR_DATA 0x09 |
---|
64 | #endif |
---|
65 | #ifndef VME_AM_EXT_USR_MBLT |
---|
66 | #define VME_AM_EXT_USR_MBLT 0x08 |
---|
67 | #endif |
---|
68 | #ifndef VME_AM_2eVME_6U |
---|
69 | #define VME_AM_2eVME_6U 0x20 |
---|
70 | #endif |
---|
71 | #ifndef VME_AM_2eVME_3U |
---|
72 | #define VME_AM_2eVME_3U 0x21 |
---|
73 | #endif |
---|
74 | #ifndef VME_AM_CSR |
---|
75 | #define VME_AM_CSR 0x2f |
---|
76 | #endif |
---|
77 | #ifndef VME_AM_SUP_SHORT_IO |
---|
78 | #define VME_AM_SUP_SHORT_IO 0x2d |
---|
79 | #endif |
---|
80 | #ifndef VME_AM_USR_SHORT_IO |
---|
81 | #define VME_AM_USR_SHORT_IO 0x29 |
---|
82 | #endif |
---|
83 | #ifndef VME_AM_IS_SHORT |
---|
84 | #define VME_AM_IS_SHORT(a) (((a) & 0x30) == 0x20) |
---|
85 | #endif |
---|
86 | #ifndef VME_AM_IS_STD |
---|
87 | #define VME_AM_IS_STD(a) (((a) & 0x30) == 0x30) |
---|
88 | #endif |
---|
89 | #ifndef VME_AM_IS_EXT |
---|
90 | #define VME_AM_IS_EXT(a) (((a) & 0x30) == 0x00) |
---|
91 | #endif |
---|
92 | #ifndef VME_AM_IS_SUP |
---|
93 | #define VME_AM_IS_SUP(a) ((a) & 4) |
---|
94 | #endif |
---|
95 | |
---|
96 | /* Mask for standard address modifiers */ |
---|
97 | |
---|
98 | #ifndef VME_AM_MASK |
---|
99 | #define VME_AM_MASK 0x3f |
---|
100 | #endif |
---|
101 | |
---|
102 | /* Hint that a window is mapping memory; the |
---|
103 | * driver may assume it to be safe to enable decoupled |
---|
104 | * cycles, caching and the like... |
---|
105 | */ |
---|
106 | #ifndef VME_AM_IS_MEMORY |
---|
107 | #define VME_AM_IS_MEMORY (1<<8) |
---|
108 | #endif |
---|
109 | |
---|
110 | /* I don't know AMs for 2eSST so we use some extra bits; |
---|
111 | * HOWEVER: these are just qualifiers to the VME_AM_2eVME_xx modes |
---|
112 | * i.e., if you want 2eSST you must also select 2eVME... |
---|
113 | */ |
---|
114 | |
---|
115 | /* 2eSST broadcast; you still need to set one of the speed bits */ |
---|
116 | #define VME_AM_2eSST_BCST (1<<9) |
---|
117 | /* Low speed (driver specific) */ |
---|
118 | #define VME_AM_2eSST_LO (1<<10) |
---|
119 | /* Mid speed (driver specific) */ |
---|
120 | #define VME_AM_2eSST_MID (2<<10) |
---|
121 | /* High speed (driver specific) */ |
---|
122 | #define VME_AM_2eSST_HI (3<<10) |
---|
123 | |
---|
124 | #define VME_AM_IS_2eSST(am) ((am) & (3<<10)) |
---|
125 | |
---|
126 | /* Use 16-bit transfers for coupled- or BLT cycles |
---|
127 | * (MBLT, 2exxx are probably always 64-bit) |
---|
128 | */ |
---|
129 | #define VME_MODE_DBW16 (1<<12) |
---|
130 | |
---|
131 | /* Unused Flags 1<<12 .. 1<<23 are reserved |
---|
132 | * Flags 1<<24 .. 1<<31 are for driver specific options |
---|
133 | */ |
---|
134 | |
---|
135 | |
---|
136 | #endif |
---|