summaryrefslogtreecommitdiff
path: root/arch/avr32/mach-at32ap/intc.h
blob: 4d3664e43a8e605218bd23dafc72d8821d7c8b68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
/*
 * Automatically generated by gen-header.xsl
 */
#ifndef __ASM_AVR32_PERIHP_INTC_H__
#define __ASM_AVR32_PERIHP_INTC_H__

#define INTC_NUM_INT_GRPS            33

#define INTC_INTPR0                  0x0
# define INTC_INTPR0_INTLEV_OFFSET   30
# define INTC_INTPR0_INTLEV_SIZE     2
# define INTC_INTPR0_OFFSET_OFFSET   0
# define INTC_INTPR0_OFFSET_SIZE     24
#define INTC_INTREQ0                 0x100
# define INTC_INTREQ0_IREQUEST0_OFFSET 0
# define INTC_INTREQ0_IREQUEST0_SIZE 1
# define INTC_INTREQ0_IREQUEST1_OFFSET 1
# define INTC_INTREQ0_IREQUEST1_SIZE 1
#define INTC_INTPR1                  0x4
# define INTC_INTPR1_INTLEV_OFFSET   30
# define INTC_INTPR1_INTLEV_SIZE     2
# define INTC_INTPR1_OFFSET_OFFSET   0
# define INTC_INTPR1_OFFSET_SIZE     24
#define INTC_INTREQ1                 0x104
# define INTC_INTREQ1_IREQUEST32_OFFSET 0
# define INTC_INTREQ1_IREQUEST32_SIZE 1
# define INTC_INTREQ1_IREQUEST33_OFFSET 1
# define INTC_INTREQ1_IREQUEST33_SIZE 1
# define INTC_INTREQ1_IREQUEST34_OFFSET 2
# define INTC_INTREQ1_IREQUEST34_SIZE 1
# define INTC_INTREQ1_IREQUEST35_OFFSET 3
# define INTC_INTREQ1_IREQUEST35_SIZE 1
# define INTC_INTREQ1_IREQUEST36_OFFSET 4
# define INTC_INTREQ1_IREQUEST36_SIZE 1
# define INTC_INTREQ1_IREQUEST37_OFFSET 5
# define INTC_INTREQ1_IREQUEST37_SIZE 1
#define INTC_INTPR2                  0x8
# define INTC_INTPR2_INTLEV_OFFSET   30
# define INTC_INTPR2_INTLEV_SIZE     2
# define INTC_INTPR2_OFFSET_OFFSET   0
# define INTC_INTPR2_OFFSET_SIZE     24
#define INTC_INTREQ2                 0x108
# define INTC_INTREQ2_IREQUEST64_OFFSET 0
# define INTC_INTREQ2_IREQUEST64_SIZE 1
# define INTC_INTREQ2_IREQUEST65_OFFSET 1
# define INTC_INTREQ2_IREQUEST65_SIZE 1
# define INTC_INTREQ2_IREQUEST66_OFFSET 2
# define INTC_INTREQ2_IREQUEST66_SIZE 1
# define INTC_INTREQ2_IREQUEST67_OFFSET 3
# define INTC_INTREQ2_IREQUEST67_SIZE 1
# define INTC_INTREQ2_IREQUEST68_OFFSET 4
# define INTC_INTREQ2_IREQUEST68_SIZE 1
#define INTC_INTPR3                  0xc
# define INTC_INTPR3_INTLEV_OFFSET   30
# define INTC_INTPR3_INTLEV_SIZE     2
# define INTC_INTPR3_OFFSET_OFFSET   0
# define INTC_INTPR3_OFFSET_SIZE     24
#define INTC_INTREQ3                 0x10c
# define INTC_INTREQ3_IREQUEST96_OFFSET 0
# define INTC_INTREQ3_IREQUEST96_SIZE 1
#define INTC_INTPR4                  0x10
# define INTC_INTPR4_INTLEV_OFFSET   30
# define INTC_INTPR4_INTLEV_SIZE     2
# define INTC_INTPR4_OFFSET_OFFSET   0
# define INTC_INTPR4_OFFSET_SIZE     24
#define INTC_INTREQ4                 0x110
# define INTC_INTREQ4_IREQUEST128_OFFSET 0
# define INTC_INTREQ4_IREQUEST128_SIZE 1
#define INTC_INTPR5                  0x14
# define INTC_INTPR5_INTLEV_OFFSET   30
# define INTC_INTPR5_INTLEV_SIZE     2
# define INTC_INTPR5_OFFSET_OFFSET   0
# define INTC_INTPR5_OFFSET_SIZE     24
#define INTC_INTREQ5                 0x114
# define INTC_INTREQ5_IREQUEST160_OFFSET 0
# define INTC_INTREQ5_IREQUEST160_SIZE 1
#define INTC_INTPR6                  0x18
# define INTC_INTPR6_INTLEV_OFFSET   30
# define INTC_INTPR6_INTLEV_SIZE     2
# define INTC_INTPR6_OFFSET_OFFSET   0
# define INTC_INTPR6_OFFSET_SIZE     24
#define INTC_INTREQ6                 0x118
# define INTC_INTREQ6_IREQUEST192_OFFSET 0
# define INTC_INTREQ6_IREQUEST192_SIZE 1
#define INTC_INTPR7                  0x1c
# define INTC_INTPR7_INTLEV_OFFSET   30
# define INTC_INTPR7_INTLEV_SIZE     2
# define INTC_INTPR7_OFFSET_OFFSET   0
# define INTC_INTPR7_OFFSET_SIZE     24
#define INTC_INTREQ7                 0x11c
# define INTC_INTREQ7_IREQUEST224_OFFSET 0
# define INTC_INTREQ7_IREQUEST224_SIZE 1
#define INTC_INTPR8                  0x20
# define INTC_INTPR8_INTLEV_OFFSET   30
# define INTC_INTPR8_INTLEV_SIZE     2
# define INTC_INTPR8_OFFSET_OFFSET   0
# define INTC_INTPR8_OFFSET_SIZE     24
#define INTC_INTREQ8                 0x120
# define INTC_INTREQ8_IREQUEST256_OFFSET 0
# define INTC_INTREQ8_IREQUEST256_SIZE 1
#define INTC_INTPR9                  0x24
# define INTC_INTPR9_INTLEV_OFFSET   30
# define INTC_INTPR9_INTLEV_SIZE     2
# define INTC_INTPR9_OFFSET_OFFSET   0
# define INTC_INTPR9_OFFSET_SIZE     24
#define INTC_INTREQ9                 0x124
# define INTC_INTREQ9_IREQUEST288_OFFSET 0
# define INTC_INTREQ9_IREQUEST288_SIZE 1
#define INTC_INTPR10                 0x28
# define INTC_INTPR10_INTLEV_OFFSET  30
# define INTC_INTPR10_INTLEV_SIZE    2
# define INTC_INTPR10_OFFSET_OFFSET  0
# define INTC_INTPR10_OFFSET_SIZE    24
#define INTC_INTREQ10                0x128
# define INTC_INTREQ10_IREQUEST320_OFFSET 0
# define INTC_INTREQ10_IREQUEST320_SIZE 1
#define INTC_INTPR11                 0x2c
# define INTC_INTPR11_INTLEV_OFFSET  30
# define INTC_INTPR11_INTLEV_SIZE    2
# define INTC_INTPR11_OFFSET_OFFSET  0
# define INTC_INTPR11_OFFSET_SIZE    24
#define INTC_INTREQ11                0x12c
# define INTC_INTREQ11_IREQUEST352_OFFSET 0
# define INTC_INTREQ11_IREQUEST352_SIZE 1
#define INTC_INTPR12                 0x30
# define INTC_INTPR12_INTLEV_OFFSET  30
# define INTC_INTPR12_INTLEV_SIZE    2
# define INTC_INTPR12_OFFSET_OFFSET  0
# define INTC_INTPR12_OFFSET_SIZE    24
#define INTC_INTREQ12                0x130
# define INTC_INTREQ12_IREQUEST384_OFFSET 0
# define INTC_INTREQ12_IREQUEST384_SIZE 1
#define INTC_INTPR13                 0x34
# define INTC_INTPR13_INTLEV_OFFSET  30
# define INTC_INTPR13_INTLEV_SIZE    2
# define INTC_INTPR13_OFFSET_OFFSET  0
# define INTC_INTPR13_OFFSET_SIZE    24
#define INTC_INTREQ13                0x134
# define INTC_INTREQ13_IREQUEST416_OFFSET 0
# define INTC_INTREQ13_IREQUEST416_SIZE 1
#define INTC_INTPR14                 0x38
# define INTC_INTPR14_INTLEV_OFFSET  30
# define INTC_INTPR14_INTLEV_SIZE    2
# define INTC_INTPR14_OFFSET_OFFSET  0
# define INTC_INTPR14_OFFSET_SIZE    24
#define INTC_INTREQ14                0x138
# define INTC_INTREQ14_IREQUEST448_OFFSET 0
# define INTC_INTREQ14_IREQUEST448_SIZE 1
#define INTC_INTPR15                 0x3c
# define INTC_INTPR15_INTLEV_OFFSET  30
# define INTC_INTPR15_INTLEV_SIZE    2
# define INTC_INTPR15_OFFSET_OFFSET  0
# define INTC_INTPR15_OFFSET_SIZE    24
#define INTC_INTREQ15                0x13c
# define INTC_INTREQ15_IREQUEST480_OFFSET 0
# define INTC_INTREQ15_IREQUEST480_SIZE 1
#define INTC_INTPR16                 0x40
# define INTC_INTPR16_INTLEV_OFFSET  30
# define INTC_INTPR16_INTLEV_SIZE    2
# define INTC_INTPR16_OFFSET_OFFSET  0
# define INTC_INTPR16_OFFSET_SIZE    24
#define INTC_INTREQ16                0x140
# define INTC_INTREQ16_IREQUEST512_OFFSET 0
# define INTC_INTREQ16_IREQUEST512_SIZE 1
#define INTC_INTPR17                 0x44
# define INTC_INTPR17_INTLEV_OFFSET  30
# define INTC_INTPR17_INTLEV_SIZE    2
# define INTC_INTPR17_OFFSET_OFFSET  0
# define INTC_INTPR17_OFFSET_SIZE    24
#define INTC_INTREQ17                0x144
# define INTC_INTREQ17_IREQUEST544_OFFSET 0
# define INTC_INTREQ17_IREQUEST544_SIZE 1
#define INTC_INTPR18                 0x48
# define INTC_INTPR18_INTLEV_OFFSET  30
# define INTC_INTPR18_INTLEV_SIZE    2
# define INTC_INTPR18_OFFSET_OFFSET  0
# define INTC_INTPR18_OFFSET_SIZE    24
#define INTC_INTREQ18                0x148
# define INTC_INTREQ18_IREQUEST576_OFFSET 0
# define INTC_INTREQ18_IREQUEST576_SIZE 1
#define INTC_INTPR19                 0x4c
# define INTC_INTPR19_INTLEV_OFFSET  30
# define INTC_INTPR19_INTLEV_SIZE    2
# define INTC_INTPR19_OFFSET_OFFSET  0
# define INTC_INTPR19_OFFSET_SIZE    24
#define INTC_INTREQ19                0x14c
# define INTC_INTREQ19_IREQUEST608_OFFSET 0
# define INTC_INTREQ19_IREQUEST608_SIZE 1
# define INTC_INTREQ19_IREQUEST609_OFFSET 1
# define INTC_INTREQ19_IREQUEST609_SIZE 1
# define INTC_INTREQ19_IREQUEST610_OFFSET 2
# define INTC_INTREQ19_IREQUEST610_SIZE 1
# define INTC_INTREQ19_IREQUEST611_OFFSET 3
# define INTC_INTREQ19_IREQUEST611_SIZE 1
#define INTC_INTPR20                 0x50
# define INTC_INTPR20_INTLEV_OFFSET  30
# define INTC_INTPR20_INTLEV_SIZE    2
# define INTC_INTPR20_OFFSET_OFFSET  0
# define INTC_INTPR20_OFFSET_SIZE    24
#define INTC_INTREQ20                0x150
# define INTC_INTREQ20_IREQUEST640_OFFSET 0
# define INTC_INTREQ20_IREQUEST640_SIZE 1
#define INTC_INTPR21                 0x54
# define INTC_INTPR21_INTLEV_OFFSET  30
# define INTC_INTPR21_INTLEV_SIZE    2
# define INTC_INTPR21_OFFSET_OFFSET  0
# define INTC_INTPR21_OFFSET_SIZE    24
#define INTC_INTREQ21                0x154
# define INTC_INTREQ21_IREQUEST672_OFFSET 0
# define INTC_INTREQ21_IREQUEST672_SIZE 1
#define INTC_INTPR22                 0x58
# define INTC_INTPR22_INTLEV_OFFSET  30
# define INTC_INTPR22_INTLEV_SIZE    2
# define INTC_INTPR22_OFFSET_OFFSET  0
# define INTC_INTPR22_OFFSET_SIZE    24
#define INTC_INTREQ22                0x158
# define INTC_INTREQ22_IREQUEST704_OFFSET 0
# define INTC_INTREQ22_IREQUEST704_SIZE 1
# define INTC_INTREQ22_IREQUEST705_OFFSET 1
# define INTC_INTREQ22_IREQUEST705_SIZE 1
# define INTC_INTREQ22_IREQUEST706_OFFSET 2
# define INTC_INTREQ22_IREQUEST706_SIZE 1
#define INTC_INTPR23                 0x5c
# define INTC_INTPR23_INTLEV_OFFSET  30
# define INTC_INTPR23_INTLEV_SIZE    2
# define INTC_INTPR23_OFFSET_OFFSET  0
# define INTC_INTPR23_OFFSET_SIZE    24
#define INTC_INTREQ23                0x15c
# define INTC_INTREQ23_IREQUEST736_OFFSET 0
# define INTC_INTREQ23_IREQUEST736_SIZE 1
# define INTC_INTREQ23_IREQUEST737_OFFSET 1
# define INTC_INTREQ23_IREQUEST737_SIZE 1
# define INTC_INTREQ23_IREQUEST738_OFFSET 2
# define INTC_INTREQ23_IREQUEST738_SIZE 1
#define INTC_INTPR24                 0x60
# define INTC_INTPR24_INTLEV_OFFSET  30
# define INTC_INTPR24_INTLEV_SIZE    2
# define INTC_INTPR24_OFFSET_OFFSET  0
# define INTC_INTPR24_OFFSET_SIZE    24
#define INTC_INTREQ24                0x160
# define INTC_INTREQ24_IREQUEST768_OFFSET 0
# define INTC_INTREQ24_IREQUEST768_SIZE 1
#define INTC_INTPR25                 0x64
# define INTC_INTPR25_INTLEV_OFFSET  30
# define INTC_INTPR25_INTLEV_SIZE    2
# define INTC_INTPR25_OFFSET_OFFSET  0
# define INTC_INTPR25_OFFSET_SIZE    24
#define INTC_INTREQ25                0x164
# define INTC_INTREQ25_IREQUEST800_OFFSET 0
# define INTC_INTREQ25_IREQUEST800_SIZE 1
#define INTC_INTPR26                 0x68
# define INTC_INTPR26_INTLEV_OFFSET  30
# define INTC_INTPR26_INTLEV_SIZE    2
# define INTC_INTPR26_OFFSET_OFFSET  0
# define INTC_INTPR26_OFFSET_SIZE    24
#define INTC_INTREQ26                0x168
# define INTC_INTREQ26_IREQUEST832_OFFSET 0
# define INTC_INTREQ26_IREQUEST832_SIZE 1
#define INTC_INTPR27                 0x6c
# define INTC_INTPR27_INTLEV_OFFSET  30
# define INTC_INTPR27_INTLEV_SIZE    2
# define INTC_INTPR27_OFFSET_OFFSET  0
# define INTC_INTPR27_OFFSET_SIZE    24
#define INTC_INTREQ27                0x16c
# define INTC_INTREQ27_IREQUEST864_OFFSET 0
# define INTC_INTREQ27_IREQUEST864_SIZE 1
#define INTC_INTPR28                 0x70
# define INTC_INTPR28_INTLEV_OFFSET  30
# define INTC_INTPR28_INTLEV_SIZE    2
# define INTC_INTPR28_OFFSET_OFFSET  0
# define INTC_INTPR28_OFFSET_SIZE    24
#define INTC_INTREQ28                0x170
# define INTC_INTREQ28_IREQUEST896_OFFSET 0
# define INTC_INTREQ28_IREQUEST896_SIZE 1
#define INTC_INTPR29                 0x74
# define INTC_INTPR29_INTLEV_OFFSET  30
# define INTC_INTPR29_INTLEV_SIZE    2
# define INTC_INTPR29_OFFSET_OFFSET  0
# define INTC_INTPR29_OFFSET_SIZE    24
#define INTC_INTREQ29                0x174
# define INTC_INTREQ29_IREQUEST928_OFFSET 0
# define INTC_INTREQ29_IREQUEST928_SIZE 1
#define INTC_INTPR30                 0x78
# define INTC_INTPR30_INTLEV_OFFSET  30
# define INTC_INTPR30_INTLEV_SIZE    2
# define INTC_INTPR30_OFFSET_OFFSET  0
# define INTC_INTPR30_OFFSET_SIZE    24
#define INTC_INTREQ30                0x178
# define INTC_INTREQ30_IREQUEST960_OFFSET 0
# define INTC_INTREQ30_IREQUEST960_SIZE 1
#define INTC_INTPR31                 0x7c
# define INTC_INTPR31_INTLEV_OFFSET  30
# define INTC_INTPR31_INTLEV_SIZE    2
# define INTC_INTPR31_OFFSET_OFFSET  0
# define INTC_INTPR31_OFFSET_SIZE    24
#define INTC_INTREQ31                0x17c
# define INTC_INTREQ31_IREQUEST992_OFFSET 0
# define INTC_INTREQ31_IREQUEST992_SIZE 1
#define INTC_INTPR32                 0x80
# define INTC_INTPR32_INTLEV_OFFSET  30
# define INTC_INTPR32_INTLEV_SIZE    2
# define INTC_INTPR32_OFFSET_OFFSET  0
# define INTC_INTPR32_OFFSET_SIZE    24
#define INTC_INTREQ32                0x180
# define INTC_INTREQ32_IREQUEST1024_OFFSET 0
# define INTC_INTREQ32_IREQUEST1024_SIZE 1
#define INTC_INTCAUSE0               0x20c
# define INTC_INTCAUSE0_CAUSEGRP_OFFSET 0
# define INTC_INTCAUSE0_CAUSEGRP_SIZE 6
#define INTC_INTCAUSE1               0x208
# define INTC_INTCAUSE1_CAUSEGRP_OFFSET 0
# define INTC_INTCAUSE1_CAUSEGRP_SIZE 6
#define INTC_INTCAUSE2               0x204
# define INTC_INTCAUSE2_CAUSEGRP_OFFSET 0
# define INTC_INTCAUSE2_CAUSEGRP_SIZE 6
#define INTC_INTCAUSE3               0x200
# define INTC_INTCAUSE3_CAUSEGRP_OFFSET 0
# define INTC_INTCAUSE3_CAUSEGRP_SIZE 6

#define INTC_BIT(name)               (1 << INTC_##name##_OFFSET)
#define INTC_MKBF(name, value)       (((value) & ((1 << INTC_##name##_SIZE) - 1)) << INTC_##name##_OFFSET)
#define INTC_GETBF(name, value)      (((value) >> INTC_##name##_OFFSET) & ((1 << INTC_##name##_SIZE) - 1))

#define intc_readl(port,reg)					\
	__raw_readl((port)->regs + INTC_##reg)
#define intc_writel(port,reg,value)				\
	__raw_writel((value), (port)->regs + INTC_##reg)

#endif /* __ASM_AVR32_PERIHP_INTC_H__ */