1 | #ifndef VME_AM_DEFINITIONS_H |
---|
2 | #define VME_AM_DEFINITIONS_H |
---|
3 | |
---|
4 | /* vxworks compatible addressing modes */ |
---|
5 | |
---|
6 | /* |
---|
7 | * Authorship |
---|
8 | * ---------- |
---|
9 | * This software was created by |
---|
10 | * Till Straumann <strauman@slac.stanford.edu>, 2002-2007, |
---|
11 | * Stanford Linear Accelerator Center, Stanford University. |
---|
12 | * |
---|
13 | * Acknowledgement of sponsorship |
---|
14 | * ------------------------------ |
---|
15 | * This software was produced by |
---|
16 | * the Stanford Linear Accelerator Center, Stanford University, |
---|
17 | * under Contract DE-AC03-76SFO0515 with the Department of Energy. |
---|
18 | * |
---|
19 | * Government disclaimer of liability |
---|
20 | * ---------------------------------- |
---|
21 | * Neither the United States nor the United States Department of Energy, |
---|
22 | * nor any of their employees, makes any warranty, express or implied, or |
---|
23 | * assumes any legal liability or responsibility for the accuracy, |
---|
24 | * completeness, or usefulness of any data, apparatus, product, or process |
---|
25 | * disclosed, or represents that its use would not infringe privately owned |
---|
26 | * rights. |
---|
27 | * |
---|
28 | * Stanford disclaimer of liability |
---|
29 | * -------------------------------- |
---|
30 | * Stanford University makes no representations or warranties, express or |
---|
31 | * implied, nor assumes any liability for the use of this software. |
---|
32 | * |
---|
33 | * Stanford disclaimer of copyright |
---|
34 | * -------------------------------- |
---|
35 | * Stanford University, owner of the copyright, hereby disclaims its |
---|
36 | * copyright and all other rights in this software. Hence, anyone may |
---|
37 | * freely use it for any purpose without restriction. |
---|
38 | * |
---|
39 | * Maintenance of notices |
---|
40 | * ---------------------- |
---|
41 | * In the interest of clarity regarding the origin and status of this |
---|
42 | * SLAC software, this and all the preceding Stanford University notices |
---|
43 | * are to remain affixed to any copy or derivative of this software made |
---|
44 | * or distributed by the recipient and are to be affixed to any copy of |
---|
45 | * software made or distributed by the recipient that contains a copy or |
---|
46 | * derivative of this software. |
---|
47 | * |
---|
48 | * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 |
---|
49 | */ |
---|
50 | /* NOTE: 64-bit *addresses* are not supported [data are]. */ |
---|
51 | |
---|
52 | #ifndef VME_AM_STD_SUP_BLT |
---|
53 | #define VME_AM_STD_SUP_BLT 0x3f |
---|
54 | #endif |
---|
55 | #ifndef VME_AM_STD_SUP_ASCENDING |
---|
56 | #define VME_AM_STD_SUP_ASCENDING 0x3f |
---|
57 | #endif |
---|
58 | #ifndef VME_AM_STD_SUP_PGM |
---|
59 | #define VME_AM_STD_SUP_PGM 0x3e |
---|
60 | #endif |
---|
61 | #ifndef VME_AM_STD_SUP_MBLT |
---|
62 | #define VME_AM_STD_SUP_MBLT 0x3c |
---|
63 | #endif |
---|
64 | #ifndef VME_AM_STD_USR_BLT |
---|
65 | #define VME_AM_STD_USR_BLT 0x3b |
---|
66 | #endif |
---|
67 | #ifndef VME_AM_STD_USR_ASCENDING |
---|
68 | #define VME_AM_STD_USR_ASCENDING 0x3b |
---|
69 | #endif |
---|
70 | #ifndef VME_AM_STD_USR_PGM |
---|
71 | #define VME_AM_STD_USR_PGM 0x3a |
---|
72 | #endif |
---|
73 | #ifndef VME_AM_STD_SUP_DATA |
---|
74 | #define VME_AM_STD_SUP_DATA 0x3d |
---|
75 | #endif |
---|
76 | #ifndef VME_AM_STD_USR_DATA |
---|
77 | #define VME_AM_STD_USR_DATA 0x39 |
---|
78 | #endif |
---|
79 | #ifndef VME_AM_STD_USR_MBLT |
---|
80 | #define VME_AM_STD_USR_MBLT 0x38 |
---|
81 | #endif |
---|
82 | #ifndef VME_AM_EXT_SUP_BLT |
---|
83 | #define VME_AM_EXT_SUP_BLT 0x0f |
---|
84 | #endif |
---|
85 | #ifndef VME_AM_EXT_SUP_ASCENDING |
---|
86 | #define VME_AM_EXT_SUP_ASCENDING 0x0f |
---|
87 | #endif |
---|
88 | #ifndef VME_AM_EXT_SUP_PGM |
---|
89 | #define VME_AM_EXT_SUP_PGM 0x0e |
---|
90 | #endif |
---|
91 | #ifndef VME_AM_EXT_SUP_DATA |
---|
92 | #define VME_AM_EXT_SUP_DATA 0x0d |
---|
93 | #endif |
---|
94 | #ifndef VME_AM_EXT_SUP_MBLT |
---|
95 | #define VME_AM_EXT_SUP_MBLT 0x0c |
---|
96 | #endif |
---|
97 | #ifndef VME_AM_EXT_USR_BLT |
---|
98 | #define VME_AM_EXT_USR_BLT 0x0b |
---|
99 | #endif |
---|
100 | #ifndef VME_AM_EXT_USR_ASCENDING |
---|
101 | #define VME_AM_EXT_USR_ASCENDING 0x0b |
---|
102 | #endif |
---|
103 | #ifndef VME_AM_EXT_USR_PGM |
---|
104 | #define VME_AM_EXT_USR_PGM 0x0a |
---|
105 | #endif |
---|
106 | #ifndef VME_AM_EXT_USR_DATA |
---|
107 | #define VME_AM_EXT_USR_DATA 0x09 |
---|
108 | #endif |
---|
109 | #ifndef VME_AM_EXT_USR_MBLT |
---|
110 | #define VME_AM_EXT_USR_MBLT 0x08 |
---|
111 | #endif |
---|
112 | #ifndef VME_AM_2eVME_6U |
---|
113 | #define VME_AM_2eVME_6U 0x20 |
---|
114 | #endif |
---|
115 | #ifndef VME_AM_2eVME_3U |
---|
116 | #define VME_AM_2eVME_3U 0x21 |
---|
117 | #endif |
---|
118 | #ifndef VME_AM_CSR |
---|
119 | #define VME_AM_CSR 0x2f |
---|
120 | #endif |
---|
121 | #ifndef VME_AM_SUP_SHORT_IO |
---|
122 | #define VME_AM_SUP_SHORT_IO 0x2d |
---|
123 | #endif |
---|
124 | #ifndef VME_AM_USR_SHORT_IO |
---|
125 | #define VME_AM_USR_SHORT_IO 0x29 |
---|
126 | #endif |
---|
127 | #ifndef VME_AM_IS_SHORT |
---|
128 | #define VME_AM_IS_SHORT(a) (((a) & 0x30) == 0x20) |
---|
129 | #endif |
---|
130 | #ifndef VME_AM_IS_STD |
---|
131 | #define VME_AM_IS_STD(a) (((a) & 0x30) == 0x30) |
---|
132 | #endif |
---|
133 | #ifndef VME_AM_IS_EXT |
---|
134 | #define VME_AM_IS_EXT(a) (((a) & 0x30) == 0x00) |
---|
135 | #endif |
---|
136 | #ifndef VME_AM_IS_SUP |
---|
137 | #define VME_AM_IS_SUP(a) ((a) & 4) |
---|
138 | #endif |
---|
139 | |
---|
140 | /* Mask for standard address modifiers */ |
---|
141 | |
---|
142 | #ifndef VME_AM_MASK |
---|
143 | #define VME_AM_MASK 0x3f |
---|
144 | #endif |
---|
145 | |
---|
146 | /* Hint that a window is mapping memory; the |
---|
147 | * driver may assume it to be safe to enable decoupled |
---|
148 | * cycles, caching and the like... |
---|
149 | */ |
---|
150 | #ifndef VME_AM_IS_MEMORY |
---|
151 | #define VME_AM_IS_MEMORY (1<<8) |
---|
152 | #endif |
---|
153 | |
---|
154 | /* I don't know AMs for 2eSST so we use some extra bits; |
---|
155 | * HOWEVER: these are just qualifiers to the VME_AM_2eVME_xx modes |
---|
156 | * i.e., if you want 2eSST you must also select 2eVME... |
---|
157 | */ |
---|
158 | |
---|
159 | /* 2eSST broadcast; you still need to set one of the speed bits */ |
---|
160 | #define VME_AM_2eSST_BCST (1<<9) |
---|
161 | /* Low speed (driver specific) */ |
---|
162 | #define VME_AM_2eSST_LO (1<<10) |
---|
163 | /* Mid speed (driver specific) */ |
---|
164 | #define VME_AM_2eSST_MID (2<<10) |
---|
165 | /* High speed (driver specific) */ |
---|
166 | #define VME_AM_2eSST_HI (3<<10) |
---|
167 | |
---|
168 | #define VME_AM_IS_2eSST(am) ((am) & (3<<10)) |
---|
169 | |
---|
170 | /* Use 16-bit transfers for coupled- or BLT cycles |
---|
171 | * (MBLT, 2exxx are probably always 64-bit) |
---|
172 | */ |
---|
173 | #define VME_MODE_DBW16 (1<<12) |
---|
174 | |
---|
175 | /* Unused Flags 1<<12 .. 1<<23 are reserved |
---|
176 | * |
---|
177 | * (20-23 used by DMA API). |
---|
178 | * Flags 1<<24 .. 1<<31 are for driver specific options |
---|
179 | */ |
---|
180 | |
---|
181 | |
---|
182 | #endif |
---|