34 #define OR1K_SPR_GROUP_BITS 5
35 #define OR1K_SPR_GROUP_LSB 11
36 #define OR1K_SPR_GROUP_MSB 15
37 #define OR1K_SPR_INDEX_BITS 11
38 #define OR1K_SPR_INDEX_LSB 0
39 #define OR1K_SPR_INDEX_MSB 10
42 #define OR1K_UNSIGNED(x) x
44 #define OR1K_UNSIGNED(x) x##U
51 #define OR1K_SPR_SYS_GROUP 0x00
54 #define OR1K_SPR_SYS_VR_INDEX OR1K_UNSIGNED(0x000)
55 #define OR1K_SPR_SYS_VR_ADDR OR1K_UNSIGNED(0x0000)
58 #define OR1K_SPR_SYS_VR_REV_LSB 0
59 #define OR1K_SPR_SYS_VR_REV_MSB 5
60 #define OR1K_SPR_SYS_VR_REV_BITS 6
61 #define OR1K_SPR_SYS_VR_REV_MASK OR1K_UNSIGNED(0x0000003f)
62 #define OR1K_SPR_SYS_VR_REV_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0000003f))
63 #define OR1K_SPR_SYS_VR_REV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc0)) | ((Y) << 0))
66 #define OR1K_SPR_SYS_VR_UVRP_OFFSET 6
67 #define OR1K_SPR_SYS_VR_UVRP_MASK 0x00000040
68 #define OR1K_SPR_SYS_VR_UVRP_GET(X) (((X) >> 6) & 0x1)
69 #define OR1K_SPR_SYS_VR_UVRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
72 #define OR1K_SPR_SYS_VR_CFG_LSB 16
73 #define OR1K_SPR_SYS_VR_CFG_MSB 23
74 #define OR1K_SPR_SYS_VR_CFG_BITS 8
75 #define OR1K_SPR_SYS_VR_CFG_MASK OR1K_UNSIGNED(0x00ff0000)
76 #define OR1K_SPR_SYS_VR_CFG_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x000000ff))
77 #define OR1K_SPR_SYS_VR_CFG_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff00ffff)) | ((Y) << 16))
80 #define OR1K_SPR_SYS_VR_VER_LSB 24
81 #define OR1K_SPR_SYS_VR_VER_MSB 31
82 #define OR1K_SPR_SYS_VR_VER_BITS 8
83 #define OR1K_SPR_SYS_VR_VER_MASK OR1K_UNSIGNED(0xff000000)
84 #define OR1K_SPR_SYS_VR_VER_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
85 #define OR1K_SPR_SYS_VR_VER_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
89 #define OR1K_SPR_SYS_UPR_INDEX OR1K_UNSIGNED(0x001)
90 #define OR1K_SPR_SYS_UPR_ADDR OR1K_UNSIGNED(0x0001)
93 #define OR1K_SPR_SYS_UPR_UP_OFFSET 0
94 #define OR1K_SPR_SYS_UPR_UP_MASK 0x00000001
95 #define OR1K_SPR_SYS_UPR_UP_GET(X) (((X) >> 0) & 0x1)
96 #define OR1K_SPR_SYS_UPR_UP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
99 #define OR1K_SPR_SYS_UPR_DCP_OFFSET 1
100 #define OR1K_SPR_SYS_UPR_DCP_MASK 0x00000002
101 #define OR1K_SPR_SYS_UPR_DCP_GET(X) (((X) >> 1) & 0x1)
102 #define OR1K_SPR_SYS_UPR_DCP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
105 #define OR1K_SPR_SYS_UPR_ICP_OFFSET 2
106 #define OR1K_SPR_SYS_UPR_ICP_MASK 0x00000004
107 #define OR1K_SPR_SYS_UPR_ICP_GET(X) (((X) >> 2) & 0x1)
108 #define OR1K_SPR_SYS_UPR_ICP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
111 #define OR1K_SPR_SYS_UPR_DMP_OFFSET 3
112 #define OR1K_SPR_SYS_UPR_DMP_MASK 0x00000008
113 #define OR1K_SPR_SYS_UPR_DMP_GET(X) (((X) >> 3) & 0x1)
114 #define OR1K_SPR_SYS_UPR_DMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
117 #define OR1K_SPR_SYS_UPR_IMP_OFFSET 4
118 #define OR1K_SPR_SYS_UPR_IMP_MASK 0x00000010
119 #define OR1K_SPR_SYS_UPR_IMP_GET(X) (((X) >> 4) & 0x1)
120 #define OR1K_SPR_SYS_UPR_IMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
123 #define OR1K_SPR_SYS_UPR_MP_OFFSET 5
124 #define OR1K_SPR_SYS_UPR_MP_MASK 0x00000020
125 #define OR1K_SPR_SYS_UPR_MP_GET(X) (((X) >> 5) & 0x1)
126 #define OR1K_SPR_SYS_UPR_MP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
129 #define OR1K_SPR_SYS_UPR_DUP_OFFSET 6
130 #define OR1K_SPR_SYS_UPR_DUP_MASK 0x00000040
131 #define OR1K_SPR_SYS_UPR_DUP_GET(X) (((X) >> 6) & 0x1)
132 #define OR1K_SPR_SYS_UPR_DUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
135 #define OR1K_SPR_SYS_UPR_PCUP_OFFSET 7
136 #define OR1K_SPR_SYS_UPR_PCUP_MASK 0x00000080
137 #define OR1K_SPR_SYS_UPR_PCUP_GET(X) (((X) >> 7) & 0x1)
138 #define OR1K_SPR_SYS_UPR_PCUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
141 #define OR1K_SPR_SYS_UPR_PICP_OFFSET 8
142 #define OR1K_SPR_SYS_UPR_PICP_MASK 0x00000100
143 #define OR1K_SPR_SYS_UPR_PICP_GET(X) (((X) >> 8) & 0x1)
144 #define OR1K_SPR_SYS_UPR_PICP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
147 #define OR1K_SPR_SYS_UPR_PMP_OFFSET 9
148 #define OR1K_SPR_SYS_UPR_PMP_MASK 0x00000200
149 #define OR1K_SPR_SYS_UPR_PMP_GET(X) (((X) >> 9) & 0x1)
150 #define OR1K_SPR_SYS_UPR_PMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
153 #define OR1K_SPR_SYS_UPR_TTP_OFFSET 10
154 #define OR1K_SPR_SYS_UPR_TTP_MASK 0x00000400
155 #define OR1K_SPR_SYS_UPR_TTP_GET(X) (((X) >> 10) & 0x1)
156 #define OR1K_SPR_SYS_UPR_TTP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
159 #define OR1K_SPR_SYS_UPR_CUP_LSB 24
160 #define OR1K_SPR_SYS_UPR_CUP_MSB 31
161 #define OR1K_SPR_SYS_UPR_CUP_BITS 8
162 #define OR1K_SPR_SYS_UPR_CUP_MASK OR1K_UNSIGNED(0xff000000)
163 #define OR1K_SPR_SYS_UPR_CUP_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
164 #define OR1K_SPR_SYS_UPR_CUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
168 #define OR1K_SPR_SYS_CPUCFGR_INDEX OR1K_UNSIGNED(0x002)
169 #define OR1K_SPR_SYS_CPUCFGR_ADDR OR1K_UNSIGNED(0x0002)
172 #define OR1K_SPR_SYS_CPUCFGR_NSGF_LSB 0
173 #define OR1K_SPR_SYS_CPUCFGR_NSGF_MSB 3
174 #define OR1K_SPR_SYS_CPUCFGR_NSGF_BITS 4
175 #define OR1K_SPR_SYS_CPUCFGR_NSGF_MASK OR1K_UNSIGNED(0x0000000f)
176 #define OR1K_SPR_SYS_CPUCFGR_NSGF_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0000000f))
177 #define OR1K_SPR_SYS_CPUCFGR_NSGF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff0)) | ((Y) << 0))
180 #define OR1K_SPR_SYS_CPUCFGR_CGF_OFFSET 4
181 #define OR1K_SPR_SYS_CPUCFGR_CGF_MASK 0x00000010
182 #define OR1K_SPR_SYS_CPUCFGR_CGF_GET(X) (((X) >> 4) & 0x1)
183 #define OR1K_SPR_SYS_CPUCFGR_CGF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
186 #define OR1K_SPR_SYS_CPUCFGR_OB32S_OFFSET 5
187 #define OR1K_SPR_SYS_CPUCFGR_OB32S_MASK 0x00000020
188 #define OR1K_SPR_SYS_CPUCFGR_OB32S_GET(X) (((X) >> 5) & 0x1)
189 #define OR1K_SPR_SYS_CPUCFGR_OB32S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
192 #define OR1K_SPR_SYS_CPUCFGR_OB64S_OFFSET 6
193 #define OR1K_SPR_SYS_CPUCFGR_OB64S_MASK 0x00000040
194 #define OR1K_SPR_SYS_CPUCFGR_OB64S_GET(X) (((X) >> 6) & 0x1)
195 #define OR1K_SPR_SYS_CPUCFGR_OB64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
198 #define OR1K_SPR_SYS_CPUCFGR_OF32S_OFFSET 7
199 #define OR1K_SPR_SYS_CPUCFGR_OF32S_MASK 0x00000080
200 #define OR1K_SPR_SYS_CPUCFGR_OF32S_GET(X) (((X) >> 7) & 0x1)
201 #define OR1K_SPR_SYS_CPUCFGR_OF32S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
204 #define OR1K_SPR_SYS_CPUCFGR_OF64S_OFFSET 8
205 #define OR1K_SPR_SYS_CPUCFGR_OF64S_MASK 0x00000100
206 #define OR1K_SPR_SYS_CPUCFGR_OF64S_GET(X) (((X) >> 8) & 0x1)
207 #define OR1K_SPR_SYS_CPUCFGR_OF64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
210 #define OR1K_SPR_SYS_CPUCFGR_OV64S_OFFSET 9
211 #define OR1K_SPR_SYS_CPUCFGR_OV64S_MASK 0x00000200
212 #define OR1K_SPR_SYS_CPUCFGR_OV64S_GET(X) (((X) >> 9) & 0x1)
213 #define OR1K_SPR_SYS_CPUCFGR_OV64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
216 #define OR1K_SPR_SYS_CPUCFGR_ND_OFFSET 10
217 #define OR1K_SPR_SYS_CPUCFGR_ND_MASK 0x00000400
218 #define OR1K_SPR_SYS_CPUCFGR_ND_GET(X) (((X) >> 10) & 0x1)
219 #define OR1K_SPR_SYS_CPUCFGR_ND_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
222 #define OR1K_SPR_SYS_CPUCFGR_AVRP_OFFSET 11
223 #define OR1K_SPR_SYS_CPUCFGR_AVRP_MASK 0x00000800
224 #define OR1K_SPR_SYS_CPUCFGR_AVRP_GET(X) (((X) >> 11) & 0x1)
225 #define OR1K_SPR_SYS_CPUCFGR_AVRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
228 #define OR1K_SPR_SYS_CPUCFGR_EVBARP_OFFSET 12
229 #define OR1K_SPR_SYS_CPUCFGR_EVBARP_MASK 0x00001000
230 #define OR1K_SPR_SYS_CPUCFGR_EVBARP_GET(X) (((X) >> 12) & 0x1)
231 #define OR1K_SPR_SYS_CPUCFGR_EVBARP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
234 #define OR1K_SPR_SYS_CPUCFGR_ISRP_OFFSET 13
235 #define OR1K_SPR_SYS_CPUCFGR_ISRP_MASK 0x00002000
236 #define OR1K_SPR_SYS_CPUCFGR_ISRP_GET(X) (((X) >> 13) & 0x1)
237 #define OR1K_SPR_SYS_CPUCFGR_ISRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
240 #define OR1K_SPR_SYS_CPUCFGR_AECSRP_OFFSET 14
241 #define OR1K_SPR_SYS_CPUCFGR_AECSRP_MASK 0x00004000
242 #define OR1K_SPR_SYS_CPUCFGR_AECSRP_GET(X) (((X) >> 14) & 0x1)
243 #define OR1K_SPR_SYS_CPUCFGR_AECSRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
247 #define OR1K_SPR_SYS_DMMUCFGR_INDEX OR1K_UNSIGNED(0x003)
248 #define OR1K_SPR_SYS_DMMUCFGR_ADDR OR1K_UNSIGNED(0x0003)
251 #define OR1K_SPR_SYS_DMMUCFGR_NTW_LSB 0
252 #define OR1K_SPR_SYS_DMMUCFGR_NTW_MSB 1
253 #define OR1K_SPR_SYS_DMMUCFGR_NTW_BITS 2
254 #define OR1K_SPR_SYS_DMMUCFGR_NTW_MASK OR1K_UNSIGNED(0x00000003)
255 #define OR1K_SPR_SYS_DMMUCFGR_NTW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
256 #define OR1K_SPR_SYS_DMMUCFGR_NTW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
259 #define OR1K_SPR_SYS_DMMUCFGR_NTS_LSB 2
260 #define OR1K_SPR_SYS_DMMUCFGR_NTS_MSB 4
261 #define OR1K_SPR_SYS_DMMUCFGR_NTS_BITS 3
262 #define OR1K_SPR_SYS_DMMUCFGR_NTS_MASK OR1K_UNSIGNED(0x0000001c)
263 #define OR1K_SPR_SYS_DMMUCFGR_NTS_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000007))
264 #define OR1K_SPR_SYS_DMMUCFGR_NTS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe3)) | ((Y) << 2))
267 #define OR1K_SPR_SYS_DMMUCFGR_NAE_LSB 5
268 #define OR1K_SPR_SYS_DMMUCFGR_NAE_MSB 7
269 #define OR1K_SPR_SYS_DMMUCFGR_NAE_BITS 3
270 #define OR1K_SPR_SYS_DMMUCFGR_NAE_MASK OR1K_UNSIGNED(0x000000e0)
271 #define OR1K_SPR_SYS_DMMUCFGR_NAE_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
272 #define OR1K_SPR_SYS_DMMUCFGR_NAE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
275 #define OR1K_SPR_SYS_DMMUCFGR_CRI_OFFSET 8
276 #define OR1K_SPR_SYS_DMMUCFGR_CRI_MASK 0x00000100
277 #define OR1K_SPR_SYS_DMMUCFGR_CRI_GET(X) (((X) >> 8) & 0x1)
278 #define OR1K_SPR_SYS_DMMUCFGR_CRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
281 #define OR1K_SPR_SYS_DMMUCFGR_PRI_OFFSET 9
282 #define OR1K_SPR_SYS_DMMUCFGR_PRI_MASK 0x00000200
283 #define OR1K_SPR_SYS_DMMUCFGR_PRI_GET(X) (((X) >> 9) & 0x1)
284 #define OR1K_SPR_SYS_DMMUCFGR_PRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
287 #define OR1K_SPR_SYS_DMMUCFGR_TEIRI_OFFSET 10
288 #define OR1K_SPR_SYS_DMMUCFGR_TEIRI_MASK 0x00000400
289 #define OR1K_SPR_SYS_DMMUCFGR_TEIRI_GET(X) (((X) >> 10) & 0x1)
290 #define OR1K_SPR_SYS_DMMUCFGR_TEIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
293 #define OR1K_SPR_SYS_DMMUCFGR_HTR_OFFSET 11
294 #define OR1K_SPR_SYS_DMMUCFGR_HTR_MASK 0x00000800
295 #define OR1K_SPR_SYS_DMMUCFGR_HTR_GET(X) (((X) >> 11) & 0x1)
296 #define OR1K_SPR_SYS_DMMUCFGR_HTR_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
299 #define OR1K_SPR_SYS_DMMUCFGR_HTR_SW 0
301 #define OR1K_SPR_SYS_DMMUCFGR_HTR_HW 1
304 #define OR1K_SPR_SYS_IMMUCFGR_INDEX OR1K_UNSIGNED(0x004)
305 #define OR1K_SPR_SYS_IMMUCFGR_ADDR OR1K_UNSIGNED(0x0004)
308 #define OR1K_SPR_SYS_IMMUCFGR_NTW_LSB 0
309 #define OR1K_SPR_SYS_IMMUCFGR_NTW_MSB 1
310 #define OR1K_SPR_SYS_IMMUCFGR_NTW_BITS 2
311 #define OR1K_SPR_SYS_IMMUCFGR_NTW_MASK OR1K_UNSIGNED(0x00000003)
312 #define OR1K_SPR_SYS_IMMUCFGR_NTW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
313 #define OR1K_SPR_SYS_IMMUCFGR_NTW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
316 #define OR1K_SPR_SYS_IMMUCFGR_NTS_LSB 2
317 #define OR1K_SPR_SYS_IMMUCFGR_NTS_MSB 4
318 #define OR1K_SPR_SYS_IMMUCFGR_NTS_BITS 3
319 #define OR1K_SPR_SYS_IMMUCFGR_NTS_MASK OR1K_UNSIGNED(0x0000001c)
320 #define OR1K_SPR_SYS_IMMUCFGR_NTS_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000007))
321 #define OR1K_SPR_SYS_IMMUCFGR_NTS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe3)) | ((Y) << 2))
324 #define OR1K_SPR_SYS_IMMUCFGR_NAE_LSB 5
325 #define OR1K_SPR_SYS_IMMUCFGR_NAE_MSB 7
326 #define OR1K_SPR_SYS_IMMUCFGR_NAE_BITS 3
327 #define OR1K_SPR_SYS_IMMUCFGR_NAE_MASK OR1K_UNSIGNED(0x000000e0)
328 #define OR1K_SPR_SYS_IMMUCFGR_NAE_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
329 #define OR1K_SPR_SYS_IMMUCFGR_NAE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
332 #define OR1K_SPR_SYS_IMMUCFGR_CRI_OFFSET 8
333 #define OR1K_SPR_SYS_IMMUCFGR_CRI_MASK 0x00000100
334 #define OR1K_SPR_SYS_IMMUCFGR_CRI_GET(X) (((X) >> 8) & 0x1)
335 #define OR1K_SPR_SYS_IMMUCFGR_CRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
338 #define OR1K_SPR_SYS_IMMUCFGR_PRI_OFFSET 9
339 #define OR1K_SPR_SYS_IMMUCFGR_PRI_MASK 0x00000200
340 #define OR1K_SPR_SYS_IMMUCFGR_PRI_GET(X) (((X) >> 9) & 0x1)
341 #define OR1K_SPR_SYS_IMMUCFGR_PRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
344 #define OR1K_SPR_SYS_IMMUCFGR_TEIRI_OFFSET 10
345 #define OR1K_SPR_SYS_IMMUCFGR_TEIRI_MASK 0x00000400
346 #define OR1K_SPR_SYS_IMMUCFGR_TEIRI_GET(X) (((X) >> 10) & 0x1)
347 #define OR1K_SPR_SYS_IMMUCFGR_TEIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
350 #define OR1K_SPR_SYS_IMMUCFGR_HTR_OFFSET 11
351 #define OR1K_SPR_SYS_IMMUCFGR_HTR_MASK 0x00000800
352 #define OR1K_SPR_SYS_IMMUCFGR_HTR_GET(X) (((X) >> 11) & 0x1)
353 #define OR1K_SPR_SYS_IMMUCFGR_HTR_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
356 #define OR1K_SPR_SYS_IMMUCFGR_HTR_SW 0
358 #define OR1K_SPR_SYS_IMMUCFGR_HTR_HW 1
361 #define OR1K_SPR_SYS_DCCFGR_INDEX OR1K_UNSIGNED(0x005)
362 #define OR1K_SPR_SYS_DCCFGR_ADDR OR1K_UNSIGNED(0x0005)
365 #define OR1K_SPR_SYS_DCCFGR_NCW_LSB 0
366 #define OR1K_SPR_SYS_DCCFGR_NCW_MSB 2
367 #define OR1K_SPR_SYS_DCCFGR_NCW_BITS 3
368 #define OR1K_SPR_SYS_DCCFGR_NCW_MASK OR1K_UNSIGNED(0x00000007)
369 #define OR1K_SPR_SYS_DCCFGR_NCW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
370 #define OR1K_SPR_SYS_DCCFGR_NCW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
373 #define OR1K_SPR_SYS_DCCFGR_NCS_LSB 3
374 #define OR1K_SPR_SYS_DCCFGR_NCS_MSB 6
375 #define OR1K_SPR_SYS_DCCFGR_NCS_BITS 4
376 #define OR1K_SPR_SYS_DCCFGR_NCS_MASK OR1K_UNSIGNED(0x00000078)
377 #define OR1K_SPR_SYS_DCCFGR_NCS_GET(X) (((X) >> 3) & OR1K_UNSIGNED(0x0000000f))
378 #define OR1K_SPR_SYS_DCCFGR_NCS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff87)) | ((Y) << 3))
381 #define OR1K_SPR_SYS_DCCFGR_CBS_OFFSET 7
382 #define OR1K_SPR_SYS_DCCFGR_CBS_MASK 0x00000080
383 #define OR1K_SPR_SYS_DCCFGR_CBS_GET(X) (((X) >> 7) & 0x1)
384 #define OR1K_SPR_SYS_DCCFGR_CBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
387 #define OR1K_SPR_SYS_DCCFGR_CBS_16 0
389 #define OR1K_SPR_SYS_DCCFGR_CBS_32 1
391 #define OR1K_SPR_SYS_DCCFGR_CWS_OFFSET 8
392 #define OR1K_SPR_SYS_DCCFGR_CWS_MASK 0x00000100
393 #define OR1K_SPR_SYS_DCCFGR_CWS_GET(X) (((X) >> 8) & 0x1)
394 #define OR1K_SPR_SYS_DCCFGR_CWS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
397 #define OR1K_SPR_SYS_DCCFGR_CWS_WT 0
399 #define OR1K_SPR_SYS_DCCFGR_CWS_WB 1
401 #define OR1K_SPR_SYS_DCCFGR_CCRI_OFFSET 9
402 #define OR1K_SPR_SYS_DCCFGR_CCRI_MASK 0x00000200
403 #define OR1K_SPR_SYS_DCCFGR_CCRI_GET(X) (((X) >> 9) & 0x1)
404 #define OR1K_SPR_SYS_DCCFGR_CCRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
407 #define OR1K_SPR_SYS_DCCFGR_CBIRI_OFFSET 10
408 #define OR1K_SPR_SYS_DCCFGR_CBIRI_MASK 0x00000400
409 #define OR1K_SPR_SYS_DCCFGR_CBIRI_GET(X) (((X) >> 10) & 0x1)
410 #define OR1K_SPR_SYS_DCCFGR_CBIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
413 #define OR1K_SPR_SYS_DCCFGR_CBPRI_OFFSET 11
414 #define OR1K_SPR_SYS_DCCFGR_CBPRI_MASK 0x00000800
415 #define OR1K_SPR_SYS_DCCFGR_CBPRI_GET(X) (((X) >> 11) & 0x1)
416 #define OR1K_SPR_SYS_DCCFGR_CBPRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
419 #define OR1K_SPR_SYS_DCCFGR_CBLRI_OFFSET 12
420 #define OR1K_SPR_SYS_DCCFGR_CBLRI_MASK 0x00001000
421 #define OR1K_SPR_SYS_DCCFGR_CBLRI_GET(X) (((X) >> 12) & 0x1)
422 #define OR1K_SPR_SYS_DCCFGR_CBLRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
425 #define OR1K_SPR_SYS_DCCFGR_CBFRI_OFFSET 13
426 #define OR1K_SPR_SYS_DCCFGR_CBFRI_MASK 0x00002000
427 #define OR1K_SPR_SYS_DCCFGR_CBFRI_GET(X) (((X) >> 13) & 0x1)
428 #define OR1K_SPR_SYS_DCCFGR_CBFRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
431 #define OR1K_SPR_SYS_DCCFGR_CBWBRI_OFFSET 14
432 #define OR1K_SPR_SYS_DCCFGR_CBWBRI_MASK 0x00004000
433 #define OR1K_SPR_SYS_DCCFGR_CBWBRI_GET(X) (((X) >> 14) & 0x1)
434 #define OR1K_SPR_SYS_DCCFGR_CBWBRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
438 #define OR1K_SPR_SYS_ICCFGR_INDEX OR1K_UNSIGNED(0x006)
439 #define OR1K_SPR_SYS_ICCFGR_ADDR OR1K_UNSIGNED(0x0006)
442 #define OR1K_SPR_SYS_ICCFGR_NCW_LSB 0
443 #define OR1K_SPR_SYS_ICCFGR_NCW_MSB 2
444 #define OR1K_SPR_SYS_ICCFGR_NCW_BITS 3
445 #define OR1K_SPR_SYS_ICCFGR_NCW_MASK OR1K_UNSIGNED(0x00000007)
446 #define OR1K_SPR_SYS_ICCFGR_NCW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
447 #define OR1K_SPR_SYS_ICCFGR_NCW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
450 #define OR1K_SPR_SYS_ICCFGR_NCS_LSB 3
451 #define OR1K_SPR_SYS_ICCFGR_NCS_MSB 6
452 #define OR1K_SPR_SYS_ICCFGR_NCS_BITS 4
453 #define OR1K_SPR_SYS_ICCFGR_NCS_MASK OR1K_UNSIGNED(0x00000078)
454 #define OR1K_SPR_SYS_ICCFGR_NCS_GET(X) (((X) >> 3) & OR1K_UNSIGNED(0x0000000f))
455 #define OR1K_SPR_SYS_ICCFGR_NCS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff87)) | ((Y) << 3))
458 #define OR1K_SPR_SYS_ICCFGR_CBS_OFFSET 7
459 #define OR1K_SPR_SYS_ICCFGR_CBS_MASK 0x00000080
460 #define OR1K_SPR_SYS_ICCFGR_CBS_GET(X) (((X) >> 7) & 0x1)
461 #define OR1K_SPR_SYS_ICCFGR_CBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
464 #define OR1K_SPR_SYS_ICCFGR_CBS_16 0
466 #define OR1K_SPR_SYS_ICCFGR_CBS_32 1
468 #define OR1K_SPR_SYS_ICCFGR_CCRI_OFFSET 9
469 #define OR1K_SPR_SYS_ICCFGR_CCRI_MASK 0x00000200
470 #define OR1K_SPR_SYS_ICCFGR_CCRI_GET(X) (((X) >> 9) & 0x1)
471 #define OR1K_SPR_SYS_ICCFGR_CCRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
474 #define OR1K_SPR_SYS_ICCFGR_CBIRI_OFFSET 10
475 #define OR1K_SPR_SYS_ICCFGR_CBIRI_MASK 0x00000400
476 #define OR1K_SPR_SYS_ICCFGR_CBIRI_GET(X) (((X) >> 10) & 0x1)
477 #define OR1K_SPR_SYS_ICCFGR_CBIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
480 #define OR1K_SPR_SYS_ICCFGR_CBPRI_OFFSET 11
481 #define OR1K_SPR_SYS_ICCFGR_CBPRI_MASK 0x00000800
482 #define OR1K_SPR_SYS_ICCFGR_CBPRI_GET(X) (((X) >> 11) & 0x1)
483 #define OR1K_SPR_SYS_ICCFGR_CBPRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
486 #define OR1K_SPR_SYS_ICCFGR_CBLRI_OFFSET 12
487 #define OR1K_SPR_SYS_ICCFGR_CBLRI_MASK 0x00001000
488 #define OR1K_SPR_SYS_ICCFGR_CBLRI_GET(X) (((X) >> 12) & 0x1)
489 #define OR1K_SPR_SYS_ICCFGR_CBLRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
493 #define OR1K_SPR_SYS_DCFGR_INDEX OR1K_UNSIGNED(0x007)
494 #define OR1K_SPR_SYS_DCFGR_ADDR OR1K_UNSIGNED(0x0007)
497 #define OR1K_SPR_SYS_DCFGR_NDP_LSB 0
498 #define OR1K_SPR_SYS_DCFGR_NDP_MSB 2
499 #define OR1K_SPR_SYS_DCFGR_NDP_BITS 3
500 #define OR1K_SPR_SYS_DCFGR_NDP_MASK OR1K_UNSIGNED(0x00000007)
501 #define OR1K_SPR_SYS_DCFGR_NDP_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
502 #define OR1K_SPR_SYS_DCFGR_NDP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
505 #define OR1K_SPR_SYS_DCFGR_WPCI_OFFSET 3
506 #define OR1K_SPR_SYS_DCFGR_WPCI_MASK 0x00000008
507 #define OR1K_SPR_SYS_DCFGR_WPCI_GET(X) (((X) >> 3) & 0x1)
508 #define OR1K_SPR_SYS_DCFGR_WPCI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
512 #define OR1K_SPR_SYS_PCCFGR_INDEX OR1K_UNSIGNED(0x008)
513 #define OR1K_SPR_SYS_PCCFGR_ADDR OR1K_UNSIGNED(0x0008)
516 #define OR1K_SPR_SYS_PCCFGR_NPC_LSB 0
517 #define OR1K_SPR_SYS_PCCFGR_NPC_MSB 2
518 #define OR1K_SPR_SYS_PCCFGR_NPC_BITS 3
519 #define OR1K_SPR_SYS_PCCFGR_NPC_MASK OR1K_UNSIGNED(0x00000007)
520 #define OR1K_SPR_SYS_PCCFGR_NPC_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
521 #define OR1K_SPR_SYS_PCCFGR_NPC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
525 #define OR1K_SPR_SYS_VR2_INDEX OR1K_UNSIGNED(0x009)
526 #define OR1K_SPR_SYS_VR2_ADDR OR1K_UNSIGNED(0x0009)
529 #define OR1K_SPR_SYS_VR2_VER_LSB 0
530 #define OR1K_SPR_SYS_VR2_VER_MSB 23
531 #define OR1K_SPR_SYS_VR2_VER_BITS 24
532 #define OR1K_SPR_SYS_VR2_VER_MASK OR1K_UNSIGNED(0x00ffffff)
533 #define OR1K_SPR_SYS_VR2_VER_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00ffffff))
534 #define OR1K_SPR_SYS_VR2_VER_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff000000)) | ((Y) << 0))
537 #define OR1K_SPR_SYS_VR2_CPUID_LSB 24
538 #define OR1K_SPR_SYS_VR2_CPUID_MSB 31
539 #define OR1K_SPR_SYS_VR2_CPUID_BITS 8
540 #define OR1K_SPR_SYS_VR2_CPUID_MASK OR1K_UNSIGNED(0xff000000)
541 #define OR1K_SPR_SYS_VR2_CPUID_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
542 #define OR1K_SPR_SYS_VR2_CPUID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
546 #define OR1K_SPR_SYS_AVR_INDEX OR1K_UNSIGNED(0x00a)
547 #define OR1K_SPR_SYS_AVR_ADDR OR1K_UNSIGNED(0x000a)
550 #define OR1K_SPR_SYS_AVR_REV_LSB 8
551 #define OR1K_SPR_SYS_AVR_REV_MSB 15
552 #define OR1K_SPR_SYS_AVR_REV_BITS 8
553 #define OR1K_SPR_SYS_AVR_REV_MASK OR1K_UNSIGNED(0x0000ff00)
554 #define OR1K_SPR_SYS_AVR_REV_GET(X) (((X) >> 8) & OR1K_UNSIGNED(0x000000ff))
555 #define OR1K_SPR_SYS_AVR_REV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff00ff)) | ((Y) << 8))
558 #define OR1K_SPR_SYS_AVR_MIN_LSB 16
559 #define OR1K_SPR_SYS_AVR_MIN_MSB 23
560 #define OR1K_SPR_SYS_AVR_MIN_BITS 8
561 #define OR1K_SPR_SYS_AVR_MIN_MASK OR1K_UNSIGNED(0x00ff0000)
562 #define OR1K_SPR_SYS_AVR_MIN_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x000000ff))
563 #define OR1K_SPR_SYS_AVR_MIN_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff00ffff)) | ((Y) << 16))
566 #define OR1K_SPR_SYS_AVR_MAJ_LSB 24
567 #define OR1K_SPR_SYS_AVR_MAJ_MSB 31
568 #define OR1K_SPR_SYS_AVR_MAJ_BITS 8
569 #define OR1K_SPR_SYS_AVR_MAJ_MASK OR1K_UNSIGNED(0xff000000)
570 #define OR1K_SPR_SYS_AVR_MAJ_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
571 #define OR1K_SPR_SYS_AVR_MAJ_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
575 #define OR1K_SPR_SYS_EVBAR_INDEX OR1K_UNSIGNED(0x00b)
576 #define OR1K_SPR_SYS_EVBAR_ADDR OR1K_UNSIGNED(0x000b)
579 #define OR1K_SPR_SYS_EVBAR_EVBA_LSB 13
580 #define OR1K_SPR_SYS_EVBAR_EVBA_MSB 31
581 #define OR1K_SPR_SYS_EVBAR_EVBA_BITS 19
582 #define OR1K_SPR_SYS_EVBAR_EVBA_MASK OR1K_UNSIGNED(0xffffe000)
583 #define OR1K_SPR_SYS_EVBAR_EVBA_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
584 #define OR1K_SPR_SYS_EVBAR_EVBA_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
588 #define OR1K_SPR_SYS_AECR_INDEX OR1K_UNSIGNED(0x00c)
589 #define OR1K_SPR_SYS_AECR_ADDR OR1K_UNSIGNED(0x000c)
592 #define OR1K_SPR_SYS_AECR_CYADDE_OFFSET 0
593 #define OR1K_SPR_SYS_AECR_CYADDE_MASK 0x00000001
594 #define OR1K_SPR_SYS_AECR_CYADDE_GET(X) (((X) >> 0) & 0x1)
595 #define OR1K_SPR_SYS_AECR_CYADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
598 #define OR1K_SPR_SYS_AECR_OVADDE_OFFSET 1
599 #define OR1K_SPR_SYS_AECR_OVADDE_MASK 0x00000002
600 #define OR1K_SPR_SYS_AECR_OVADDE_GET(X) (((X) >> 1) & 0x1)
601 #define OR1K_SPR_SYS_AECR_OVADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
604 #define OR1K_SPR_SYS_AECR_CYMULE_OFFSET 2
605 #define OR1K_SPR_SYS_AECR_CYMULE_MASK 0x00000004
606 #define OR1K_SPR_SYS_AECR_CYMULE_GET(X) (((X) >> 2) & 0x1)
607 #define OR1K_SPR_SYS_AECR_CYMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
610 #define OR1K_SPR_SYS_AECR_OVMULE_OFFSET 3
611 #define OR1K_SPR_SYS_AECR_OVMULE_MASK 0x00000008
612 #define OR1K_SPR_SYS_AECR_OVMULE_GET(X) (((X) >> 3) & 0x1)
613 #define OR1K_SPR_SYS_AECR_OVMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
616 #define OR1K_SPR_SYS_AECR_DBZE_OFFSET 4
617 #define OR1K_SPR_SYS_AECR_DBZE_MASK 0x00000010
618 #define OR1K_SPR_SYS_AECR_DBZE_GET(X) (((X) >> 4) & 0x1)
619 #define OR1K_SPR_SYS_AECR_DBZE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
622 #define OR1K_SPR_SYS_AECR_CYMACADDE_OFFSET 5
623 #define OR1K_SPR_SYS_AECR_CYMACADDE_MASK 0x00000020
624 #define OR1K_SPR_SYS_AECR_CYMACADDE_GET(X) (((X) >> 5) & 0x1)
625 #define OR1K_SPR_SYS_AECR_CYMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
628 #define OR1K_SPR_SYS_AECR_OVMACADDE_OFFSET 6
629 #define OR1K_SPR_SYS_AECR_OVMACADDE_MASK 0x00000040
630 #define OR1K_SPR_SYS_AECR_OVMACADDE_GET(X) (((X) >> 6) & 0x1)
631 #define OR1K_SPR_SYS_AECR_OVMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
635 #define OR1K_SPR_SYS_AESR_INDEX OR1K_UNSIGNED(0x00d)
636 #define OR1K_SPR_SYS_AESR_ADDR OR1K_UNSIGNED(0x000d)
639 #define OR1K_SPR_SYS_AESR_CYADDE_OFFSET 0
640 #define OR1K_SPR_SYS_AESR_CYADDE_MASK 0x00000001
641 #define OR1K_SPR_SYS_AESR_CYADDE_GET(X) (((X) >> 0) & 0x1)
642 #define OR1K_SPR_SYS_AESR_CYADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
645 #define OR1K_SPR_SYS_AESR_OVADDE_OFFSET 1
646 #define OR1K_SPR_SYS_AESR_OVADDE_MASK 0x00000002
647 #define OR1K_SPR_SYS_AESR_OVADDE_GET(X) (((X) >> 1) & 0x1)
648 #define OR1K_SPR_SYS_AESR_OVADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
651 #define OR1K_SPR_SYS_AESR_CYMULE_OFFSET 2
652 #define OR1K_SPR_SYS_AESR_CYMULE_MASK 0x00000004
653 #define OR1K_SPR_SYS_AESR_CYMULE_GET(X) (((X) >> 2) & 0x1)
654 #define OR1K_SPR_SYS_AESR_CYMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
657 #define OR1K_SPR_SYS_AESR_OVMULE_OFFSET 3
658 #define OR1K_SPR_SYS_AESR_OVMULE_MASK 0x00000008
659 #define OR1K_SPR_SYS_AESR_OVMULE_GET(X) (((X) >> 3) & 0x1)
660 #define OR1K_SPR_SYS_AESR_OVMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
663 #define OR1K_SPR_SYS_AESR_DBZE_OFFSET 4
664 #define OR1K_SPR_SYS_AESR_DBZE_MASK 0x00000010
665 #define OR1K_SPR_SYS_AESR_DBZE_GET(X) (((X) >> 4) & 0x1)
666 #define OR1K_SPR_SYS_AESR_DBZE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
669 #define OR1K_SPR_SYS_AESR_CYMACADDE_OFFSET 5
670 #define OR1K_SPR_SYS_AESR_CYMACADDE_MASK 0x00000020
671 #define OR1K_SPR_SYS_AESR_CYMACADDE_GET(X) (((X) >> 5) & 0x1)
672 #define OR1K_SPR_SYS_AESR_CYMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
675 #define OR1K_SPR_SYS_AESR_OVMACADDE_OFFSET 6
676 #define OR1K_SPR_SYS_AESR_OVMACADDE_MASK 0x00000040
677 #define OR1K_SPR_SYS_AESR_OVMACADDE_GET(X) (((X) >> 6) & 0x1)
678 #define OR1K_SPR_SYS_AESR_OVMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
682 #define OR1K_SPR_SYS_NPC_INDEX OR1K_UNSIGNED(0x010)
683 #define OR1K_SPR_SYS_NPC_ADDR OR1K_UNSIGNED(0x0010)
687 #define OR1K_SPR_SYS_SR_INDEX OR1K_UNSIGNED(0x011)
688 #define OR1K_SPR_SYS_SR_ADDR OR1K_UNSIGNED(0x0011)
691 #define OR1K_SPR_SYS_SR_SM_OFFSET 0
692 #define OR1K_SPR_SYS_SR_SM_MASK 0x00000001
693 #define OR1K_SPR_SYS_SR_SM_GET(X) (((X) >> 0) & 0x1)
694 #define OR1K_SPR_SYS_SR_SM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
697 #define OR1K_SPR_SYS_SR_TEE_OFFSET 1
698 #define OR1K_SPR_SYS_SR_TEE_MASK 0x00000002
699 #define OR1K_SPR_SYS_SR_TEE_GET(X) (((X) >> 1) & 0x1)
700 #define OR1K_SPR_SYS_SR_TEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
703 #define OR1K_SPR_SYS_SR_IEE_OFFSET 2
704 #define OR1K_SPR_SYS_SR_IEE_MASK 0x00000004
705 #define OR1K_SPR_SYS_SR_IEE_GET(X) (((X) >> 2) & 0x1)
706 #define OR1K_SPR_SYS_SR_IEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
709 #define OR1K_SPR_SYS_SR_DCE_OFFSET 3
710 #define OR1K_SPR_SYS_SR_DCE_MASK 0x00000008
711 #define OR1K_SPR_SYS_SR_DCE_GET(X) (((X) >> 3) & 0x1)
712 #define OR1K_SPR_SYS_SR_DCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
715 #define OR1K_SPR_SYS_SR_ICE_OFFSET 4
716 #define OR1K_SPR_SYS_SR_ICE_MASK 0x00000010
717 #define OR1K_SPR_SYS_SR_ICE_GET(X) (((X) >> 4) & 0x1)
718 #define OR1K_SPR_SYS_SR_ICE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
721 #define OR1K_SPR_SYS_SR_DME_OFFSET 5
722 #define OR1K_SPR_SYS_SR_DME_MASK 0x00000020
723 #define OR1K_SPR_SYS_SR_DME_GET(X) (((X) >> 5) & 0x1)
724 #define OR1K_SPR_SYS_SR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
727 #define OR1K_SPR_SYS_SR_IME_OFFSET 6
728 #define OR1K_SPR_SYS_SR_IME_MASK 0x00000040
729 #define OR1K_SPR_SYS_SR_IME_GET(X) (((X) >> 6) & 0x1)
730 #define OR1K_SPR_SYS_SR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
733 #define OR1K_SPR_SYS_SR_LEE_OFFSET 7
734 #define OR1K_SPR_SYS_SR_LEE_MASK 0x00000080
735 #define OR1K_SPR_SYS_SR_LEE_GET(X) (((X) >> 7) & 0x1)
736 #define OR1K_SPR_SYS_SR_LEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
739 #define OR1K_SPR_SYS_SR_CE_OFFSET 8
740 #define OR1K_SPR_SYS_SR_CE_MASK 0x00000100
741 #define OR1K_SPR_SYS_SR_CE_GET(X) (((X) >> 8) & 0x1)
742 #define OR1K_SPR_SYS_SR_CE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
745 #define OR1K_SPR_SYS_SR_F_OFFSET 9
746 #define OR1K_SPR_SYS_SR_F_MASK 0x00000200
747 #define OR1K_SPR_SYS_SR_F_GET(X) (((X) >> 9) & 0x1)
748 #define OR1K_SPR_SYS_SR_F_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
751 #define OR1K_SPR_SYS_SR_CY_OFFSET 10
752 #define OR1K_SPR_SYS_SR_CY_MASK 0x00000400
753 #define OR1K_SPR_SYS_SR_CY_GET(X) (((X) >> 10) & 0x1)
754 #define OR1K_SPR_SYS_SR_CY_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
757 #define OR1K_SPR_SYS_SR_OV_OFFSET 11
758 #define OR1K_SPR_SYS_SR_OV_MASK 0x00000800
759 #define OR1K_SPR_SYS_SR_OV_GET(X) (((X) >> 11) & 0x1)
760 #define OR1K_SPR_SYS_SR_OV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
763 #define OR1K_SPR_SYS_SR_OVE_OFFSET 12
764 #define OR1K_SPR_SYS_SR_OVE_MASK 0x00001000
765 #define OR1K_SPR_SYS_SR_OVE_GET(X) (((X) >> 12) & 0x1)
766 #define OR1K_SPR_SYS_SR_OVE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
769 #define OR1K_SPR_SYS_SR_DSX_OFFSET 13
770 #define OR1K_SPR_SYS_SR_DSX_MASK 0x00002000
771 #define OR1K_SPR_SYS_SR_DSX_GET(X) (((X) >> 13) & 0x1)
772 #define OR1K_SPR_SYS_SR_DSX_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
775 #define OR1K_SPR_SYS_SR_EPH_OFFSET 14
776 #define OR1K_SPR_SYS_SR_EPH_MASK 0x00004000
777 #define OR1K_SPR_SYS_SR_EPH_GET(X) (((X) >> 14) & 0x1)
778 #define OR1K_SPR_SYS_SR_EPH_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
781 #define OR1K_SPR_SYS_SR_FO_OFFSET 15
782 #define OR1K_SPR_SYS_SR_FO_MASK 0x00008000
783 #define OR1K_SPR_SYS_SR_FO_GET(X) (((X) >> 15) & 0x1)
784 #define OR1K_SPR_SYS_SR_FO_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
787 #define OR1K_SPR_SYS_SR_SUMRA_OFFSET 16
788 #define OR1K_SPR_SYS_SR_SUMRA_MASK 0x00010000
789 #define OR1K_SPR_SYS_SR_SUMRA_GET(X) (((X) >> 16) & 0x1)
790 #define OR1K_SPR_SYS_SR_SUMRA_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
793 #define OR1K_SPR_SYS_SR_CID_LSB 28
794 #define OR1K_SPR_SYS_SR_CID_MSB 31
795 #define OR1K_SPR_SYS_SR_CID_BITS 4
796 #define OR1K_SPR_SYS_SR_CID_MASK OR1K_UNSIGNED(0xf0000000)
797 #define OR1K_SPR_SYS_SR_CID_GET(X) (((X) >> 28) & OR1K_UNSIGNED(0x0000000f))
798 #define OR1K_SPR_SYS_SR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x0fffffff)) | ((Y) << 28))
802 #define OR1K_SPR_SYS_PPC_INDEX OR1K_UNSIGNED(0x012)
803 #define OR1K_SPR_SYS_PPC_ADDR OR1K_UNSIGNED(0x0012)
807 #define OR1K_SPR_SYS_FPCSR_INDEX OR1K_UNSIGNED(0x014)
808 #define OR1K_SPR_SYS_FPCSR_ADDR OR1K_UNSIGNED(0x0014)
811 #define OR1K_SPR_SYS_FPCSR_FPEE_OFFSET 0
812 #define OR1K_SPR_SYS_FPCSR_FPEE_MASK 0x00000001
813 #define OR1K_SPR_SYS_FPCSR_FPEE_GET(X) (((X) >> 0) & 0x1)
814 #define OR1K_SPR_SYS_FPCSR_FPEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
817 #define OR1K_SPR_SYS_FPCSR_RM_LSB 1
818 #define OR1K_SPR_SYS_FPCSR_RM_MSB 2
819 #define OR1K_SPR_SYS_FPCSR_RM_BITS 2
820 #define OR1K_SPR_SYS_FPCSR_RM_MASK OR1K_UNSIGNED(0x00000006)
821 #define OR1K_SPR_SYS_FPCSR_RM_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x00000003))
822 #define OR1K_SPR_SYS_FPCSR_RM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff9)) | ((Y) << 1))
825 #define OR1K_SPR_SYS_FPCSR_RM_NEAREST 0
827 #define OR1K_SPR_SYS_FPCSR_RM_ZERO 1
829 #define OR1K_SPR_SYS_FPCSR_RM_INFPLUS 2
831 #define OR1K_SPR_SYS_FPCSR_RM_INFMINUS 3
833 #define OR1K_SPR_SYS_FPCSR_OVF_OFFSET 3
834 #define OR1K_SPR_SYS_FPCSR_OVF_MASK 0x00000008
835 #define OR1K_SPR_SYS_FPCSR_OVF_GET(X) (((X) >> 3) & 0x1)
836 #define OR1K_SPR_SYS_FPCSR_OVF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
839 #define OR1K_SPR_SYS_FPCSR_UNF_OFFSET 4
840 #define OR1K_SPR_SYS_FPCSR_UNF_MASK 0x00000010
841 #define OR1K_SPR_SYS_FPCSR_UNF_GET(X) (((X) >> 4) & 0x1)
842 #define OR1K_SPR_SYS_FPCSR_UNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
845 #define OR1K_SPR_SYS_FPCSR_SNF_OFFSET 5
846 #define OR1K_SPR_SYS_FPCSR_SNF_MASK 0x00000020
847 #define OR1K_SPR_SYS_FPCSR_SNF_GET(X) (((X) >> 5) & 0x1)
848 #define OR1K_SPR_SYS_FPCSR_SNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
851 #define OR1K_SPR_SYS_FPCSR_QNF_OFFSET 6
852 #define OR1K_SPR_SYS_FPCSR_QNF_MASK 0x00000040
853 #define OR1K_SPR_SYS_FPCSR_QNF_GET(X) (((X) >> 6) & 0x1)
854 #define OR1K_SPR_SYS_FPCSR_QNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
857 #define OR1K_SPR_SYS_FPCSR_ZF_OFFSET 7
858 #define OR1K_SPR_SYS_FPCSR_ZF_MASK 0x00000080
859 #define OR1K_SPR_SYS_FPCSR_ZF_GET(X) (((X) >> 7) & 0x1)
860 #define OR1K_SPR_SYS_FPCSR_ZF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
863 #define OR1K_SPR_SYS_FPCSR_IXF_OFFSET 8
864 #define OR1K_SPR_SYS_FPCSR_IXF_MASK 0x00000100
865 #define OR1K_SPR_SYS_FPCSR_IXF_GET(X) (((X) >> 8) & 0x1)
866 #define OR1K_SPR_SYS_FPCSR_IXF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
869 #define OR1K_SPR_SYS_FPCSR_IVF_OFFSET 9
870 #define OR1K_SPR_SYS_FPCSR_IVF_MASK 0x00000200
871 #define OR1K_SPR_SYS_FPCSR_IVF_GET(X) (((X) >> 9) & 0x1)
872 #define OR1K_SPR_SYS_FPCSR_IVF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
875 #define OR1K_SPR_SYS_FPCSR_INF_OFFSET 10
876 #define OR1K_SPR_SYS_FPCSR_INF_MASK 0x00000400
877 #define OR1K_SPR_SYS_FPCSR_INF_GET(X) (((X) >> 10) & 0x1)
878 #define OR1K_SPR_SYS_FPCSR_INF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
881 #define OR1K_SPR_SYS_FPCSR_DZF_OFFSET 11
882 #define OR1K_SPR_SYS_FPCSR_DZF_MASK 0x00000800
883 #define OR1K_SPR_SYS_FPCSR_DZF_GET(X) (((X) >> 11) & 0x1)
884 #define OR1K_SPR_SYS_FPCSR_DZF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
888 #define OR1K_SPR_SYS_ISR_BASE OR1K_UNSIGNED(0x015)
889 #define OR1K_SPR_SYS_ISR_COUNT OR1K_UNSIGNED(0x008)
890 #define OR1K_SPR_SYS_ISR_STEP OR1K_UNSIGNED(0x001)
891 #define OR1K_SPR_SYS_ISR_INDEX(N) (OR1K_SPR_SYS_ISR_BASE + ((N) * OR1K_SPR_SYS_ISR_STEP))
892 #define OR1K_SPR_SYS_ISR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_ISR_INDEX(N))
896 #define OR1K_SPR_SYS_EPCR_BASE OR1K_UNSIGNED(0x020)
897 #define OR1K_SPR_SYS_EPCR_COUNT OR1K_UNSIGNED(0x010)
898 #define OR1K_SPR_SYS_EPCR_STEP OR1K_UNSIGNED(0x001)
899 #define OR1K_SPR_SYS_EPCR_INDEX(N) (OR1K_SPR_SYS_EPCR_BASE + ((N) * OR1K_SPR_SYS_EPCR_STEP))
900 #define OR1K_SPR_SYS_EPCR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_EPCR_INDEX(N))
904 #define OR1K_SPR_SYS_EEAR_BASE OR1K_UNSIGNED(0x030)
905 #define OR1K_SPR_SYS_EEAR_COUNT OR1K_UNSIGNED(0x010)
906 #define OR1K_SPR_SYS_EEAR_STEP OR1K_UNSIGNED(0x001)
907 #define OR1K_SPR_SYS_EEAR_INDEX(N) (OR1K_SPR_SYS_EEAR_BASE + ((N) * OR1K_SPR_SYS_EEAR_STEP))
908 #define OR1K_SPR_SYS_EEAR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_EEAR_INDEX(N))
912 #define OR1K_SPR_SYS_ESR_BASE OR1K_UNSIGNED(0x040)
913 #define OR1K_SPR_SYS_ESR_COUNT OR1K_UNSIGNED(0x010)
914 #define OR1K_SPR_SYS_ESR_STEP OR1K_UNSIGNED(0x001)
915 #define OR1K_SPR_SYS_ESR_INDEX(N) (OR1K_SPR_SYS_ESR_BASE + ((N) * OR1K_SPR_SYS_ESR_STEP))
916 #define OR1K_SPR_SYS_ESR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_ESR_INDEX(N))
919 #define OR1K_SPR_SYS_ESR_SM_OFFSET 0
920 #define OR1K_SPR_SYS_ESR_SM_MASK 0x00000001
921 #define OR1K_SPR_SYS_ESR_SM_GET(X) (((X) >> 0) & 0x1)
922 #define OR1K_SPR_SYS_ESR_SM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
925 #define OR1K_SPR_SYS_ESR_TEE_OFFSET 1
926 #define OR1K_SPR_SYS_ESR_TEE_MASK 0x00000002
927 #define OR1K_SPR_SYS_ESR_TEE_GET(X) (((X) >> 1) & 0x1)
928 #define OR1K_SPR_SYS_ESR_TEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
931 #define OR1K_SPR_SYS_ESR_IEE_OFFSET 2
932 #define OR1K_SPR_SYS_ESR_IEE_MASK 0x00000004
933 #define OR1K_SPR_SYS_ESR_IEE_GET(X) (((X) >> 2) & 0x1)
934 #define OR1K_SPR_SYS_ESR_IEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
937 #define OR1K_SPR_SYS_ESR_DCE_OFFSET 3
938 #define OR1K_SPR_SYS_ESR_DCE_MASK 0x00000008
939 #define OR1K_SPR_SYS_ESR_DCE_GET(X) (((X) >> 3) & 0x1)
940 #define OR1K_SPR_SYS_ESR_DCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
943 #define OR1K_SPR_SYS_ESR_ICE_OFFSET 4
944 #define OR1K_SPR_SYS_ESR_ICE_MASK 0x00000010
945 #define OR1K_SPR_SYS_ESR_ICE_GET(X) (((X) >> 4) & 0x1)
946 #define OR1K_SPR_SYS_ESR_ICE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
949 #define OR1K_SPR_SYS_ESR_DME_OFFSET 5
950 #define OR1K_SPR_SYS_ESR_DME_MASK 0x00000020
951 #define OR1K_SPR_SYS_ESR_DME_GET(X) (((X) >> 5) & 0x1)
952 #define OR1K_SPR_SYS_ESR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
955 #define OR1K_SPR_SYS_ESR_IME_OFFSET 6
956 #define OR1K_SPR_SYS_ESR_IME_MASK 0x00000040
957 #define OR1K_SPR_SYS_ESR_IME_GET(X) (((X) >> 6) & 0x1)
958 #define OR1K_SPR_SYS_ESR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
961 #define OR1K_SPR_SYS_ESR_LEE_OFFSET 7
962 #define OR1K_SPR_SYS_ESR_LEE_MASK 0x00000080
963 #define OR1K_SPR_SYS_ESR_LEE_GET(X) (((X) >> 7) & 0x1)
964 #define OR1K_SPR_SYS_ESR_LEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
967 #define OR1K_SPR_SYS_ESR_CE_OFFSET 8
968 #define OR1K_SPR_SYS_ESR_CE_MASK 0x00000100
969 #define OR1K_SPR_SYS_ESR_CE_GET(X) (((X) >> 8) & 0x1)
970 #define OR1K_SPR_SYS_ESR_CE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
973 #define OR1K_SPR_SYS_ESR_F_OFFSET 9
974 #define OR1K_SPR_SYS_ESR_F_MASK 0x00000200
975 #define OR1K_SPR_SYS_ESR_F_GET(X) (((X) >> 9) & 0x1)
976 #define OR1K_SPR_SYS_ESR_F_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
979 #define OR1K_SPR_SYS_ESR_CY_OFFSET 10
980 #define OR1K_SPR_SYS_ESR_CY_MASK 0x00000400
981 #define OR1K_SPR_SYS_ESR_CY_GET(X) (((X) >> 10) & 0x1)
982 #define OR1K_SPR_SYS_ESR_CY_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
985 #define OR1K_SPR_SYS_ESR_OV_OFFSET 11
986 #define OR1K_SPR_SYS_ESR_OV_MASK 0x00000800
987 #define OR1K_SPR_SYS_ESR_OV_GET(X) (((X) >> 11) & 0x1)
988 #define OR1K_SPR_SYS_ESR_OV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
991 #define OR1K_SPR_SYS_ESR_OVE_OFFSET 12
992 #define OR1K_SPR_SYS_ESR_OVE_MASK 0x00001000
993 #define OR1K_SPR_SYS_ESR_OVE_GET(X) (((X) >> 12) & 0x1)
994 #define OR1K_SPR_SYS_ESR_OVE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
997 #define OR1K_SPR_SYS_ESR_DSX_OFFSET 13
998 #define OR1K_SPR_SYS_ESR_DSX_MASK 0x00002000
999 #define OR1K_SPR_SYS_ESR_DSX_GET(X) (((X) >> 13) & 0x1)
1000 #define OR1K_SPR_SYS_ESR_DSX_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
1003 #define OR1K_SPR_SYS_ESR_EPH_OFFSET 14
1004 #define OR1K_SPR_SYS_ESR_EPH_MASK 0x00004000
1005 #define OR1K_SPR_SYS_ESR_EPH_GET(X) (((X) >> 14) & 0x1)
1006 #define OR1K_SPR_SYS_ESR_EPH_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
1009 #define OR1K_SPR_SYS_ESR_FO_OFFSET 15
1010 #define OR1K_SPR_SYS_ESR_FO_MASK 0x00008000
1011 #define OR1K_SPR_SYS_ESR_FO_GET(X) (((X) >> 15) & 0x1)
1012 #define OR1K_SPR_SYS_ESR_FO_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
1015 #define OR1K_SPR_SYS_ESR_SUMRA_OFFSET 16
1016 #define OR1K_SPR_SYS_ESR_SUMRA_MASK 0x00010000
1017 #define OR1K_SPR_SYS_ESR_SUMRA_GET(X) (((X) >> 16) & 0x1)
1018 #define OR1K_SPR_SYS_ESR_SUMRA_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
1021 #define OR1K_SPR_SYS_ESR_CID_LSB 28
1022 #define OR1K_SPR_SYS_ESR_CID_MSB 31
1023 #define OR1K_SPR_SYS_ESR_CID_BITS 4
1024 #define OR1K_SPR_SYS_ESR_CID_MASK OR1K_UNSIGNED(0xf0000000)
1025 #define OR1K_SPR_SYS_ESR_CID_GET(X) (((X) >> 28) & OR1K_UNSIGNED(0x0000000f))
1026 #define OR1K_SPR_SYS_ESR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x0fffffff)) | ((Y) << 28))
1030 #define OR1K_SPR_SYS_COREID_INDEX OR1K_UNSIGNED(0x080)
1031 #define OR1K_SPR_SYS_COREID_ADDR OR1K_UNSIGNED(0x0080)
1035 #define OR1K_SPR_SYS_NUMCORES_INDEX OR1K_UNSIGNED(0x081)
1036 #define OR1K_SPR_SYS_NUMCORES_ADDR OR1K_UNSIGNED(0x0081)
1040 #define OR1K_SPR_SYS_GPR_BASE OR1K_UNSIGNED(0x400)
1041 #define OR1K_SPR_SYS_GPR_COUNT OR1K_UNSIGNED(0x100)
1042 #define OR1K_SPR_SYS_GPR_STEP OR1K_UNSIGNED(0x001)
1043 #define OR1K_SPR_SYS_GPR_INDEX(N) (OR1K_SPR_SYS_GPR_BASE + ((N) * OR1K_SPR_SYS_GPR_STEP))
1044 #define OR1K_SPR_SYS_GPR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_GPR_INDEX(N))
1050 #define OR1K_SPR_DMMU_GROUP 0x01
1053 #define OR1K_SPR_DMMU_DMMUCR_INDEX OR1K_UNSIGNED(0x000)
1054 #define OR1K_SPR_DMMU_DMMUCR_ADDR OR1K_UNSIGNED(0x0800)
1057 #define OR1K_SPR_DMMU_DMMUCR_DTF_OFFSET 0
1058 #define OR1K_SPR_DMMU_DMMUCR_DTF_MASK 0x00000001
1059 #define OR1K_SPR_DMMU_DMMUCR_DTF_GET(X) (((X) >> 0) & 0x1)
1060 #define OR1K_SPR_DMMU_DMMUCR_DTF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1063 #define OR1K_SPR_DMMU_DMMUCR_PTBP_LSB 10
1064 #define OR1K_SPR_DMMU_DMMUCR_PTBP_MSB 31
1065 #define OR1K_SPR_DMMU_DMMUCR_PTBP_BITS 22
1066 #define OR1K_SPR_DMMU_DMMUCR_PTBP_MASK OR1K_UNSIGNED(0xfffffc00)
1067 #define OR1K_SPR_DMMU_DMMUCR_PTBP_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1068 #define OR1K_SPR_DMMU_DMMUCR_PTBP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1072 #define OR1K_SPR_DMMU_DMMUPR_INDEX OR1K_UNSIGNED(0x001)
1073 #define OR1K_SPR_DMMU_DMMUPR_ADDR OR1K_UNSIGNED(0x0801)
1076 #define OR1K_SPR_DMMU_DMMUPR_SRE1_OFFSET 0
1077 #define OR1K_SPR_DMMU_DMMUPR_SRE1_MASK 0x00000001
1078 #define OR1K_SPR_DMMU_DMMUPR_SRE1_GET(X) (((X) >> 0) & 0x1)
1079 #define OR1K_SPR_DMMU_DMMUPR_SRE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1082 #define OR1K_SPR_DMMU_DMMUPR_SWE1_OFFSET 1
1083 #define OR1K_SPR_DMMU_DMMUPR_SWE1_MASK 0x00000002
1084 #define OR1K_SPR_DMMU_DMMUPR_SWE1_GET(X) (((X) >> 1) & 0x1)
1085 #define OR1K_SPR_DMMU_DMMUPR_SWE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1088 #define OR1K_SPR_DMMU_DMMUPR_URE1_OFFSET 2
1089 #define OR1K_SPR_DMMU_DMMUPR_URE1_MASK 0x00000004
1090 #define OR1K_SPR_DMMU_DMMUPR_URE1_GET(X) (((X) >> 2) & 0x1)
1091 #define OR1K_SPR_DMMU_DMMUPR_URE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1094 #define OR1K_SPR_DMMU_DMMUPR_UWE1_OFFSET 3
1095 #define OR1K_SPR_DMMU_DMMUPR_UWE1_MASK 0x00000008
1096 #define OR1K_SPR_DMMU_DMMUPR_UWE1_GET(X) (((X) >> 3) & 0x1)
1097 #define OR1K_SPR_DMMU_DMMUPR_UWE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1100 #define OR1K_SPR_DMMU_DMMUPR_SRE2_OFFSET 4
1101 #define OR1K_SPR_DMMU_DMMUPR_SRE2_MASK 0x00000010
1102 #define OR1K_SPR_DMMU_DMMUPR_SRE2_GET(X) (((X) >> 4) & 0x1)
1103 #define OR1K_SPR_DMMU_DMMUPR_SRE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1106 #define OR1K_SPR_DMMU_DMMUPR_SWE2_OFFSET 5
1107 #define OR1K_SPR_DMMU_DMMUPR_SWE2_MASK 0x00000020
1108 #define OR1K_SPR_DMMU_DMMUPR_SWE2_GET(X) (((X) >> 5) & 0x1)
1109 #define OR1K_SPR_DMMU_DMMUPR_SWE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1112 #define OR1K_SPR_DMMU_DMMUPR_URE2_OFFSET 6
1113 #define OR1K_SPR_DMMU_DMMUPR_URE2_MASK 0x00000040
1114 #define OR1K_SPR_DMMU_DMMUPR_URE2_GET(X) (((X) >> 6) & 0x1)
1115 #define OR1K_SPR_DMMU_DMMUPR_URE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1118 #define OR1K_SPR_DMMU_DMMUPR_UWE2_OFFSET 7
1119 #define OR1K_SPR_DMMU_DMMUPR_UWE2_MASK 0x00000080
1120 #define OR1K_SPR_DMMU_DMMUPR_UWE2_GET(X) (((X) >> 7) & 0x1)
1121 #define OR1K_SPR_DMMU_DMMUPR_UWE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1124 #define OR1K_SPR_DMMU_DMMUPR_SRE3_OFFSET 8
1125 #define OR1K_SPR_DMMU_DMMUPR_SRE3_MASK 0x00000100
1126 #define OR1K_SPR_DMMU_DMMUPR_SRE3_GET(X) (((X) >> 8) & 0x1)
1127 #define OR1K_SPR_DMMU_DMMUPR_SRE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
1130 #define OR1K_SPR_DMMU_DMMUPR_SWE3_OFFSET 9
1131 #define OR1K_SPR_DMMU_DMMUPR_SWE3_MASK 0x00000200
1132 #define OR1K_SPR_DMMU_DMMUPR_SWE3_GET(X) (((X) >> 9) & 0x1)
1133 #define OR1K_SPR_DMMU_DMMUPR_SWE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
1136 #define OR1K_SPR_DMMU_DMMUPR_URE3_OFFSET 10
1137 #define OR1K_SPR_DMMU_DMMUPR_URE3_MASK 0x00000400
1138 #define OR1K_SPR_DMMU_DMMUPR_URE3_GET(X) (((X) >> 10) & 0x1)
1139 #define OR1K_SPR_DMMU_DMMUPR_URE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
1142 #define OR1K_SPR_DMMU_DMMUPR_UWE3_OFFSET 11
1143 #define OR1K_SPR_DMMU_DMMUPR_UWE3_MASK 0x00000800
1144 #define OR1K_SPR_DMMU_DMMUPR_UWE3_GET(X) (((X) >> 11) & 0x1)
1145 #define OR1K_SPR_DMMU_DMMUPR_UWE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
1148 #define OR1K_SPR_DMMU_DMMUPR_SRE4_OFFSET 12
1149 #define OR1K_SPR_DMMU_DMMUPR_SRE4_MASK 0x00001000
1150 #define OR1K_SPR_DMMU_DMMUPR_SRE4_GET(X) (((X) >> 12) & 0x1)
1151 #define OR1K_SPR_DMMU_DMMUPR_SRE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
1154 #define OR1K_SPR_DMMU_DMMUPR_SWE4_OFFSET 13
1155 #define OR1K_SPR_DMMU_DMMUPR_SWE4_MASK 0x00002000
1156 #define OR1K_SPR_DMMU_DMMUPR_SWE4_GET(X) (((X) >> 13) & 0x1)
1157 #define OR1K_SPR_DMMU_DMMUPR_SWE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
1160 #define OR1K_SPR_DMMU_DMMUPR_URE4_OFFSET 14
1161 #define OR1K_SPR_DMMU_DMMUPR_URE4_MASK 0x00004000
1162 #define OR1K_SPR_DMMU_DMMUPR_URE4_GET(X) (((X) >> 14) & 0x1)
1163 #define OR1K_SPR_DMMU_DMMUPR_URE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
1166 #define OR1K_SPR_DMMU_DMMUPR_UWE4_OFFSET 15
1167 #define OR1K_SPR_DMMU_DMMUPR_UWE4_MASK 0x00008000
1168 #define OR1K_SPR_DMMU_DMMUPR_UWE4_GET(X) (((X) >> 15) & 0x1)
1169 #define OR1K_SPR_DMMU_DMMUPR_UWE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
1172 #define OR1K_SPR_DMMU_DMMUPR_SRE5_OFFSET 16
1173 #define OR1K_SPR_DMMU_DMMUPR_SRE5_MASK 0x00010000
1174 #define OR1K_SPR_DMMU_DMMUPR_SRE5_GET(X) (((X) >> 16) & 0x1)
1175 #define OR1K_SPR_DMMU_DMMUPR_SRE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
1178 #define OR1K_SPR_DMMU_DMMUPR_SWE5_OFFSET 17
1179 #define OR1K_SPR_DMMU_DMMUPR_SWE5_MASK 0x00020000
1180 #define OR1K_SPR_DMMU_DMMUPR_SWE5_GET(X) (((X) >> 17) & 0x1)
1181 #define OR1K_SPR_DMMU_DMMUPR_SWE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffdffff)) | ((!!(Y)) << 17))
1184 #define OR1K_SPR_DMMU_DMMUPR_URE5_OFFSET 18
1185 #define OR1K_SPR_DMMU_DMMUPR_URE5_MASK 0x00040000
1186 #define OR1K_SPR_DMMU_DMMUPR_URE5_GET(X) (((X) >> 18) & 0x1)
1187 #define OR1K_SPR_DMMU_DMMUPR_URE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffbffff)) | ((!!(Y)) << 18))
1190 #define OR1K_SPR_DMMU_DMMUPR_UWE5_OFFSET 19
1191 #define OR1K_SPR_DMMU_DMMUPR_UWE5_MASK 0x00080000
1192 #define OR1K_SPR_DMMU_DMMUPR_UWE5_GET(X) (((X) >> 19) & 0x1)
1193 #define OR1K_SPR_DMMU_DMMUPR_UWE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfff7ffff)) | ((!!(Y)) << 19))
1196 #define OR1K_SPR_DMMU_DMMUPR_SRE6_OFFSET 20
1197 #define OR1K_SPR_DMMU_DMMUPR_SRE6_MASK 0x00100000
1198 #define OR1K_SPR_DMMU_DMMUPR_SRE6_GET(X) (((X) >> 20) & 0x1)
1199 #define OR1K_SPR_DMMU_DMMUPR_SRE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffefffff)) | ((!!(Y)) << 20))
1202 #define OR1K_SPR_DMMU_DMMUPR_SWE6_OFFSET 21
1203 #define OR1K_SPR_DMMU_DMMUPR_SWE6_MASK 0x00200000
1204 #define OR1K_SPR_DMMU_DMMUPR_SWE6_GET(X) (((X) >> 21) & 0x1)
1205 #define OR1K_SPR_DMMU_DMMUPR_SWE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffdfffff)) | ((!!(Y)) << 21))
1208 #define OR1K_SPR_DMMU_DMMUPR_URE6_OFFSET 22
1209 #define OR1K_SPR_DMMU_DMMUPR_URE6_MASK 0x00400000
1210 #define OR1K_SPR_DMMU_DMMUPR_URE6_GET(X) (((X) >> 22) & 0x1)
1211 #define OR1K_SPR_DMMU_DMMUPR_URE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffbfffff)) | ((!!(Y)) << 22))
1214 #define OR1K_SPR_DMMU_DMMUPR_UWE6_OFFSET 23
1215 #define OR1K_SPR_DMMU_DMMUPR_UWE6_MASK 0x00800000
1216 #define OR1K_SPR_DMMU_DMMUPR_UWE6_GET(X) (((X) >> 23) & 0x1)
1217 #define OR1K_SPR_DMMU_DMMUPR_UWE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff7fffff)) | ((!!(Y)) << 23))
1220 #define OR1K_SPR_DMMU_DMMUPR_SRE7_OFFSET 24
1221 #define OR1K_SPR_DMMU_DMMUPR_SRE7_MASK 0x01000000
1222 #define OR1K_SPR_DMMU_DMMUPR_SRE7_GET(X) (((X) >> 24) & 0x1)
1223 #define OR1K_SPR_DMMU_DMMUPR_SRE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfeffffff)) | ((!!(Y)) << 24))
1226 #define OR1K_SPR_DMMU_DMMUPR_SWE7_OFFSET 25
1227 #define OR1K_SPR_DMMU_DMMUPR_SWE7_MASK 0x02000000
1228 #define OR1K_SPR_DMMU_DMMUPR_SWE7_GET(X) (((X) >> 25) & 0x1)
1229 #define OR1K_SPR_DMMU_DMMUPR_SWE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfdffffff)) | ((!!(Y)) << 25))
1232 #define OR1K_SPR_DMMU_DMMUPR_URE7_OFFSET 26
1233 #define OR1K_SPR_DMMU_DMMUPR_URE7_MASK 0x04000000
1234 #define OR1K_SPR_DMMU_DMMUPR_URE7_GET(X) (((X) >> 26) & 0x1)
1235 #define OR1K_SPR_DMMU_DMMUPR_URE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfbffffff)) | ((!!(Y)) << 26))
1238 #define OR1K_SPR_DMMU_DMMUPR_UWE7_OFFSET 27
1239 #define OR1K_SPR_DMMU_DMMUPR_UWE7_MASK 0x08000000
1240 #define OR1K_SPR_DMMU_DMMUPR_UWE7_GET(X) (((X) >> 27) & 0x1)
1241 #define OR1K_SPR_DMMU_DMMUPR_UWE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xf7ffffff)) | ((!!(Y)) << 27))
1245 #define OR1K_SPR_DMMU_DTLBEIR_INDEX OR1K_UNSIGNED(0x002)
1246 #define OR1K_SPR_DMMU_DTLBEIR_ADDR OR1K_UNSIGNED(0x0802)
1250 #define OR1K_SPR_DMMU_DATBMR_BASE OR1K_UNSIGNED(0x004)
1251 #define OR1K_SPR_DMMU_DATBMR_COUNT OR1K_UNSIGNED(0x004)
1252 #define OR1K_SPR_DMMU_DATBMR_STEP OR1K_UNSIGNED(0x001)
1253 #define OR1K_SPR_DMMU_DATBMR_INDEX(N) (OR1K_SPR_DMMU_DATBMR_BASE + ((N) * OR1K_SPR_DMMU_DATBMR_STEP))
1254 #define OR1K_SPR_DMMU_DATBMR_ADDR(N) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DATBMR_INDEX(N))
1257 #define OR1K_SPR_DMMU_DATBMR_V_OFFSET 0
1258 #define OR1K_SPR_DMMU_DATBMR_V_MASK 0x00000001
1259 #define OR1K_SPR_DMMU_DATBMR_V_GET(X) (((X) >> 0) & 0x1)
1260 #define OR1K_SPR_DMMU_DATBMR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1263 #define OR1K_SPR_DMMU_DATBMR_CID_LSB 1
1264 #define OR1K_SPR_DMMU_DATBMR_CID_MSB 4
1265 #define OR1K_SPR_DMMU_DATBMR_CID_BITS 4
1266 #define OR1K_SPR_DMMU_DATBMR_CID_MASK OR1K_UNSIGNED(0x0000001e)
1267 #define OR1K_SPR_DMMU_DATBMR_CID_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x0000000f))
1268 #define OR1K_SPR_DMMU_DATBMR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe1)) | ((Y) << 1))
1271 #define OR1K_SPR_DMMU_DATBMR_PS_OFFSET 5
1272 #define OR1K_SPR_DMMU_DATBMR_PS_MASK 0x00000020
1273 #define OR1K_SPR_DMMU_DATBMR_PS_GET(X) (((X) >> 5) & 0x1)
1274 #define OR1K_SPR_DMMU_DATBMR_PS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1277 #define OR1K_SPR_DMMU_DATBMR_VPN_LSB 10
1278 #define OR1K_SPR_DMMU_DATBMR_VPN_MSB 31
1279 #define OR1K_SPR_DMMU_DATBMR_VPN_BITS 22
1280 #define OR1K_SPR_DMMU_DATBMR_VPN_MASK OR1K_UNSIGNED(0xfffffc00)
1281 #define OR1K_SPR_DMMU_DATBMR_VPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1282 #define OR1K_SPR_DMMU_DATBMR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1286 #define OR1K_SPR_DMMU_DATBTR_BASE OR1K_UNSIGNED(0x008)
1287 #define OR1K_SPR_DMMU_DATBTR_COUNT OR1K_UNSIGNED(0x004)
1288 #define OR1K_SPR_DMMU_DATBTR_STEP OR1K_UNSIGNED(0x001)
1289 #define OR1K_SPR_DMMU_DATBTR_INDEX(N) (OR1K_SPR_DMMU_DATBTR_BASE + ((N) * OR1K_SPR_DMMU_DATBTR_STEP))
1290 #define OR1K_SPR_DMMU_DATBTR_ADDR(N) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DATBTR_INDEX(N))
1293 #define OR1K_SPR_DMMU_DATBTR_CC_OFFSET 0
1294 #define OR1K_SPR_DMMU_DATBTR_CC_MASK 0x00000001
1295 #define OR1K_SPR_DMMU_DATBTR_CC_GET(X) (((X) >> 0) & 0x1)
1296 #define OR1K_SPR_DMMU_DATBTR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1299 #define OR1K_SPR_DMMU_DATBTR_CI_OFFSET 1
1300 #define OR1K_SPR_DMMU_DATBTR_CI_MASK 0x00000002
1301 #define OR1K_SPR_DMMU_DATBTR_CI_GET(X) (((X) >> 1) & 0x1)
1302 #define OR1K_SPR_DMMU_DATBTR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1305 #define OR1K_SPR_DMMU_DATBTR_WBC_OFFSET 2
1306 #define OR1K_SPR_DMMU_DATBTR_WBC_MASK 0x00000004
1307 #define OR1K_SPR_DMMU_DATBTR_WBC_GET(X) (((X) >> 2) & 0x1)
1308 #define OR1K_SPR_DMMU_DATBTR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1311 #define OR1K_SPR_DMMU_DATBTR_WOM_OFFSET 3
1312 #define OR1K_SPR_DMMU_DATBTR_WOM_MASK 0x00000008
1313 #define OR1K_SPR_DMMU_DATBTR_WOM_GET(X) (((X) >> 3) & 0x1)
1314 #define OR1K_SPR_DMMU_DATBTR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1317 #define OR1K_SPR_DMMU_DATBTR_A_OFFSET 4
1318 #define OR1K_SPR_DMMU_DATBTR_A_MASK 0x00000010
1319 #define OR1K_SPR_DMMU_DATBTR_A_GET(X) (((X) >> 4) & 0x1)
1320 #define OR1K_SPR_DMMU_DATBTR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1323 #define OR1K_SPR_DMMU_DATBTR_D_OFFSET 5
1324 #define OR1K_SPR_DMMU_DATBTR_D_MASK 0x00000020
1325 #define OR1K_SPR_DMMU_DATBTR_D_GET(X) (((X) >> 5) & 0x1)
1326 #define OR1K_SPR_DMMU_DATBTR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1329 #define OR1K_SPR_DMMU_DATBTR_SRE_OFFSET 6
1330 #define OR1K_SPR_DMMU_DATBTR_SRE_MASK 0x00000040
1331 #define OR1K_SPR_DMMU_DATBTR_SRE_GET(X) (((X) >> 6) & 0x1)
1332 #define OR1K_SPR_DMMU_DATBTR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1335 #define OR1K_SPR_DMMU_DATBTR_SWE_OFFSET 7
1336 #define OR1K_SPR_DMMU_DATBTR_SWE_MASK 0x00000080
1337 #define OR1K_SPR_DMMU_DATBTR_SWE_GET(X) (((X) >> 7) & 0x1)
1338 #define OR1K_SPR_DMMU_DATBTR_SWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1341 #define OR1K_SPR_DMMU_DATBTR_URE_OFFSET 8
1342 #define OR1K_SPR_DMMU_DATBTR_URE_MASK 0x00000100
1343 #define OR1K_SPR_DMMU_DATBTR_URE_GET(X) (((X) >> 8) & 0x1)
1344 #define OR1K_SPR_DMMU_DATBTR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
1347 #define OR1K_SPR_DMMU_DATBTR_UWE_OFFSET 9
1348 #define OR1K_SPR_DMMU_DATBTR_UWE_MASK 0x00000200
1349 #define OR1K_SPR_DMMU_DATBTR_UWE_GET(X) (((X) >> 9) & 0x1)
1350 #define OR1K_SPR_DMMU_DATBTR_UWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
1353 #define OR1K_SPR_DMMU_DATBTR_PPN_LSB 10
1354 #define OR1K_SPR_DMMU_DATBTR_PPN_MSB 31
1355 #define OR1K_SPR_DMMU_DATBTR_PPN_BITS 22
1356 #define OR1K_SPR_DMMU_DATBTR_PPN_MASK OR1K_UNSIGNED(0xfffffc00)
1357 #define OR1K_SPR_DMMU_DATBTR_PPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1358 #define OR1K_SPR_DMMU_DATBTR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1362 #define OR1K_SPR_DMMU_DTLBW_BASE OR1K_UNSIGNED(0x200)
1363 #define OR1K_SPR_DMMU_DTLBW_COUNT OR1K_UNSIGNED(0x004)
1364 #define OR1K_SPR_DMMU_DTLBW_STEP OR1K_UNSIGNED(0x100)
1365 #define OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) (OR1K_SPR_DMMU_DTLBW_BASE + ((N0)*OR1K_SPR_DMMU_DTLBW_STEP))
1368 #define OR1K_SPR_DMMU_DTLBW_MR_BASE OR1K_UNSIGNED(0x000)
1369 #define OR1K_SPR_DMMU_DTLBW_MR_COUNT OR1K_UNSIGNED(0x080)
1370 #define OR1K_SPR_DMMU_DTLBW_MR_STEP OR1K_UNSIGNED(0x001)
1372 #define OR1K_SPR_DMMU_DTLBW_MR_INDEX(N0, N1) (OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) + OR1K_SPR_DMMU_DTLBW_MR_BASE + ((N1) * OR1K_SPR_DMMU_DTLBW_MR_STEP))
1373 #define OR1K_SPR_DMMU_DTLBW_MR_ADDR(N0, N1) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DTLBW_MR_INDEX(N0, N1))
1376 #define OR1K_SPR_DMMU_DTLBW_MR_V_OFFSET 0
1377 #define OR1K_SPR_DMMU_DTLBW_MR_V_MASK 0x00000001
1378 #define OR1K_SPR_DMMU_DTLBW_MR_V_GET(X) (((X) >> 0) & 0x1)
1379 #define OR1K_SPR_DMMU_DTLBW_MR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1382 #define OR1K_SPR_DMMU_DTLBW_MR_PL1_OFFSET 1
1383 #define OR1K_SPR_DMMU_DTLBW_MR_PL1_MASK 0x00000002
1384 #define OR1K_SPR_DMMU_DTLBW_MR_PL1_GET(X) (((X) >> 1) & 0x1)
1385 #define OR1K_SPR_DMMU_DTLBW_MR_PL1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1388 #define OR1K_SPR_DMMU_DTLBW_MR_CID_LSB 2
1389 #define OR1K_SPR_DMMU_DTLBW_MR_CID_MSB 5
1390 #define OR1K_SPR_DMMU_DTLBW_MR_CID_BITS 4
1391 #define OR1K_SPR_DMMU_DTLBW_MR_CID_MASK OR1K_UNSIGNED(0x0000003c)
1392 #define OR1K_SPR_DMMU_DTLBW_MR_CID_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x0000000f))
1393 #define OR1K_SPR_DMMU_DTLBW_MR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc3)) | ((Y) << 2))
1396 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_LSB 6
1397 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_MSB 7
1398 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_BITS 2
1399 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_MASK OR1K_UNSIGNED(0x000000c0)
1400 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
1401 #define OR1K_SPR_DMMU_DTLBW_MR_LRU_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
1404 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_LSB 13
1405 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_MSB 31
1406 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_BITS 19
1407 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_MASK OR1K_UNSIGNED(0xffffe000)
1408 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
1409 #define OR1K_SPR_DMMU_DTLBW_MR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
1412 #define OR1K_SPR_DMMU_DTLBW_TR_BASE OR1K_UNSIGNED(0x080)
1413 #define OR1K_SPR_DMMU_DTLBW_TR_COUNT OR1K_UNSIGNED(0x080)
1414 #define OR1K_SPR_DMMU_DTLBW_TR_STEP OR1K_UNSIGNED(0x001)
1416 #define OR1K_SPR_DMMU_DTLBW_TR_INDEX(N0, N1) (OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) + OR1K_SPR_DMMU_DTLBW_TR_BASE + ((N1) * OR1K_SPR_DMMU_DTLBW_TR_STEP))
1417 #define OR1K_SPR_DMMU_DTLBW_TR_ADDR(N0, N1) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DTLBW_TR_INDEX(N0, N1))
1420 #define OR1K_SPR_DMMU_DTLBW_TR_CC_OFFSET 0
1421 #define OR1K_SPR_DMMU_DTLBW_TR_CC_MASK 0x00000001
1422 #define OR1K_SPR_DMMU_DTLBW_TR_CC_GET(X) (((X) >> 0) & 0x1)
1423 #define OR1K_SPR_DMMU_DTLBW_TR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1426 #define OR1K_SPR_DMMU_DTLBW_TR_CI_OFFSET 1
1427 #define OR1K_SPR_DMMU_DTLBW_TR_CI_MASK 0x00000002
1428 #define OR1K_SPR_DMMU_DTLBW_TR_CI_GET(X) (((X) >> 1) & 0x1)
1429 #define OR1K_SPR_DMMU_DTLBW_TR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1432 #define OR1K_SPR_DMMU_DTLBW_TR_WBC_OFFSET 2
1433 #define OR1K_SPR_DMMU_DTLBW_TR_WBC_MASK 0x00000004
1434 #define OR1K_SPR_DMMU_DTLBW_TR_WBC_GET(X) (((X) >> 2) & 0x1)
1435 #define OR1K_SPR_DMMU_DTLBW_TR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1438 #define OR1K_SPR_DMMU_DTLBW_TR_WOM_OFFSET 3
1439 #define OR1K_SPR_DMMU_DTLBW_TR_WOM_MASK 0x00000008
1440 #define OR1K_SPR_DMMU_DTLBW_TR_WOM_GET(X) (((X) >> 3) & 0x1)
1441 #define OR1K_SPR_DMMU_DTLBW_TR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1444 #define OR1K_SPR_DMMU_DTLBW_TR_A_OFFSET 4
1445 #define OR1K_SPR_DMMU_DTLBW_TR_A_MASK 0x00000010
1446 #define OR1K_SPR_DMMU_DTLBW_TR_A_GET(X) (((X) >> 4) & 0x1)
1447 #define OR1K_SPR_DMMU_DTLBW_TR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1450 #define OR1K_SPR_DMMU_DTLBW_TR_D_OFFSET 5
1451 #define OR1K_SPR_DMMU_DTLBW_TR_D_MASK 0x00000020
1452 #define OR1K_SPR_DMMU_DTLBW_TR_D_GET(X) (((X) >> 5) & 0x1)
1453 #define OR1K_SPR_DMMU_DTLBW_TR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1456 #define OR1K_SPR_DMMU_DTLBW_TR_URE_OFFSET 6
1457 #define OR1K_SPR_DMMU_DTLBW_TR_URE_MASK 0x00000040
1458 #define OR1K_SPR_DMMU_DTLBW_TR_URE_GET(X) (((X) >> 6) & 0x1)
1459 #define OR1K_SPR_DMMU_DTLBW_TR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1462 #define OR1K_SPR_DMMU_DTLBW_TR_UWE_OFFSET 7
1463 #define OR1K_SPR_DMMU_DTLBW_TR_UWE_MASK 0x00000080
1464 #define OR1K_SPR_DMMU_DTLBW_TR_UWE_GET(X) (((X) >> 7) & 0x1)
1465 #define OR1K_SPR_DMMU_DTLBW_TR_UWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1468 #define OR1K_SPR_DMMU_DTLBW_TR_SRE_OFFSET 8
1469 #define OR1K_SPR_DMMU_DTLBW_TR_SRE_MASK 0x00000100
1470 #define OR1K_SPR_DMMU_DTLBW_TR_SRE_GET(X) (((X) >> 8) & 0x1)
1471 #define OR1K_SPR_DMMU_DTLBW_TR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
1474 #define OR1K_SPR_DMMU_DTLBW_TR_SWE_OFFSET 9
1475 #define OR1K_SPR_DMMU_DTLBW_TR_SWE_MASK 0x00000200
1476 #define OR1K_SPR_DMMU_DTLBW_TR_SWE_GET(X) (((X) >> 9) & 0x1)
1477 #define OR1K_SPR_DMMU_DTLBW_TR_SWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
1480 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_LSB 13
1481 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_MSB 31
1482 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_BITS 19
1483 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_MASK OR1K_UNSIGNED(0xffffe000)
1484 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
1485 #define OR1K_SPR_DMMU_DTLBW_TR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
1491 #define OR1K_SPR_IMMU_GROUP 0x02
1494 #define OR1K_SPR_IMMU_IMMUCR_INDEX OR1K_UNSIGNED(0x000)
1495 #define OR1K_SPR_IMMU_IMMUCR_ADDR OR1K_UNSIGNED(0x1000)
1498 #define OR1K_SPR_IMMU_IMMUCR_ITF_OFFSET 0
1499 #define OR1K_SPR_IMMU_IMMUCR_ITF_MASK 0x00000001
1500 #define OR1K_SPR_IMMU_IMMUCR_ITF_GET(X) (((X) >> 0) & 0x1)
1501 #define OR1K_SPR_IMMU_IMMUCR_ITF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1504 #define OR1K_SPR_IMMU_IMMUCR_PTBP_LSB 10
1505 #define OR1K_SPR_IMMU_IMMUCR_PTBP_MSB 31
1506 #define OR1K_SPR_IMMU_IMMUCR_PTBP_BITS 22
1507 #define OR1K_SPR_IMMU_IMMUCR_PTBP_MASK OR1K_UNSIGNED(0xfffffc00)
1508 #define OR1K_SPR_IMMU_IMMUCR_PTBP_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1509 #define OR1K_SPR_IMMU_IMMUCR_PTBP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1513 #define OR1K_SPR_IMMU_IMMUPR_INDEX OR1K_UNSIGNED(0x001)
1514 #define OR1K_SPR_IMMU_IMMUPR_ADDR OR1K_UNSIGNED(0x1001)
1517 #define OR1K_SPR_IMMU_IMMUPR_SXE1_OFFSET 0
1518 #define OR1K_SPR_IMMU_IMMUPR_SXE1_MASK 0x00000001
1519 #define OR1K_SPR_IMMU_IMMUPR_SXE1_GET(X) (((X) >> 0) & 0x1)
1520 #define OR1K_SPR_IMMU_IMMUPR_SXE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1523 #define OR1K_SPR_IMMU_IMMUPR_UXE1_OFFSET 1
1524 #define OR1K_SPR_IMMU_IMMUPR_UXE1_MASK 0x00000002
1525 #define OR1K_SPR_IMMU_IMMUPR_UXE1_GET(X) (((X) >> 1) & 0x1)
1526 #define OR1K_SPR_IMMU_IMMUPR_UXE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1529 #define OR1K_SPR_IMMU_IMMUPR_SXE2_OFFSET 2
1530 #define OR1K_SPR_IMMU_IMMUPR_SXE2_MASK 0x00000004
1531 #define OR1K_SPR_IMMU_IMMUPR_SXE2_GET(X) (((X) >> 2) & 0x1)
1532 #define OR1K_SPR_IMMU_IMMUPR_SXE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1535 #define OR1K_SPR_IMMU_IMMUPR_UXE2_OFFSET 3
1536 #define OR1K_SPR_IMMU_IMMUPR_UXE2_MASK 0x00000008
1537 #define OR1K_SPR_IMMU_IMMUPR_UXE2_GET(X) (((X) >> 3) & 0x1)
1538 #define OR1K_SPR_IMMU_IMMUPR_UXE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1541 #define OR1K_SPR_IMMU_IMMUPR_SXE3_OFFSET 4
1542 #define OR1K_SPR_IMMU_IMMUPR_SXE3_MASK 0x00000010
1543 #define OR1K_SPR_IMMU_IMMUPR_SXE3_GET(X) (((X) >> 4) & 0x1)
1544 #define OR1K_SPR_IMMU_IMMUPR_SXE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1547 #define OR1K_SPR_IMMU_IMMUPR_UXE3_OFFSET 5
1548 #define OR1K_SPR_IMMU_IMMUPR_UXE3_MASK 0x00000020
1549 #define OR1K_SPR_IMMU_IMMUPR_UXE3_GET(X) (((X) >> 5) & 0x1)
1550 #define OR1K_SPR_IMMU_IMMUPR_UXE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1553 #define OR1K_SPR_IMMU_IMMUPR_SXE4_OFFSET 6
1554 #define OR1K_SPR_IMMU_IMMUPR_SXE4_MASK 0x00000040
1555 #define OR1K_SPR_IMMU_IMMUPR_SXE4_GET(X) (((X) >> 6) & 0x1)
1556 #define OR1K_SPR_IMMU_IMMUPR_SXE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1559 #define OR1K_SPR_IMMU_IMMUPR_UXE4_OFFSET 7
1560 #define OR1K_SPR_IMMU_IMMUPR_UXE4_MASK 0x00000080
1561 #define OR1K_SPR_IMMU_IMMUPR_UXE4_GET(X) (((X) >> 7) & 0x1)
1562 #define OR1K_SPR_IMMU_IMMUPR_UXE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1565 #define OR1K_SPR_IMMU_IMMUPR_SXE5_OFFSET 8
1566 #define OR1K_SPR_IMMU_IMMUPR_SXE5_MASK 0x00000100
1567 #define OR1K_SPR_IMMU_IMMUPR_SXE5_GET(X) (((X) >> 8) & 0x1)
1568 #define OR1K_SPR_IMMU_IMMUPR_SXE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
1571 #define OR1K_SPR_IMMU_IMMUPR_UXE5_OFFSET 9
1572 #define OR1K_SPR_IMMU_IMMUPR_UXE5_MASK 0x00000200
1573 #define OR1K_SPR_IMMU_IMMUPR_UXE5_GET(X) (((X) >> 9) & 0x1)
1574 #define OR1K_SPR_IMMU_IMMUPR_UXE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
1577 #define OR1K_SPR_IMMU_IMMUPR_SXE6_OFFSET 10
1578 #define OR1K_SPR_IMMU_IMMUPR_SXE6_MASK 0x00000400
1579 #define OR1K_SPR_IMMU_IMMUPR_SXE6_GET(X) (((X) >> 10) & 0x1)
1580 #define OR1K_SPR_IMMU_IMMUPR_SXE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
1583 #define OR1K_SPR_IMMU_IMMUPR_UXE6_OFFSET 11
1584 #define OR1K_SPR_IMMU_IMMUPR_UXE6_MASK 0x00000800
1585 #define OR1K_SPR_IMMU_IMMUPR_UXE6_GET(X) (((X) >> 11) & 0x1)
1586 #define OR1K_SPR_IMMU_IMMUPR_UXE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
1589 #define OR1K_SPR_IMMU_IMMUPR_SXE7_OFFSET 12
1590 #define OR1K_SPR_IMMU_IMMUPR_SXE7_MASK 0x00001000
1591 #define OR1K_SPR_IMMU_IMMUPR_SXE7_GET(X) (((X) >> 12) & 0x1)
1592 #define OR1K_SPR_IMMU_IMMUPR_SXE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
1595 #define OR1K_SPR_IMMU_IMMUPR_UXE7_OFFSET 13
1596 #define OR1K_SPR_IMMU_IMMUPR_UXE7_MASK 0x00002000
1597 #define OR1K_SPR_IMMU_IMMUPR_UXE7_GET(X) (((X) >> 13) & 0x1)
1598 #define OR1K_SPR_IMMU_IMMUPR_UXE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
1602 #define OR1K_SPR_IMMU_ITLBEIR_INDEX OR1K_UNSIGNED(0x002)
1603 #define OR1K_SPR_IMMU_ITLBEIR_ADDR OR1K_UNSIGNED(0x1002)
1607 #define OR1K_SPR_IMMU_IATBMR_BASE OR1K_UNSIGNED(0x004)
1608 #define OR1K_SPR_IMMU_IATBMR_COUNT OR1K_UNSIGNED(0x004)
1609 #define OR1K_SPR_IMMU_IATBMR_STEP OR1K_UNSIGNED(0x001)
1610 #define OR1K_SPR_IMMU_IATBMR_INDEX(N) (OR1K_SPR_IMMU_IATBMR_BASE + ((N) * OR1K_SPR_IMMU_IATBMR_STEP))
1611 #define OR1K_SPR_IMMU_IATBMR_ADDR(N) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_IATBMR_INDEX(N))
1614 #define OR1K_SPR_IMMU_IATBMR_V_OFFSET 0
1615 #define OR1K_SPR_IMMU_IATBMR_V_MASK 0x00000001
1616 #define OR1K_SPR_IMMU_IATBMR_V_GET(X) (((X) >> 0) & 0x1)
1617 #define OR1K_SPR_IMMU_IATBMR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1620 #define OR1K_SPR_IMMU_IATBMR_CID_LSB 1
1621 #define OR1K_SPR_IMMU_IATBMR_CID_MSB 4
1622 #define OR1K_SPR_IMMU_IATBMR_CID_BITS 4
1623 #define OR1K_SPR_IMMU_IATBMR_CID_MASK OR1K_UNSIGNED(0x0000001e)
1624 #define OR1K_SPR_IMMU_IATBMR_CID_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x0000000f))
1625 #define OR1K_SPR_IMMU_IATBMR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe1)) | ((Y) << 1))
1628 #define OR1K_SPR_IMMU_IATBMR_PS_OFFSET 5
1629 #define OR1K_SPR_IMMU_IATBMR_PS_MASK 0x00000020
1630 #define OR1K_SPR_IMMU_IATBMR_PS_GET(X) (((X) >> 5) & 0x1)
1631 #define OR1K_SPR_IMMU_IATBMR_PS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1634 #define OR1K_SPR_IMMU_IATBMR_VPN_LSB 10
1635 #define OR1K_SPR_IMMU_IATBMR_VPN_MSB 31
1636 #define OR1K_SPR_IMMU_IATBMR_VPN_BITS 22
1637 #define OR1K_SPR_IMMU_IATBMR_VPN_MASK OR1K_UNSIGNED(0xfffffc00)
1638 #define OR1K_SPR_IMMU_IATBMR_VPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1639 #define OR1K_SPR_IMMU_IATBMR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1643 #define OR1K_SPR_IMMU_IATBTR_BASE OR1K_UNSIGNED(0x008)
1644 #define OR1K_SPR_IMMU_IATBTR_COUNT OR1K_UNSIGNED(0x004)
1645 #define OR1K_SPR_IMMU_IATBTR_STEP OR1K_UNSIGNED(0x001)
1646 #define OR1K_SPR_IMMU_IATBTR_INDEX(N) (OR1K_SPR_IMMU_IATBTR_BASE + ((N) * OR1K_SPR_IMMU_IATBTR_STEP))
1647 #define OR1K_SPR_IMMU_IATBTR_ADDR(N) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_IATBTR_INDEX(N))
1650 #define OR1K_SPR_IMMU_IATBTR_CC_OFFSET 0
1651 #define OR1K_SPR_IMMU_IATBTR_CC_MASK 0x00000001
1652 #define OR1K_SPR_IMMU_IATBTR_CC_GET(X) (((X) >> 0) & 0x1)
1653 #define OR1K_SPR_IMMU_IATBTR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1656 #define OR1K_SPR_IMMU_IATBTR_CI_OFFSET 1
1657 #define OR1K_SPR_IMMU_IATBTR_CI_MASK 0x00000002
1658 #define OR1K_SPR_IMMU_IATBTR_CI_GET(X) (((X) >> 1) & 0x1)
1659 #define OR1K_SPR_IMMU_IATBTR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1662 #define OR1K_SPR_IMMU_IATBTR_WBC_OFFSET 2
1663 #define OR1K_SPR_IMMU_IATBTR_WBC_MASK 0x00000004
1664 #define OR1K_SPR_IMMU_IATBTR_WBC_GET(X) (((X) >> 2) & 0x1)
1665 #define OR1K_SPR_IMMU_IATBTR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1668 #define OR1K_SPR_IMMU_IATBTR_WOM_OFFSET 3
1669 #define OR1K_SPR_IMMU_IATBTR_WOM_MASK 0x00000008
1670 #define OR1K_SPR_IMMU_IATBTR_WOM_GET(X) (((X) >> 3) & 0x1)
1671 #define OR1K_SPR_IMMU_IATBTR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1674 #define OR1K_SPR_IMMU_IATBTR_A_OFFSET 4
1675 #define OR1K_SPR_IMMU_IATBTR_A_MASK 0x00000010
1676 #define OR1K_SPR_IMMU_IATBTR_A_GET(X) (((X) >> 4) & 0x1)
1677 #define OR1K_SPR_IMMU_IATBTR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1680 #define OR1K_SPR_IMMU_IATBTR_D_OFFSET 5
1681 #define OR1K_SPR_IMMU_IATBTR_D_MASK 0x00000020
1682 #define OR1K_SPR_IMMU_IATBTR_D_GET(X) (((X) >> 5) & 0x1)
1683 #define OR1K_SPR_IMMU_IATBTR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1686 #define OR1K_SPR_IMMU_IATBTR_SRE_OFFSET 6
1687 #define OR1K_SPR_IMMU_IATBTR_SRE_MASK 0x00000040
1688 #define OR1K_SPR_IMMU_IATBTR_SRE_GET(X) (((X) >> 6) & 0x1)
1689 #define OR1K_SPR_IMMU_IATBTR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1692 #define OR1K_SPR_IMMU_IATBTR_URE_OFFSET 7
1693 #define OR1K_SPR_IMMU_IATBTR_URE_MASK 0x00000080
1694 #define OR1K_SPR_IMMU_IATBTR_URE_GET(X) (((X) >> 7) & 0x1)
1695 #define OR1K_SPR_IMMU_IATBTR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1698 #define OR1K_SPR_IMMU_IATBTR_PPN_LSB 10
1699 #define OR1K_SPR_IMMU_IATBTR_PPN_MSB 31
1700 #define OR1K_SPR_IMMU_IATBTR_PPN_BITS 22
1701 #define OR1K_SPR_IMMU_IATBTR_PPN_MASK OR1K_UNSIGNED(0xfffffc00)
1702 #define OR1K_SPR_IMMU_IATBTR_PPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
1703 #define OR1K_SPR_IMMU_IATBTR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
1707 #define OR1K_SPR_IMMU_ITLBW_BASE OR1K_UNSIGNED(0x200)
1708 #define OR1K_SPR_IMMU_ITLBW_COUNT OR1K_UNSIGNED(0x004)
1709 #define OR1K_SPR_IMMU_ITLBW_STEP OR1K_UNSIGNED(0x100)
1710 #define OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) (OR1K_SPR_IMMU_ITLBW_BASE + ((N0)*OR1K_SPR_IMMU_ITLBW_STEP))
1713 #define OR1K_SPR_IMMU_ITLBW_MR_BASE OR1K_UNSIGNED(0x000)
1714 #define OR1K_SPR_IMMU_ITLBW_MR_COUNT OR1K_UNSIGNED(0x080)
1715 #define OR1K_SPR_IMMU_ITLBW_MR_STEP OR1K_UNSIGNED(0x001)
1717 #define OR1K_SPR_IMMU_ITLBW_MR_INDEX(N0, N1) (OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) + OR1K_SPR_IMMU_ITLBW_MR_BASE + ((N1) * OR1K_SPR_IMMU_ITLBW_MR_STEP))
1718 #define OR1K_SPR_IMMU_ITLBW_MR_ADDR(N0, N1) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_ITLBW_MR_INDEX(N0, N1))
1721 #define OR1K_SPR_IMMU_ITLBW_MR_V_OFFSET 0
1722 #define OR1K_SPR_IMMU_ITLBW_MR_V_MASK 0x00000001
1723 #define OR1K_SPR_IMMU_ITLBW_MR_V_GET(X) (((X) >> 0) & 0x1)
1724 #define OR1K_SPR_IMMU_ITLBW_MR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1727 #define OR1K_SPR_IMMU_ITLBW_MR_PL1_OFFSET 1
1728 #define OR1K_SPR_IMMU_ITLBW_MR_PL1_MASK 0x00000002
1729 #define OR1K_SPR_IMMU_ITLBW_MR_PL1_GET(X) (((X) >> 1) & 0x1)
1730 #define OR1K_SPR_IMMU_ITLBW_MR_PL1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1733 #define OR1K_SPR_IMMU_ITLBW_MR_CID_LSB 2
1734 #define OR1K_SPR_IMMU_ITLBW_MR_CID_MSB 5
1735 #define OR1K_SPR_IMMU_ITLBW_MR_CID_BITS 4
1736 #define OR1K_SPR_IMMU_ITLBW_MR_CID_MASK OR1K_UNSIGNED(0x0000003c)
1737 #define OR1K_SPR_IMMU_ITLBW_MR_CID_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x0000000f))
1738 #define OR1K_SPR_IMMU_ITLBW_MR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc3)) | ((Y) << 2))
1741 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_LSB 6
1742 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_MSB 7
1743 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_BITS 2
1744 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_MASK OR1K_UNSIGNED(0x000000c0)
1745 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
1746 #define OR1K_SPR_IMMU_ITLBW_MR_LRU_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
1749 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_LSB 13
1750 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_MSB 31
1751 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_BITS 19
1752 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_MASK OR1K_UNSIGNED(0xffffe000)
1753 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
1754 #define OR1K_SPR_IMMU_ITLBW_MR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
1757 #define OR1K_SPR_IMMU_ITLBW_TR_BASE OR1K_UNSIGNED(0x080)
1758 #define OR1K_SPR_IMMU_ITLBW_TR_COUNT OR1K_UNSIGNED(0x080)
1759 #define OR1K_SPR_IMMU_ITLBW_TR_STEP OR1K_UNSIGNED(0x001)
1761 #define OR1K_SPR_IMMU_ITLBW_TR_INDEX(N0, N1) (OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) + OR1K_SPR_IMMU_ITLBW_TR_BASE + ((N1) * OR1K_SPR_IMMU_ITLBW_TR_STEP))
1762 #define OR1K_SPR_IMMU_ITLBW_TR_ADDR(N0, N1) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_ITLBW_TR_INDEX(N0, N1))
1765 #define OR1K_SPR_IMMU_ITLBW_TR_CC_OFFSET 0
1766 #define OR1K_SPR_IMMU_ITLBW_TR_CC_MASK 0x00000001
1767 #define OR1K_SPR_IMMU_ITLBW_TR_CC_GET(X) (((X) >> 0) & 0x1)
1768 #define OR1K_SPR_IMMU_ITLBW_TR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1771 #define OR1K_SPR_IMMU_ITLBW_TR_CI_OFFSET 1
1772 #define OR1K_SPR_IMMU_ITLBW_TR_CI_MASK 0x00000002
1773 #define OR1K_SPR_IMMU_ITLBW_TR_CI_GET(X) (((X) >> 1) & 0x1)
1774 #define OR1K_SPR_IMMU_ITLBW_TR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
1777 #define OR1K_SPR_IMMU_ITLBW_TR_WBC_OFFSET 2
1778 #define OR1K_SPR_IMMU_ITLBW_TR_WBC_MASK 0x00000004
1779 #define OR1K_SPR_IMMU_ITLBW_TR_WBC_GET(X) (((X) >> 2) & 0x1)
1780 #define OR1K_SPR_IMMU_ITLBW_TR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
1783 #define OR1K_SPR_IMMU_ITLBW_TR_WOM_OFFSET 3
1784 #define OR1K_SPR_IMMU_ITLBW_TR_WOM_MASK 0x00000008
1785 #define OR1K_SPR_IMMU_ITLBW_TR_WOM_GET(X) (((X) >> 3) & 0x1)
1786 #define OR1K_SPR_IMMU_ITLBW_TR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
1789 #define OR1K_SPR_IMMU_ITLBW_TR_A_OFFSET 4
1790 #define OR1K_SPR_IMMU_ITLBW_TR_A_MASK 0x00000010
1791 #define OR1K_SPR_IMMU_ITLBW_TR_A_GET(X) (((X) >> 4) & 0x1)
1792 #define OR1K_SPR_IMMU_ITLBW_TR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1795 #define OR1K_SPR_IMMU_ITLBW_TR_D_OFFSET 5
1796 #define OR1K_SPR_IMMU_ITLBW_TR_D_MASK 0x00000020
1797 #define OR1K_SPR_IMMU_ITLBW_TR_D_GET(X) (((X) >> 5) & 0x1)
1798 #define OR1K_SPR_IMMU_ITLBW_TR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
1801 #define OR1K_SPR_IMMU_ITLBW_TR_UXE_OFFSET 6
1802 #define OR1K_SPR_IMMU_ITLBW_TR_UXE_MASK 0x00000040
1803 #define OR1K_SPR_IMMU_ITLBW_TR_UXE_GET(X) (((X) >> 6) & 0x1)
1804 #define OR1K_SPR_IMMU_ITLBW_TR_UXE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
1807 #define OR1K_SPR_IMMU_ITLBW_TR_SXE_OFFSET 7
1808 #define OR1K_SPR_IMMU_ITLBW_TR_SXE_MASK 0x00000080
1809 #define OR1K_SPR_IMMU_ITLBW_TR_SXE_GET(X) (((X) >> 7) & 0x1)
1810 #define OR1K_SPR_IMMU_ITLBW_TR_SXE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
1813 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_LSB 13
1814 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_MSB 31
1815 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_BITS 19
1816 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_MASK OR1K_UNSIGNED(0xffffe000)
1817 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
1818 #define OR1K_SPR_IMMU_ITLBW_TR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
1824 #define OR1K_SPR_DCACHE_GROUP 0x03
1827 #define OR1K_SPR_DCACHE_DCCR_INDEX OR1K_UNSIGNED(0x000)
1828 #define OR1K_SPR_DCACHE_DCCR_ADDR OR1K_UNSIGNED(0x1800)
1831 #define OR1K_SPR_DCACHE_DCCR_EW_LSB 0
1832 #define OR1K_SPR_DCACHE_DCCR_EW_MSB 7
1833 #define OR1K_SPR_DCACHE_DCCR_EW_BITS 8
1834 #define OR1K_SPR_DCACHE_DCCR_EW_MASK OR1K_UNSIGNED(0x000000ff)
1835 #define OR1K_SPR_DCACHE_DCCR_EW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x000000ff))
1836 #define OR1K_SPR_DCACHE_DCCR_EW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff00)) | ((Y) << 0))
1840 #define OR1K_SPR_DCACHE_DCBPR_INDEX OR1K_UNSIGNED(0x001)
1841 #define OR1K_SPR_DCACHE_DCBPR_ADDR OR1K_UNSIGNED(0x1801)
1845 #define OR1K_SPR_DCACHE_DCBFR_INDEX OR1K_UNSIGNED(0x002)
1846 #define OR1K_SPR_DCACHE_DCBFR_ADDR OR1K_UNSIGNED(0x1802)
1850 #define OR1K_SPR_DCACHE_DCBIR_INDEX OR1K_UNSIGNED(0x003)
1851 #define OR1K_SPR_DCACHE_DCBIR_ADDR OR1K_UNSIGNED(0x1803)
1855 #define OR1K_SPR_DCACHE_DCBWR_INDEX OR1K_UNSIGNED(0x004)
1856 #define OR1K_SPR_DCACHE_DCBWR_ADDR OR1K_UNSIGNED(0x1804)
1860 #define OR1K_SPR_DCACHE_DCBLR_INDEX OR1K_UNSIGNED(0x005)
1861 #define OR1K_SPR_DCACHE_DCBLR_ADDR OR1K_UNSIGNED(0x1805)
1867 #define OR1K_SPR_ICACHE_GROUP 0x04
1870 #define OR1K_SPR_ICACHE_ICCR_INDEX OR1K_UNSIGNED(0x000)
1871 #define OR1K_SPR_ICACHE_ICCR_ADDR OR1K_UNSIGNED(0x2000)
1874 #define OR1K_SPR_ICACHE_ICCR_EW_LSB 0
1875 #define OR1K_SPR_ICACHE_ICCR_EW_MSB 7
1876 #define OR1K_SPR_ICACHE_ICCR_EW_BITS 8
1877 #define OR1K_SPR_ICACHE_ICCR_EW_MASK OR1K_UNSIGNED(0x000000ff)
1878 #define OR1K_SPR_ICACHE_ICCR_EW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x000000ff))
1879 #define OR1K_SPR_ICACHE_ICCR_EW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff00)) | ((Y) << 0))
1883 #define OR1K_SPR_ICACHE_ICBPR_INDEX OR1K_UNSIGNED(0x001)
1884 #define OR1K_SPR_ICACHE_ICBPR_ADDR OR1K_UNSIGNED(0x2001)
1888 #define OR1K_SPR_ICACHE_ICBIR_INDEX OR1K_UNSIGNED(0x002)
1889 #define OR1K_SPR_ICACHE_ICBIR_ADDR OR1K_UNSIGNED(0x2002)
1893 #define OR1K_SPR_ICACHE_ICBLR_INDEX OR1K_UNSIGNED(0x003)
1894 #define OR1K_SPR_ICACHE_ICBLR_ADDR OR1K_UNSIGNED(0x2003)
1900 #define OR1K_SPR_MAC_GROUP 0x05
1903 #define OR1K_SPR_MAC_MACLO_INDEX OR1K_UNSIGNED(0x001)
1904 #define OR1K_SPR_MAC_MACLO_ADDR OR1K_UNSIGNED(0x2801)
1908 #define OR1K_SPR_MAC_MACHI_INDEX OR1K_UNSIGNED(0x002)
1909 #define OR1K_SPR_MAC_MACHI_ADDR OR1K_UNSIGNED(0x2802)
1915 #define OR1K_SPR_DEBUG_GROUP 0x06
1918 #define OR1K_SPR_DEBUG_DVR_BASE OR1K_UNSIGNED(0x000)
1919 #define OR1K_SPR_DEBUG_DVR_COUNT OR1K_UNSIGNED(0x008)
1920 #define OR1K_SPR_DEBUG_DVR_STEP OR1K_UNSIGNED(0x001)
1921 #define OR1K_SPR_DEBUG_DVR_INDEX(N) (OR1K_SPR_DEBUG_DVR_BASE + ((N) * OR1K_SPR_DEBUG_DVR_STEP))
1922 #define OR1K_SPR_DEBUG_DVR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DVR_INDEX(N))
1926 #define OR1K_SPR_DEBUG_DCR_BASE OR1K_UNSIGNED(0x008)
1927 #define OR1K_SPR_DEBUG_DCR_COUNT OR1K_UNSIGNED(0x008)
1928 #define OR1K_SPR_DEBUG_DCR_STEP OR1K_UNSIGNED(0x001)
1929 #define OR1K_SPR_DEBUG_DCR_INDEX(N) (OR1K_SPR_DEBUG_DCR_BASE + ((N) * OR1K_SPR_DEBUG_DCR_STEP))
1930 #define OR1K_SPR_DEBUG_DCR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DCR_INDEX(N))
1933 #define OR1K_SPR_DEBUG_DCR_DP_OFFSET 0
1934 #define OR1K_SPR_DEBUG_DCR_DP_MASK 0x00000001
1935 #define OR1K_SPR_DEBUG_DCR_DP_GET(X) (((X) >> 0) & 0x1)
1936 #define OR1K_SPR_DEBUG_DCR_DP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
1939 #define OR1K_SPR_DEBUG_DCR_CC_LSB 1
1940 #define OR1K_SPR_DEBUG_DCR_CC_MSB 3
1941 #define OR1K_SPR_DEBUG_DCR_CC_BITS 3
1942 #define OR1K_SPR_DEBUG_DCR_CC_MASK OR1K_UNSIGNED(0x0000000e)
1943 #define OR1K_SPR_DEBUG_DCR_CC_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x00000007))
1944 #define OR1K_SPR_DEBUG_DCR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff1)) | ((Y) << 1))
1947 #define OR1K_SPR_DEBUG_DCR_CC_MASKED 0
1949 #define OR1K_SPR_DEBUG_DCR_CC_EQ 1
1951 #define OR1K_SPR_DEBUG_DCR_CC_LT 2
1953 #define OR1K_SPR_DEBUG_DCR_CC_LTE 3
1955 #define OR1K_SPR_DEBUG_DCR_CC_GT 4
1957 #define OR1K_SPR_DEBUG_DCR_CC_GTE 5
1959 #define OR1K_SPR_DEBUG_DCR_CC_NEQ 6
1961 #define OR1K_SPR_DEBUG_DCR_SC_OFFSET 4
1962 #define OR1K_SPR_DEBUG_DCR_SC_MASK 0x00000010
1963 #define OR1K_SPR_DEBUG_DCR_SC_GET(X) (((X) >> 4) & 0x1)
1964 #define OR1K_SPR_DEBUG_DCR_SC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
1967 #define OR1K_SPR_DEBUG_DCR_CT_LSB 5
1968 #define OR1K_SPR_DEBUG_DCR_CT_MSB 7
1969 #define OR1K_SPR_DEBUG_DCR_CT_BITS 3
1970 #define OR1K_SPR_DEBUG_DCR_CT_MASK OR1K_UNSIGNED(0x000000e0)
1971 #define OR1K_SPR_DEBUG_DCR_CT_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
1972 #define OR1K_SPR_DEBUG_DCR_CT_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
1975 #define OR1K_SPR_DEBUG_DCR_CT_DISABLED 0
1977 #define OR1K_SPR_DEBUG_DCR_CT_FEA 1
1979 #define OR1K_SPR_DEBUG_DCR_CT_LEA 2
1981 #define OR1K_SPR_DEBUG_DCR_CT_SEA 3
1983 #define OR1K_SPR_DEBUG_DCR_CT_LD 4
1985 #define OR1K_SPR_DEBUG_DCR_CT_SD 5
1987 #define OR1K_SPR_DEBUG_DCR_CT_LSEA 6
1989 #define OR1K_SPR_DEBUG_DCR_CT_LSD 7
1992 #define OR1K_SPR_DEBUG_DMR1_INDEX OR1K_UNSIGNED(0x010)
1993 #define OR1K_SPR_DEBUG_DMR1_ADDR OR1K_UNSIGNED(0x3010)
1996 #define OR1K_SPR_DEBUG_DMR1_CW0_LSB 0
1997 #define OR1K_SPR_DEBUG_DMR1_CW0_MSB 1
1998 #define OR1K_SPR_DEBUG_DMR1_CW0_BITS 2
1999 #define OR1K_SPR_DEBUG_DMR1_CW0_MASK OR1K_UNSIGNED(0x00000003)
2000 #define OR1K_SPR_DEBUG_DMR1_CW0_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
2001 #define OR1K_SPR_DEBUG_DMR1_CW0_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
2004 #define OR1K_SPR_DEBUG_DMR1_CW1_LSB 2
2005 #define OR1K_SPR_DEBUG_DMR1_CW1_MSB 3
2006 #define OR1K_SPR_DEBUG_DMR1_CW1_BITS 2
2007 #define OR1K_SPR_DEBUG_DMR1_CW1_MASK OR1K_UNSIGNED(0x0000000c)
2008 #define OR1K_SPR_DEBUG_DMR1_CW1_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000003))
2009 #define OR1K_SPR_DEBUG_DMR1_CW1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff3)) | ((Y) << 2))
2012 #define OR1K_SPR_DEBUG_DMR1_CW2_LSB 4
2013 #define OR1K_SPR_DEBUG_DMR1_CW2_MSB 5
2014 #define OR1K_SPR_DEBUG_DMR1_CW2_BITS 2
2015 #define OR1K_SPR_DEBUG_DMR1_CW2_MASK OR1K_UNSIGNED(0x00000030)
2016 #define OR1K_SPR_DEBUG_DMR1_CW2_GET(X) (((X) >> 4) & OR1K_UNSIGNED(0x00000003))
2017 #define OR1K_SPR_DEBUG_DMR1_CW2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffcf)) | ((Y) << 4))
2020 #define OR1K_SPR_DEBUG_DMR1_CW3_LSB 6
2021 #define OR1K_SPR_DEBUG_DMR1_CW3_MSB 7
2022 #define OR1K_SPR_DEBUG_DMR1_CW3_BITS 2
2023 #define OR1K_SPR_DEBUG_DMR1_CW3_MASK OR1K_UNSIGNED(0x000000c0)
2024 #define OR1K_SPR_DEBUG_DMR1_CW3_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
2025 #define OR1K_SPR_DEBUG_DMR1_CW3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
2028 #define OR1K_SPR_DEBUG_DMR1_CW4_LSB 9
2029 #define OR1K_SPR_DEBUG_DMR1_CW4_MSB 9
2030 #define OR1K_SPR_DEBUG_DMR1_CW4_BITS 1
2031 #define OR1K_SPR_DEBUG_DMR1_CW4_MASK OR1K_UNSIGNED(0x00000200)
2032 #define OR1K_SPR_DEBUG_DMR1_CW4_GET(X) (((X) >> 9) & OR1K_UNSIGNED(0x00000001))
2033 #define OR1K_SPR_DEBUG_DMR1_CW4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((Y) << 9))
2036 #define OR1K_SPR_DEBUG_DMR1_CW5_LSB 10
2037 #define OR1K_SPR_DEBUG_DMR1_CW5_MSB 11
2038 #define OR1K_SPR_DEBUG_DMR1_CW5_BITS 2
2039 #define OR1K_SPR_DEBUG_DMR1_CW5_MASK OR1K_UNSIGNED(0x00000c00)
2040 #define OR1K_SPR_DEBUG_DMR1_CW5_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x00000003))
2041 #define OR1K_SPR_DEBUG_DMR1_CW5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff3ff)) | ((Y) << 10))
2044 #define OR1K_SPR_DEBUG_DMR1_CW6_LSB 12
2045 #define OR1K_SPR_DEBUG_DMR1_CW6_MSB 13
2046 #define OR1K_SPR_DEBUG_DMR1_CW6_BITS 2
2047 #define OR1K_SPR_DEBUG_DMR1_CW6_MASK OR1K_UNSIGNED(0x00003000)
2048 #define OR1K_SPR_DEBUG_DMR1_CW6_GET(X) (((X) >> 12) & OR1K_UNSIGNED(0x00000003))
2049 #define OR1K_SPR_DEBUG_DMR1_CW6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffcfff)) | ((Y) << 12))
2052 #define OR1K_SPR_DEBUG_DMR1_CW7_LSB 14
2053 #define OR1K_SPR_DEBUG_DMR1_CW7_MSB 15
2054 #define OR1K_SPR_DEBUG_DMR1_CW7_BITS 2
2055 #define OR1K_SPR_DEBUG_DMR1_CW7_MASK OR1K_UNSIGNED(0x0000c000)
2056 #define OR1K_SPR_DEBUG_DMR1_CW7_GET(X) (((X) >> 14) & OR1K_UNSIGNED(0x00000003))
2057 #define OR1K_SPR_DEBUG_DMR1_CW7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff3fff)) | ((Y) << 14))
2060 #define OR1K_SPR_DEBUG_DMR1_CW8_LSB 16
2061 #define OR1K_SPR_DEBUG_DMR1_CW8_MSB 17
2062 #define OR1K_SPR_DEBUG_DMR1_CW8_BITS 2
2063 #define OR1K_SPR_DEBUG_DMR1_CW8_MASK OR1K_UNSIGNED(0x00030000)
2064 #define OR1K_SPR_DEBUG_DMR1_CW8_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x00000003))
2065 #define OR1K_SPR_DEBUG_DMR1_CW8_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffcffff)) | ((Y) << 16))
2068 #define OR1K_SPR_DEBUG_DMR1_CW9_LSB 18
2069 #define OR1K_SPR_DEBUG_DMR1_CW9_MSB 19
2070 #define OR1K_SPR_DEBUG_DMR1_CW9_BITS 2
2071 #define OR1K_SPR_DEBUG_DMR1_CW9_MASK OR1K_UNSIGNED(0x000c0000)
2072 #define OR1K_SPR_DEBUG_DMR1_CW9_GET(X) (((X) >> 18) & OR1K_UNSIGNED(0x00000003))
2073 #define OR1K_SPR_DEBUG_DMR1_CW9_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfff3ffff)) | ((Y) << 18))
2076 #define OR1K_SPR_DEBUG_DMR1_ST_OFFSET 22
2077 #define OR1K_SPR_DEBUG_DMR1_ST_MASK 0x00400000
2078 #define OR1K_SPR_DEBUG_DMR1_ST_GET(X) (((X) >> 22) & 0x1)
2079 #define OR1K_SPR_DEBUG_DMR1_ST_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffbfffff)) | ((!!(Y)) << 22))
2082 #define OR1K_SPR_DEBUG_DMR1_BT_OFFSET 23
2083 #define OR1K_SPR_DEBUG_DMR1_BT_MASK 0x00800000
2084 #define OR1K_SPR_DEBUG_DMR1_BT_GET(X) (((X) >> 23) & 0x1)
2085 #define OR1K_SPR_DEBUG_DMR1_BT_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff7fffff)) | ((!!(Y)) << 23))
2089 #define OR1K_SPR_DEBUG_DMR2_INDEX OR1K_UNSIGNED(0x011)
2090 #define OR1K_SPR_DEBUG_DMR2_ADDR OR1K_UNSIGNED(0x3011)
2093 #define OR1K_SPR_DEBUG_DMR2_WCE0_OFFSET 0
2094 #define OR1K_SPR_DEBUG_DMR2_WCE0_MASK 0x00000001
2095 #define OR1K_SPR_DEBUG_DMR2_WCE0_GET(X) (((X) >> 0) & 0x1)
2096 #define OR1K_SPR_DEBUG_DMR2_WCE0_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
2099 #define OR1K_SPR_DEBUG_DMR2_WCE1_OFFSET 1
2100 #define OR1K_SPR_DEBUG_DMR2_WCE1_MASK 0x00000002
2101 #define OR1K_SPR_DEBUG_DMR2_WCE1_GET(X) (((X) >> 1) & 0x1)
2102 #define OR1K_SPR_DEBUG_DMR2_WCE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
2105 #define OR1K_SPR_DEBUG_DMR2_AWTC_LSB 2
2106 #define OR1K_SPR_DEBUG_DMR2_AWTC_MSB 11
2107 #define OR1K_SPR_DEBUG_DMR2_AWTC_BITS 10
2108 #define OR1K_SPR_DEBUG_DMR2_AWTC_MASK OR1K_UNSIGNED(0x00000ffc)
2109 #define OR1K_SPR_DEBUG_DMR2_AWTC_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x000003ff))
2110 #define OR1K_SPR_DEBUG_DMR2_AWTC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff003)) | ((Y) << 2))
2113 #define OR1K_SPR_DEBUG_DMR2_WGB_LSB 12
2114 #define OR1K_SPR_DEBUG_DMR2_WGB_MSB 21
2115 #define OR1K_SPR_DEBUG_DMR2_WGB_BITS 10
2116 #define OR1K_SPR_DEBUG_DMR2_WGB_MASK OR1K_UNSIGNED(0x003ff000)
2117 #define OR1K_SPR_DEBUG_DMR2_WGB_GET(X) (((X) >> 12) & OR1K_UNSIGNED(0x000003ff))
2118 #define OR1K_SPR_DEBUG_DMR2_WGB_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffc00fff)) | ((Y) << 12))
2121 #define OR1K_SPR_DEBUG_DMR2_WBS_LSB 22
2122 #define OR1K_SPR_DEBUG_DMR2_WBS_MSB 31
2123 #define OR1K_SPR_DEBUG_DMR2_WBS_BITS 10
2124 #define OR1K_SPR_DEBUG_DMR2_WBS_MASK OR1K_UNSIGNED(0xffc00000)
2125 #define OR1K_SPR_DEBUG_DMR2_WBS_GET(X) (((X) >> 22) & OR1K_UNSIGNED(0x000003ff))
2126 #define OR1K_SPR_DEBUG_DMR2_WBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0x003fffff)) | ((Y) << 22))
2130 #define OR1K_SPR_DEBUG_DCWR_BASE OR1K_UNSIGNED(0x012)
2131 #define OR1K_SPR_DEBUG_DCWR_COUNT OR1K_UNSIGNED(0x002)
2132 #define OR1K_SPR_DEBUG_DCWR_STEP OR1K_UNSIGNED(0x001)
2133 #define OR1K_SPR_DEBUG_DCWR_INDEX(N) (OR1K_SPR_DEBUG_DCWR_BASE + ((N) * OR1K_SPR_DEBUG_DCWR_STEP))
2134 #define OR1K_SPR_DEBUG_DCWR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DCWR_INDEX(N))
2138 #define OR1K_SPR_DEBUG_DSR_INDEX OR1K_UNSIGNED(0x014)
2139 #define OR1K_SPR_DEBUG_DSR_ADDR OR1K_UNSIGNED(0x3014)
2142 #define OR1K_SPR_DEBUG_DSR_RSTE_OFFSET 0
2143 #define OR1K_SPR_DEBUG_DSR_RSTE_MASK 0x00000001
2144 #define OR1K_SPR_DEBUG_DSR_RSTE_GET(X) (((X) >> 0) & 0x1)
2145 #define OR1K_SPR_DEBUG_DSR_RSTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
2148 #define OR1K_SPR_DEBUG_DSR_BUSEE_OFFSET 1
2149 #define OR1K_SPR_DEBUG_DSR_BUSEE_MASK 0x00000002
2150 #define OR1K_SPR_DEBUG_DSR_BUSEE_GET(X) (((X) >> 1) & 0x1)
2151 #define OR1K_SPR_DEBUG_DSR_BUSEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
2154 #define OR1K_SPR_DEBUG_DSR_DPFE_OFFSET 2
2155 #define OR1K_SPR_DEBUG_DSR_DPFE_MASK 0x00000004
2156 #define OR1K_SPR_DEBUG_DSR_DPFE_GET(X) (((X) >> 2) & 0x1)
2157 #define OR1K_SPR_DEBUG_DSR_DPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
2160 #define OR1K_SPR_DEBUG_DSR_IPFE_OFFSET 3
2161 #define OR1K_SPR_DEBUG_DSR_IPFE_MASK 0x00000008
2162 #define OR1K_SPR_DEBUG_DSR_IPFE_GET(X) (((X) >> 3) & 0x1)
2163 #define OR1K_SPR_DEBUG_DSR_IPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
2166 #define OR1K_SPR_DEBUG_DSR_TTE_OFFSET 4
2167 #define OR1K_SPR_DEBUG_DSR_TTE_MASK 0x00000010
2168 #define OR1K_SPR_DEBUG_DSR_TTE_GET(X) (((X) >> 4) & 0x1)
2169 #define OR1K_SPR_DEBUG_DSR_TTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
2172 #define OR1K_SPR_DEBUG_DSR_AE_OFFSET 5
2173 #define OR1K_SPR_DEBUG_DSR_AE_MASK 0x00000020
2174 #define OR1K_SPR_DEBUG_DSR_AE_GET(X) (((X) >> 5) & 0x1)
2175 #define OR1K_SPR_DEBUG_DSR_AE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
2178 #define OR1K_SPR_DEBUG_DSR_IIE_OFFSET 6
2179 #define OR1K_SPR_DEBUG_DSR_IIE_MASK 0x00000040
2180 #define OR1K_SPR_DEBUG_DSR_IIE_GET(X) (((X) >> 6) & 0x1)
2181 #define OR1K_SPR_DEBUG_DSR_IIE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
2184 #define OR1K_SPR_DEBUG_DSR_INTE_OFFSET 7
2185 #define OR1K_SPR_DEBUG_DSR_INTE_MASK 0x00000080
2186 #define OR1K_SPR_DEBUG_DSR_INTE_GET(X) (((X) >> 7) & 0x1)
2187 #define OR1K_SPR_DEBUG_DSR_INTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
2190 #define OR1K_SPR_DEBUG_DSR_DME_OFFSET 8
2191 #define OR1K_SPR_DEBUG_DSR_DME_MASK 0x00000100
2192 #define OR1K_SPR_DEBUG_DSR_DME_GET(X) (((X) >> 8) & 0x1)
2193 #define OR1K_SPR_DEBUG_DSR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
2196 #define OR1K_SPR_DEBUG_DSR_IME_OFFSET 9
2197 #define OR1K_SPR_DEBUG_DSR_IME_MASK 0x00000200
2198 #define OR1K_SPR_DEBUG_DSR_IME_GET(X) (((X) >> 9) & 0x1)
2199 #define OR1K_SPR_DEBUG_DSR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
2202 #define OR1K_SPR_DEBUG_DSR_RE_OFFSET 10
2203 #define OR1K_SPR_DEBUG_DSR_RE_MASK 0x00000400
2204 #define OR1K_SPR_DEBUG_DSR_RE_GET(X) (((X) >> 10) & 0x1)
2205 #define OR1K_SPR_DEBUG_DSR_RE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
2208 #define OR1K_SPR_DEBUG_DSR_SCE_OFFSET 11
2209 #define OR1K_SPR_DEBUG_DSR_SCE_MASK 0x00000800
2210 #define OR1K_SPR_DEBUG_DSR_SCE_GET(X) (((X) >> 11) & 0x1)
2211 #define OR1K_SPR_DEBUG_DSR_SCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
2214 #define OR1K_SPR_DEBUG_DSR_FPE_OFFSET 12
2215 #define OR1K_SPR_DEBUG_DSR_FPE_MASK 0x00001000
2216 #define OR1K_SPR_DEBUG_DSR_FPE_GET(X) (((X) >> 12) & 0x1)
2217 #define OR1K_SPR_DEBUG_DSR_FPE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
2220 #define OR1K_SPR_DEBUG_DSR_TE_OFFSET 13
2221 #define OR1K_SPR_DEBUG_DSR_TE_MASK 0x00002000
2222 #define OR1K_SPR_DEBUG_DSR_TE_GET(X) (((X) >> 13) & 0x1)
2223 #define OR1K_SPR_DEBUG_DSR_TE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
2227 #define OR1K_SPR_DEBUG_DRR_INDEX OR1K_UNSIGNED(0x015)
2228 #define OR1K_SPR_DEBUG_DRR_ADDR OR1K_UNSIGNED(0x3015)
2231 #define OR1K_SPR_DEBUG_DRR_RSTE_OFFSET 0
2232 #define OR1K_SPR_DEBUG_DRR_RSTE_MASK 0x00000001
2233 #define OR1K_SPR_DEBUG_DRR_RSTE_GET(X) (((X) >> 0) & 0x1)
2234 #define OR1K_SPR_DEBUG_DRR_RSTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
2237 #define OR1K_SPR_DEBUG_DRR_BUSEE_OFFSET 1
2238 #define OR1K_SPR_DEBUG_DRR_BUSEE_MASK 0x00000002
2239 #define OR1K_SPR_DEBUG_DRR_BUSEE_GET(X) (((X) >> 1) & 0x1)
2240 #define OR1K_SPR_DEBUG_DRR_BUSEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
2243 #define OR1K_SPR_DEBUG_DRR_DPFE_OFFSET 2
2244 #define OR1K_SPR_DEBUG_DRR_DPFE_MASK 0x00000004
2245 #define OR1K_SPR_DEBUG_DRR_DPFE_GET(X) (((X) >> 2) & 0x1)
2246 #define OR1K_SPR_DEBUG_DRR_DPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
2249 #define OR1K_SPR_DEBUG_DRR_IPFE_OFFSET 3
2250 #define OR1K_SPR_DEBUG_DRR_IPFE_MASK 0x00000008
2251 #define OR1K_SPR_DEBUG_DRR_IPFE_GET(X) (((X) >> 3) & 0x1)
2252 #define OR1K_SPR_DEBUG_DRR_IPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
2255 #define OR1K_SPR_DEBUG_DRR_TTE_OFFSET 4
2256 #define OR1K_SPR_DEBUG_DRR_TTE_MASK 0x00000010
2257 #define OR1K_SPR_DEBUG_DRR_TTE_GET(X) (((X) >> 4) & 0x1)
2258 #define OR1K_SPR_DEBUG_DRR_TTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
2261 #define OR1K_SPR_DEBUG_DRR_AE_OFFSET 5
2262 #define OR1K_SPR_DEBUG_DRR_AE_MASK 0x00000020
2263 #define OR1K_SPR_DEBUG_DRR_AE_GET(X) (((X) >> 5) & 0x1)
2264 #define OR1K_SPR_DEBUG_DRR_AE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
2267 #define OR1K_SPR_DEBUG_DRR_IIE_OFFSET 6
2268 #define OR1K_SPR_DEBUG_DRR_IIE_MASK 0x00000040
2269 #define OR1K_SPR_DEBUG_DRR_IIE_GET(X) (((X) >> 6) & 0x1)
2270 #define OR1K_SPR_DEBUG_DRR_IIE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
2273 #define OR1K_SPR_DEBUG_DRR_INTE_OFFSET 7
2274 #define OR1K_SPR_DEBUG_DRR_INTE_MASK 0x00000080
2275 #define OR1K_SPR_DEBUG_DRR_INTE_GET(X) (((X) >> 7) & 0x1)
2276 #define OR1K_SPR_DEBUG_DRR_INTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
2279 #define OR1K_SPR_DEBUG_DRR_DME_OFFSET 8
2280 #define OR1K_SPR_DEBUG_DRR_DME_MASK 0x00000100
2281 #define OR1K_SPR_DEBUG_DRR_DME_GET(X) (((X) >> 8) & 0x1)
2282 #define OR1K_SPR_DEBUG_DRR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
2285 #define OR1K_SPR_DEBUG_DRR_IME_OFFSET 9
2286 #define OR1K_SPR_DEBUG_DRR_IME_MASK 0x00000200
2287 #define OR1K_SPR_DEBUG_DRR_IME_GET(X) (((X) >> 9) & 0x1)
2288 #define OR1K_SPR_DEBUG_DRR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
2291 #define OR1K_SPR_DEBUG_DRR_RE_OFFSET 10
2292 #define OR1K_SPR_DEBUG_DRR_RE_MASK 0x00000400
2293 #define OR1K_SPR_DEBUG_DRR_RE_GET(X) (((X) >> 10) & 0x1)
2294 #define OR1K_SPR_DEBUG_DRR_RE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
2297 #define OR1K_SPR_DEBUG_DRR_SCE_OFFSET 11
2298 #define OR1K_SPR_DEBUG_DRR_SCE_MASK 0x00000800
2299 #define OR1K_SPR_DEBUG_DRR_SCE_GET(X) (((X) >> 11) & 0x1)
2300 #define OR1K_SPR_DEBUG_DRR_SCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
2303 #define OR1K_SPR_DEBUG_DRR_FPE_OFFSET 12
2304 #define OR1K_SPR_DEBUG_DRR_FPE_MASK 0x00001000
2305 #define OR1K_SPR_DEBUG_DRR_FPE_GET(X) (((X) >> 12) & 0x1)
2306 #define OR1K_SPR_DEBUG_DRR_FPE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
2309 #define OR1K_SPR_DEBUG_DRR_TE_OFFSET 13
2310 #define OR1K_SPR_DEBUG_DRR_TE_MASK 0x00002000
2311 #define OR1K_SPR_DEBUG_DRR_TE_GET(X) (((X) >> 13) & 0x1)
2312 #define OR1K_SPR_DEBUG_DRR_TE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
2318 #define OR1K_SPR_PERF_GROUP 0x07
2321 #define OR1K_SPR_PERF_PCCR_BASE OR1K_UNSIGNED(0x000)
2322 #define OR1K_SPR_PERF_PCCR_COUNT OR1K_UNSIGNED(0x008)
2323 #define OR1K_SPR_PERF_PCCR_STEP OR1K_UNSIGNED(0x001)
2324 #define OR1K_SPR_PERF_PCCR_INDEX(N) (OR1K_SPR_PERF_PCCR_BASE + ((N) * OR1K_SPR_PERF_PCCR_STEP))
2325 #define OR1K_SPR_PERF_PCCR_ADDR(N) ((OR1K_SPR_PERF_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_PERF_PCCR_INDEX(N))
2329 #define OR1K_SPR_PERF_PCMR_BASE OR1K_UNSIGNED(0x008)
2330 #define OR1K_SPR_PERF_PCMR_COUNT OR1K_UNSIGNED(0x008)
2331 #define OR1K_SPR_PERF_PCMR_STEP OR1K_UNSIGNED(0x001)
2332 #define OR1K_SPR_PERF_PCMR_INDEX(N) (OR1K_SPR_PERF_PCMR_BASE + ((N) * OR1K_SPR_PERF_PCMR_STEP))
2333 #define OR1K_SPR_PERF_PCMR_ADDR(N) ((OR1K_SPR_PERF_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_PERF_PCMR_INDEX(N))
2339 #define OR1K_SPR_POWER_GROUP 0x08
2342 #define OR1K_SPR_POWER_PMR_INDEX OR1K_UNSIGNED(0x000)
2343 #define OR1K_SPR_POWER_PMR_ADDR OR1K_UNSIGNED(0x4000)
2349 #define OR1K_SPR_PIC_GROUP 0x09
2352 #define OR1K_SPR_PIC_PICMR_INDEX OR1K_UNSIGNED(0x000)
2353 #define OR1K_SPR_PIC_PICMR_ADDR OR1K_UNSIGNED(0x4800)
2357 #define OR1K_SPR_PIC_PICSR_INDEX OR1K_UNSIGNED(0x002)
2358 #define OR1K_SPR_PIC_PICSR_ADDR OR1K_UNSIGNED(0x4802)
2364 #define OR1K_SPR_TICK_GROUP 0x0a
2367 #define OR1K_SPR_TICK_TTMR_INDEX OR1K_UNSIGNED(0x000)
2368 #define OR1K_SPR_TICK_TTMR_ADDR OR1K_UNSIGNED(0x5000)
2371 #define OR1K_SPR_TICK_TTMR_TP_LSB 0
2372 #define OR1K_SPR_TICK_TTMR_TP_MSB 27
2373 #define OR1K_SPR_TICK_TTMR_TP_BITS 28
2374 #define OR1K_SPR_TICK_TTMR_TP_MASK OR1K_UNSIGNED(0x0fffffff)
2375 #define OR1K_SPR_TICK_TTMR_TP_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0fffffff))
2376 #define OR1K_SPR_TICK_TTMR_TP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xf0000000)) | ((Y) << 0))
2379 #define OR1K_SPR_TICK_TTMR_IP_OFFSET 28
2380 #define OR1K_SPR_TICK_TTMR_IP_MASK 0x10000000
2381 #define OR1K_SPR_TICK_TTMR_IP_GET(X) (((X) >> 28) & 0x1)
2382 #define OR1K_SPR_TICK_TTMR_IP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xefffffff)) | ((!!(Y)) << 28))
2385 #define OR1K_SPR_TICK_TTMR_IE_OFFSET 29
2386 #define OR1K_SPR_TICK_TTMR_IE_MASK 0x20000000
2387 #define OR1K_SPR_TICK_TTMR_IE_GET(X) (((X) >> 29) & 0x1)
2388 #define OR1K_SPR_TICK_TTMR_IE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xdfffffff)) | ((!!(Y)) << 29))
2391 #define OR1K_SPR_TICK_TTMR_MODE_LSB 30
2392 #define OR1K_SPR_TICK_TTMR_MODE_MSB 31
2393 #define OR1K_SPR_TICK_TTMR_MODE_BITS 2
2394 #define OR1K_SPR_TICK_TTMR_MODE_MASK OR1K_UNSIGNED(0xc0000000)
2395 #define OR1K_SPR_TICK_TTMR_MODE_GET(X) (((X) >> 30) & OR1K_UNSIGNED(0x00000003))
2396 #define OR1K_SPR_TICK_TTMR_MODE_SET(X, Y) (((X) & OR1K_UNSIGNED(0x3fffffff)) | ((Y) << 30))
2399 #define OR1K_SPR_TICK_TTMR_MODE_DISABLE 0
2401 #define OR1K_SPR_TICK_TTMR_MODE_RESTART 1
2403 #define OR1K_SPR_TICK_TTMR_MODE_STOP 2
2405 #define OR1K_SPR_TICK_TTMR_MODE_CONTINUE 3
2408 #define OR1K_SPR_TICK_TTCR_INDEX OR1K_UNSIGNED(0x001)
2409 #define OR1K_SPR_TICK_TTCR_ADDR OR1K_UNSIGNED(0x5001)
2415 #define OR1K_SPR_FPU_GROUP 0x0b