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