tx39icureg.h revision 1.1 1 1.1 uch /* $NetBSD: tx39icureg.h,v 1.1 1999/11/20 19:56:34 uch Exp $ */
2 1.1 uch
3 1.1 uch /*
4 1.1 uch * Copyright (c) 1999, by UCHIYAMA Yasushi
5 1.1 uch * All rights reserved.
6 1.1 uch *
7 1.1 uch * Redistribution and use in source and binary forms, with or without
8 1.1 uch * modification, are permitted provided that the following conditions
9 1.1 uch * are met:
10 1.1 uch * 1. Redistributions of source code must retain the above copyright
11 1.1 uch * notice, this list of conditions and the following disclaimer.
12 1.1 uch * 2. The name of the developer may NOT be used to endorse or promote products
13 1.1 uch * derived from this software without specific prior written permission.
14 1.1 uch *
15 1.1 uch * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 1.1 uch * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 1.1 uch * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 1.1 uch * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 1.1 uch * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 1.1 uch * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 1.1 uch * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 1.1 uch * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 1.1 uch * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 1.1 uch * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 1.1 uch * SUCH DAMAGE.
26 1.1 uch *
27 1.1 uch */
28 1.1 uch /*
29 1.1 uch * TOSHIBA TMPR3912/3922 interrupt module.
30 1.1 uch */
31 1.1 uch #ifdef TX391X
32 1.1 uch #define TX39_INTRSET_MAX 5
33 1.1 uch #endif /* TX391X */
34 1.1 uch #ifdef TX392X
35 1.1 uch #define TX39_INTRSET_MAX 8
36 1.1 uch #endif /* TX391X */
37 1.1 uch
38 1.1 uch #define TX39_IRQHIGH_MAX 16
39 1.1 uch /* R */
40 1.1 uch #define TX39_INTRSTATUS1_REG 0x100
41 1.1 uch #define TX39_INTRSTATUS2_REG 0x104
42 1.1 uch #define TX39_INTRSTATUS3_REG 0x108
43 1.1 uch #define TX39_INTRSTATUS4_REG 0x10c
44 1.1 uch #define TX39_INTRSTATUS5_REG 0x110
45 1.1 uch #define TX39_INTRSTATUS6_REG 0x114
46 1.1 uch #ifdef TX392X
47 1.1 uch #define TX39_INTRSTATUS7_REG 0x130
48 1.1 uch #define TX39_INTRSTATUS8_REG 0x138
49 1.1 uch #endif /* TX392X */
50 1.1 uch #ifdef TX391X
51 1.1 uch #define TX39_INTRSTATUS_REG(x) (((x) - 1) * 4 + TX39_INTRSTATUS1_REG)
52 1.1 uch #endif /* TX391X */
53 1.1 uch #ifdef TX392X
54 1.1 uch #define TX39_INTRSTATUS_REG(x) (((x) <= 6) ? \
55 1.1 uch (((x) - 1) * 4 + TX39_INTRSTATUS1_REG) : \
56 1.1 uch (((x) - 7) * 8 + TX39_INTRSTATUS7_REG))
57 1.1 uch #endif /* TX392X */
58 1.1 uch
59 1.1 uch /* W */
60 1.1 uch #define TX39_INTRCLEAR1_REG 0x100
61 1.1 uch #define TX39_INTRCLEAR2_REG 0x104
62 1.1 uch #define TX39_INTRCLEAR3_REG 0x108
63 1.1 uch #define TX39_INTRCLEAR4_REG 0x10c
64 1.1 uch #define TX39_INTRCLEAR5_REG 0x110
65 1.1 uch #ifdef TX392X
66 1.1 uch #define TX39_INTRCLEAR7_REG 0x130
67 1.1 uch #define TX39_INTRCLEAR8_REG 0x138
68 1.1 uch #endif /* TX392X */
69 1.1 uch #ifdef TX391X
70 1.1 uch #define TX39_INTRCLEAR_REG(x) (((x) - 1) * 4 + TX39_INTRCLEAR1_REG)
71 1.1 uch #endif /* TX391X */
72 1.1 uch #ifdef TX392X
73 1.1 uch #define TX39_INTRCLEAR_REG(x) (((x) <= 6) ? \
74 1.1 uch (((x) - 1) * 4 + TX39_INTRCLEAR1_REG) : \
75 1.1 uch (((x) - 7) * 8 + TX39_INTRCLEAR7_REG))
76 1.1 uch #endif /* TX392X */
77 1.1 uch
78 1.1 uch /* R/W */
79 1.1 uch #define TX39_INTRENABLE1_REG 0x118
80 1.1 uch #define TX39_INTRENABLE2_REG 0x11c
81 1.1 uch #define TX39_INTRENABLE3_REG 0x120
82 1.1 uch #define TX39_INTRENABLE4_REG 0x124
83 1.1 uch #define TX39_INTRENABLE5_REG 0x128
84 1.1 uch #define TX39_INTRENABLE6_REG 0x12c
85 1.1 uch #ifdef TX392X
86 1.1 uch #define TX39_INTRENABLE7_REG 0x134
87 1.1 uch #define TX39_INTRENABLE8_REG 0x13c
88 1.1 uch #endif /* TX392X */
89 1.1 uch #ifdef TX391X
90 1.1 uch #define TX39_INTRENABLE_REG(x) (((x) - 1) * 4 + TX39_INTRENABLE1_REG)
91 1.1 uch #endif /* TX391X */
92 1.1 uch #ifdef TX392X
93 1.1 uch #define TX39_INTRENABLE_REG(x) (((x) <= 6) ? \
94 1.1 uch (((x) - 1) * 4 + TX39_INTRENABLE1_REG) : \
95 1.1 uch (((x) - 7) * 8 + TX39_INTRENABLE7_REG))
96 1.1 uch #endif /* TX392X */
97 1.1 uch /*
98 1.1 uch * IRQLOW
99 1.1 uch */
100 1.1 uch /*
101 1.1 uch * Interrupt status/clear 1 register.
102 1.1 uch * -> Enable 1 register
103 1.1 uch */
104 1.1 uch /* R/W */
105 1.1 uch #ifdef TX391X
106 1.1 uch #define TX39_INTRSTATUS1_LCDINT 0x80000000
107 1.1 uch #define TX39_INTRSTATUS1_DFINT 0x40000000
108 1.1 uch #endif /* TX391X */
109 1.1 uch #define TX39_INTRSTATUS1_CHI0_5INT 0x20000000
110 1.1 uch #define TX39_INTRSTATUS1_CHI1_0INT 0x10000000
111 1.1 uch #define TX39_INTRSTATUS1_CHIDMACNTINT 0x08000000
112 1.1 uch #define TX39_INTRSTATUS1_CHININTA 0x04000000
113 1.1 uch #define TX39_INTRSTATUS1_CHININTB 0x02000000
114 1.1 uch #define TX39_INTRSTATUS1_CHIACTINT 0x01000000
115 1.1 uch #define TX39_INTRSTATUS1_CHIERRINT 0x00800000
116 1.1 uch #define TX39_INTRSTATUS1_SND0_5INT 0x00400000
117 1.1 uch #define TX39_INTRSTATUS1_SND1_0INT 0x00200000
118 1.1 uch #define TX39_INTRSTATUS1_TEL0_5INT 0x00100000
119 1.1 uch #define TX39_INTRSTATUS1_TEL1_0INT 0x00080000
120 1.1 uch #define TX39_INTRSTATUS1_SNDDMACNTINT 0x00040000
121 1.1 uch #define TX39_INTRSTATUS1_TELDMACNTINT 0x00020000
122 1.1 uch #define TX39_INTRSTATUS1_LSNDCLIPINT 0x00010000
123 1.1 uch #define TX39_INTRSTATUS1_RSNDCLIPINT 0x00008000
124 1.1 uch #define TX39_INTRSTATUS1_VALSNDPOSINT 0x00004000
125 1.1 uch #define TX39_INTRSTATUS1_VALSNDNEGINT 0x00002000
126 1.1 uch #define TX39_INTRSTATUS1_VALTELPOSINT 0x00001000
127 1.1 uch #define TX39_INTRSTATUS1_VALTELNEGINT 0x00000800
128 1.1 uch #define TX39_INTRSTATUS1_SNDININT 0x00000400
129 1.1 uch #define TX39_INTRSTATUS1_TELININT 0x00000200
130 1.1 uch #define TX39_INTRSTATUS1_SIBSF0INT 0x00000100
131 1.1 uch #define TX39_INTRSTATUS1_SIBSF1INT 0x00000080
132 1.1 uch #define TX39_INTRSTATUS1_SIBIRQPOSINT 0x00000040
133 1.1 uch #define TX39_INTRSTATUS1_SIBIRQNEGINT 0x00000020
134 1.1 uch
135 1.1 uch #ifdef TX391X
136 1.1 uch #define TX39_INTRSTATUS1_VIDEO 0xc0000000
137 1.1 uch #endif /* TX391X */
138 1.1 uch #define TX39_INTRSTATUS1_CHI 0x3f800000
139 1.1 uch #define TX39_INTRSTATUS1_SND 0x007ffe00
140 1.1 uch #define TX39_INTRSTATUS1_SIB 0x000001e0
141 1.1 uch
142 1.1 uch /*
143 1.1 uch * Interrupt status/clear 2 register.
144 1.1 uch * -> Enable 2 register
145 1.1 uch */
146 1.1 uch /* R/W */
147 1.1 uch #define TX39_INTRSTATUS2_UARTARXINT 0x80000000
148 1.1 uch #define TX39_INTRSTATUS2_UARTARXOVERRUNINT 0x40000000
149 1.1 uch #define TX39_INTRSTATUS2_UARTAFRAMEERRINT 0x20000000
150 1.1 uch #define TX39_INTRSTATUS2_UARTABREAKINT 0x10000000
151 1.1 uch #define TX39_INTRSTATUS2_UARTAPARITYERRINT 0x08000000
152 1.1 uch #define TX39_INTRSTATUS2_UARTATXINT 0x04000000
153 1.1 uch #define TX39_INTRSTATUS2_UARTATXOVERRUNINT 0x02000000
154 1.1 uch #define TX39_INTRSTATUS2_UARTAEMPTYINT 0x01000000
155 1.1 uch #define TX39_INTRSTATUS2_UARTADMAFULLINT 0x00800000
156 1.1 uch #define TX39_INTRSTATUS2_UARTADMAHALFINT 0x00400000
157 1.1 uch #define TX39_INTRSTATUS2_UARTBRXINT 0x00200000
158 1.1 uch #define TX39_INTRSTATUS2_UARTBRXOVERRUNINT 0x00100000
159 1.1 uch #define TX39_INTRSTATUS2_UARTBFRAMEERRINT 0x00080000
160 1.1 uch #define TX39_INTRSTATUS2_UARTBBREAKINT 0x00040000
161 1.1 uch #define TX39_INTRSTATUS2_UARTBPARITYERRINT 0x00020000
162 1.1 uch #define TX39_INTRSTATUS2_UARTBTXINT 0x00010000
163 1.1 uch #define TX39_INTRSTATUS2_UARTBTXOVERRUNINT 0x00008000
164 1.1 uch #define TX39_INTRSTATUS2_UARTBEMPTYINT 0x00004000
165 1.1 uch #define TX39_INTRSTATUS2_UARTBDMAFULLINT 0x00002000
166 1.1 uch #define TX39_INTRSTATUS2_UARTBDMAHALFINT 0x00001000
167 1.1 uch #ifdef TX391X
168 1.1 uch #define TX39_INTRSTATUS2_MBUSTXBUFAVAILINT 0x00000800
169 1.1 uch #define TX39_INTRSTATUS2_MBUSTXERRINT 0x00000400
170 1.1 uch #define TX39_INTRSTATUS2_MBUSEMPTYINT 0x00000200
171 1.1 uch #define TX39_INTRSTATUS2_MBUSRXBUFAVAILINT 0x00000100
172 1.1 uch #define TX39_INTRSTATUS2_MBUSRXERRINT 0x00000080
173 1.1 uch #define TX39_INTRSTATUS2_MBUSDETINT 0x00000040
174 1.1 uch #define TX39_INTRSTATUS2_MBUSDMAFULLINT 0x00000020
175 1.1 uch #define TX39_INTRSTATUS2_MBUSDMAHALFINT 0x00000010
176 1.1 uch #define TX39_INTRSTATUS2_MBUSPOSINT 0x00000008
177 1.1 uch #define TX39_INTRSTATUS2_MBUSNEGINT 0x00000004
178 1.1 uch #endif /* TX391X */
179 1.1 uch
180 1.1 uch #define TX39_INTRSTATUS2_UARTA 0xffc00000
181 1.1 uch #define TX39_INTRSTATUS2_UARTB 0x003ff000
182 1.1 uch #ifdef TX391X
183 1.1 uch #define TX39_INTRSTATUS2_MBUS 0x00000ffc
184 1.1 uch #endif /* TX391X */
185 1.1 uch /*
186 1.1 uch * Interrupt status/clear 3 register. (Multifunction I/O pin)
187 1.1 uch * -> Enable 3 register
188 1.1 uch */
189 1.1 uch /* R/W */
190 1.1 uch #define TX39_INTRSTATUS3_MFIOPOSINT(r) ((r) << 1)
191 1.1 uch
192 1.1 uch #define TX39_INTRSTATUS3_CHIFSPOSINT 0x80000000
193 1.1 uch #define TX39_INTRSTATUS3_CHICLKPOSINT 0x40000000
194 1.1 uch #define TX39_INTRSTATUS3_CHIDOUTPOSINT 0x20000000
195 1.1 uch #define TX39_INTRSTATUS3_CHIDINPOSINT 0x10000000
196 1.1 uch #define TX39_INTRSTATUS3_DREQPOSINT 0x08000000
197 1.1 uch #define TX39_INTRSTATUS3_DGRINTPOSINT 0x04000000
198 1.1 uch #define TX39_INTRSTATUS3_BC32KPOSINT 0x02000000
199 1.1 uch #define TX39_INTRSTATUS3_TXDPOSINT 0x01000000
200 1.1 uch #define TX39_INTRSTATUS3_RXDPOSINT 0x00800000
201 1.1 uch #define TX39_INTRSTATUS3_CS1POSINT 0x00400000
202 1.1 uch #define TX39_INTRSTATUS3_CS2POSINT 0x00200000
203 1.1 uch #define TX39_INTRSTATUS3_CS3POSINT 0x00100000
204 1.1 uch #define TX39_INTRSTATUS3_MCS0POSINT 0x00080000
205 1.1 uch #define TX39_INTRSTATUS3_MCS1POSINT 0x00040000
206 1.1 uch #define TX39_INTRSTATUS3_MCS2POSINT 0x00020000
207 1.1 uch #define TX39_INTRSTATUS3_MCS3POSINT 0x00010000
208 1.1 uch #define TX39_INTRSTATUS3_SPICLKPOSINT 0x00008000
209 1.1 uch #define TX39_INTRSTATUS3_SPIOUTPOSINT 0x00004000
210 1.1 uch #define TX39_INTRSTATUS3_SPINPOSINT 0x00002000
211 1.1 uch #define TX39_INTRSTATUS3_SIBMCLKPOSINT 0x00001000
212 1.1 uch #define TX39_INTRSTATUS3_CARDREGPOSINT 0x00000800
213 1.1 uch #define TX39_INTRSTATUS3_CARDIOWRPOSINT 0x00000400
214 1.1 uch #define TX39_INTRSTATUS3_CARDIORDPOSINT 0x00000200
215 1.1 uch #define TX39_INTRSTATUS3_CARD1CSLPOSINT 0x00000100
216 1.1 uch #define TX39_INTRSTATUS3_CARD1CSHPOSINT 0x00000080
217 1.1 uch #define TX39_INTRSTATUS3_CARD2CSLPOSINT 0x00000040
218 1.1 uch #define TX39_INTRSTATUS3_CARD2CSHPOSINT 0x00000020
219 1.1 uch #define TX39_INTRSTATUS3_CARD1WAITPOSINT 0x00000010
220 1.1 uch #define TX39_INTRSTATUS3_CARD2WAITPOSINT 0x00000008
221 1.1 uch #define TX39_INTRSTATUS3_CARDDIRPOSINT 0x00000004
222 1.1 uch
223 1.1 uch /*
224 1.1 uch * Interrupt status/clear 4 register. (Multifunction I/O pin)
225 1.1 uch * -> Enable 4 register
226 1.1 uch */
227 1.1 uch /* R/W */
228 1.1 uch #define TX39_INTRSTATUS4_MFIONEGINT(r) ((r) << 1)
229 1.1 uch
230 1.1 uch #define TX39_INTRSTATUS4_CHIFSNEGINT 0x80000000
231 1.1 uch #define TX39_INTRSTATUS4_CHICLKNEGINT 0x40000000
232 1.1 uch #define TX39_INTRSTATUS4_CHIDOUTNEGINT 0x20000000
233 1.1 uch #define TX39_INTRSTATUS4_CHIDINNEGINT 0x10000000
234 1.1 uch #define TX39_INTRSTATUS4_DREQNEGINT 0x08000000
235 1.1 uch #define TX39_INTRSTATUS4_DGRINTNEGINT 0x04000000
236 1.1 uch #define TX39_INTRSTATUS4_BC32KNEGINT 0x02000000
237 1.1 uch #define TX39_INTRSTATUS4_TXDNEGINT 0x01000000
238 1.1 uch #define TX39_INTRSTATUS4_RXDNEGINT 0x00800000
239 1.1 uch #define TX39_INTRSTATUS4_CS1NEGINT 0x00400000
240 1.1 uch #define TX39_INTRSTATUS4_CS2NEGINT 0x00200000
241 1.1 uch #define TX39_INTRSTATUS4_CS3NEGINT 0x00100000
242 1.1 uch #define TX39_INTRSTATUS4_MCS0NEGINT 0x00080000
243 1.1 uch #define TX39_INTRSTATUS4_MCS1NEGINT 0x00040000
244 1.1 uch #define TX39_INTRSTATUS4_MCS2NEGINT 0x00020000
245 1.1 uch #define TX39_INTRSTATUS4_MCS3NEGINT 0x00010000
246 1.1 uch #define TX39_INTRSTATUS4_SPICLKNEGINT 0x00008000
247 1.1 uch #define TX39_INTRSTATUS4_SPIOUTNEGINT 0x00004000
248 1.1 uch #define TX39_INTRSTATUS4_SPINNEGINT 0x00002000
249 1.1 uch #define TX39_INTRSTATUS4_SIBMCLKNEGINT 0x00001000
250 1.1 uch #define TX39_INTRSTATUS4_CARDREGNEGINT 0x00000800
251 1.1 uch #define TX39_INTRSTATUS4_CARDIOWRNEGINT 0x00000400
252 1.1 uch #define TX39_INTRSTATUS4_CARDIORDNEGINT 0x00000200
253 1.1 uch #define TX39_INTRSTATUS4_CARD1CSLNEGINT 0x00000100
254 1.1 uch #define TX39_INTRSTATUS4_CARD1CSHNEGINT 0x00000080
255 1.1 uch #define TX39_INTRSTATUS4_CARD2CSLNEGINT 0x00000040
256 1.1 uch #define TX39_INTRSTATUS4_CARD2CSHNEGINT 0x00000020
257 1.1 uch #define TX39_INTRSTATUS4_CARD1WAITNEGINT 0x00000010
258 1.1 uch #define TX39_INTRSTATUS4_CARD2WAITNEGINT 0x00000008
259 1.1 uch #define TX39_INTRSTATUS4_CARDDIRNEGINT 0x00000004
260 1.1 uch
261 1.1 uch /*
262 1.1 uch * Interrupt status/clear 5 register.
263 1.1 uch * -> Enable 5 register
264 1.1 uch */
265 1.1 uch /* R/W */
266 1.1 uch #define TX39_INTRSTATUS5_RTCINT 0x80000000
267 1.1 uch #define TX39_INTRSTATUS5_ALARMINT 0x40000000
268 1.1 uch #define TX39_INTRSTATUS5_PERINT 0x20000000
269 1.1 uch #define TX39_INTRSTATUS5_STPTIMERINT 0x10000000
270 1.1 uch #define TX39_INTRSTATUS5_POSPWRINT 0x08000000
271 1.1 uch #define TX39_INTRSTATUS5_NEGPWRINT 0x04000000
272 1.1 uch #define TX39_INTRSTATUS5_POSPWROKINT 0x02000000
273 1.1 uch #define TX39_INTRSTATUS5_NEGPWROKINT 0x01000000
274 1.1 uch #define TX39_INTRSTATUS5_POSONBUTNINT 0x00800000
275 1.1 uch #define TX39_INTRSTATUS5_NEGONBUTNINT 0x00400000
276 1.1 uch #define TX39_INTRSTATUS5_SPIBUFAVAILINT 0x00200000
277 1.1 uch #define TX39_INTRSTATUS5_SPIERRINT 0x00100000
278 1.1 uch #define TX39_INTRSTATUS5_SPIRCVINT 0x00080000
279 1.1 uch #define TX39_INTRSTATUS5_SPIEMPTYINT 0x00040000
280 1.1 uch #define TX39_INTRSTATUS5_IRCONSMINT 0x00020000
281 1.1 uch #define TX39_INTRSTATUS5_CARSTINT 0x00010000
282 1.1 uch #define TX39_INTRSTATUS5_POSCARINT 0x00008000
283 1.1 uch #define TX39_INTRSTATUS5_NEGCARINT 0x00004000
284 1.1 uch #ifdef TX391X
285 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT6 0x00002000
286 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT5 0x00001000
287 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT4 0x00000800
288 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT3 0x00000400
289 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT2 0x00000200
290 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT1 0x00000100
291 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT0 0x00000080
292 1.1 uch #define TX39_INTRSTATUS5_IONEGINT6 0x00000040
293 1.1 uch #define TX39_INTRSTATUS5_IONEGINT5 0x00000020
294 1.1 uch #define TX39_INTRSTATUS5_IONEGINT4 0x00000010
295 1.1 uch #define TX39_INTRSTATUS5_IONEGINT3 0x00000008
296 1.1 uch #define TX39_INTRSTATUS5_IONEGINT2 0x00000004
297 1.1 uch #define TX39_INTRSTATUS5_IONEGINT1 0x00000002
298 1.1 uch #define TX39_INTRSTATUS5_IONEGINT0 0x00000001
299 1.1 uch #endif /* TX391X */
300 1.1 uch
301 1.1 uch #define TX39_INTRSTATUS5_TIMER 0xe0000000
302 1.1 uch #define TX39_INTRSTATUS5_POWER 0x1fc00000
303 1.1 uch #define TX39_INTRSTATUS5_SPI 0x003c0000
304 1.1 uch #define TX39_INTRSTATUS5_IR 0x0003c000
305 1.1 uch #ifdef TX391X
306 1.1 uch #define TX39_INTRSTATUS5_IO 0x00003fff
307 1.1 uch
308 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT_SHIFT 7
309 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT_MASK 0x7f
310 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT(cr) \
311 1.1 uch (((cr) >> TX39_INTRSTATUS5_IOPOSINT_SHIFT) & \
312 1.1 uch TX39_INTRSTATUS5_IOPOSINT_MASK)
313 1.1 uch #define TX39_INTRSTATUS5_IOPOSINT_SET(cr, val) \
314 1.1 uch ((cr) | (((val) << TX39_INTRSTATUS5_IOPOSINT_SHIFT) & \
315 1.1 uch (TX39_INTRSTATUS5_IOPOSINT_MASK << TX39_INTRSTATUS5_IOPOSINT_SHIFT)))
316 1.1 uch
317 1.1 uch #define TX39_INTRSTATUS5_IONEGINT_SHIFT 0
318 1.1 uch #define TX39_INTRSTATUS5_IONEGINT_MASK 0x7f
319 1.1 uch #define TX39_INTRSTATUS5_IONEGINT(cr) \
320 1.1 uch (((cr) >> TX39_INTRSTATUS5_IONEGINT_SHIFT) & \
321 1.1 uch TX39_INTRSTATUS5_IONEGINT_MASK)
322 1.1 uch #define TX39_INTRSTATUS5_IONEGINT_SET(cr, val) \
323 1.1 uch ((cr) | (((val) << TX39_INTRSTATUS5_IONEGINT_SHIFT) & \
324 1.1 uch (TX39_INTRSTATUS5_IONEGINT_MASK << TX39_INTRSTATUS5_IONEGINT_SHIFT)))
325 1.1 uch #endif /* TX391X */
326 1.1 uch /*
327 1.1 uch * Interrupt status 6 register.
328 1.1 uch */
329 1.1 uch /* R */
330 1.1 uch #define TX39_INTRSTATUS6_IRQHIGH 0x80000000
331 1.1 uch #define TX39_INTRSTATUS6_IRQLOW 0x40000000
332 1.1 uch
333 1.1 uch #define TX39_INTRSTATUS6_INTVECT_SHIFT 2
334 1.1 uch #define TX39_INTRSTATUS6_INTVECT_MASK 0xf
335 1.1 uch #define TX39_INTRSTATUS6_INTVECT(cr) \
336 1.1 uch (((cr) >> TX39_INTRSTATUS6_INTVECT_SHIFT) & \
337 1.1 uch TX39_INTRSTATUS6_INTVECT_MASK)
338 1.1 uch
339 1.1 uch /*
340 1.1 uch * Interrupt enable 6 register.
341 1.1 uch */
342 1.1 uch /* R/W */
343 1.1 uch #define TX39_INTRENABLE6_GLOBALEN 0x00040000
344 1.1 uch
345 1.1 uch #define TX39_INTRENABLE6_PRIORITYMASK_SHIFT 0
346 1.1 uch #define TX39_INTRENABLE6_PRIORITYMASK_MASK 0xffff
347 1.1 uch #define TX39_INTRENABLE6_PRIORITYMASK(cr) \
348 1.1 uch (((cr) >> TX39_INTRENABLE6_PRIORITYMASK_SHIFT) & \
349 1.1 uch TX39_INTRENABLE6_PRIORITYMASK_MASK)
350 1.1 uch #define TX39_INTRENABLE6_PRIORITYMASK_SET(cr, val) \
351 1.1 uch ((cr) | (((val) << TX39_INTRENABLE6_PRIORITYMASK_SHIFT) & \
352 1.1 uch (TX39_INTRENABLE6_PRIORITYMASK_MASK << TX39_INTRENABLE6_PRIORITYMASK_SHIFT)))
353 1.1 uch
354 1.1 uch #ifdef TX392X
355 1.1 uch /*
356 1.1 uch * Interrupt Status 7 Register
357 1.1 uch */
358 1.1 uch #define TX3922_INTRSTATUS7_IRTXCINT 0x00100000
359 1.1 uch #define TX3922_INTRSTATUS7_IRRXCINT 0x00080000
360 1.1 uch #define TX3922_INTRSTATUS7_IRTXEINT 0x00040000
361 1.1 uch #define TX3922_INTRSTATUS7_IRRXEINT 0x00020000
362 1.1 uch #define TX3922_INTRSTATUS7_IRSIRPXINT 0x00010000
363 1.1 uch
364 1.1 uch /*
365 1.1 uch * Interrupt Status 8 Register
366 1.1 uch */
367 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT15 0x80000000
368 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT14 0x40000000
369 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT13 0x20000000
370 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT12 0x10000000
371 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT11 0x08000000
372 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT10 0x04000000
373 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT9 0x02000000
374 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT8 0x01000000
375 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT7 0x00800000
376 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT6 0x00400000
377 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT5 0x00200000
378 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT4 0x00100000
379 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT3 0x00080000
380 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT2 0x00040000
381 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT1 0x00020000
382 1.1 uch #define TX39_INTRSTATUS8_IOPOSINT0 0x00010000
383 1.1 uch #define TX39_INTRSTATUS8_IONEGINT15 0x00008000
384 1.1 uch #define TX39_INTRSTATUS8_IONEGINT14 0x00004000
385 1.1 uch #define TX39_INTRSTATUS8_IONEGINT13 0x00002000
386 1.1 uch #define TX39_INTRSTATUS8_IONEGINT12 0x00001000
387 1.1 uch #define TX39_INTRSTATUS8_IONEGINT11 0x00000800
388 1.1 uch #define TX39_INTRSTATUS8_IONEGINT10 0x00000400
389 1.1 uch #define TX39_INTRSTATUS8_IONEGINT9 0x00000200
390 1.1 uch #define TX39_INTRSTATUS8_IONEGINT8 0x00000100
391 1.1 uch #define TX39_INTRSTATUS8_IONEGINT7 0x00000080
392 1.1 uch #define TX39_INTRSTATUS8_IONEGINT6 0x00000040
393 1.1 uch #define TX39_INTRSTATUS8_IONEGINT5 0x00000020
394 1.1 uch #define TX39_INTRSTATUS8_IONEGINT4 0x00000010
395 1.1 uch #define TX39_INTRSTATUS8_IONEGINT3 0x00000008
396 1.1 uch #define TX39_INTRSTATUS8_IONEGINT2 0x00000004
397 1.1 uch #define TX39_INTRSTATUS8_IONEGINT1 0x00000002
398 1.1 uch #define TX39_INTRSTATUS8_IONEGINT0 0x00000001
399 1.1 uch
400 1.1 uch #define TX3922_INTRSTATUS8_IOPOSINT_SHIFT 16
401 1.1 uch #define TX3922_INTRSTATUS8_IOPOSINT_MASK 0xffff
402 1.1 uch #define TX3922_INTRSTATUS8_IOPOSINT(cr) \
403 1.1 uch (((cr) >> TX3922_INTRSTATUS8_IOPOSINT_SHIFT) & \
404 1.1 uch TX3922_INTRSTATUS8_IOPOSINT_MASK)
405 1.1 uch #define TX3922_INTRSTATUS8_IOPOSINT_SET(cr, val) \
406 1.1 uch ((cr) | (((val) << TX3922_INTRSTATUS8_IOPOSINT_SHIFT) & \
407 1.1 uch (TX3922_INTRSTATUS8_IOPOSINT_MASK << TX3922_INTRSTATUS8_IOPOSINT_SHIFT)))
408 1.1 uch
409 1.1 uch #define TX3922_INTRSTATUS8_IONEGINT_SHIFT 0
410 1.1 uch #define TX3922_INTRSTATUS8_IONEGINT_MASK 0xffff
411 1.1 uch #define TX3922_INTRSTATUS8_IONEGINT(cr) \
412 1.1 uch (((cr) >> TX3922_INTRSTATUS8_IONEGINT_SHIFT) & \
413 1.1 uch TX3922_INTRSTATUS8_IONEGINT_MASK)
414 1.1 uch #define TX3922_INTRSTATUS8_IONEGINT_SET(cr, val) \
415 1.1 uch ((cr) | (((val) << TX3922_INTRSTATUS8_IONEGINT_SHIFT) & \
416 1.1 uch (TX3922_INTRSTATUS8_IONEGINT_MASK << TX3922_INTRSTATUS8_IONEGINT_SHIFT)))
417 1.1 uch
418 1.1 uch #endif /* TX392X */
419 1.1 uch
420 1.1 uch
421 1.1 uch
422 1.1 uch /*
423 1.1 uch * IRQHIGH (Priority level interrupt)
424 1.1 uch */
425 1.1 uch #ifdef TX391X
426 1.1 uch #define TX39_INTRPRI15_PWROK_BIT 0x00008000
427 1.1 uch #define TX39_INTRPRI14_TIMER_ALARM_BIT 0x00004000
428 1.1 uch #define TX39_INTRPRI13_TIMER_PERIODIC_BIT 0x00002000
429 1.1 uch #define TX39_INTRPRI12_MBUS_BIT 0x00001000
430 1.1 uch #define TX39_INTRPRI11_UARTARX_BIT 0x00000800
431 1.1 uch #define TX39_INTRPRI10_UARTBRX_BIT 0x00000400
432 1.1 uch #define TX39_INTRPRI9_MFIO19_18_17_16POS_BIT 0x00000200
433 1.1 uch #define TX39_INTRPRI8_MFIO1_0_IO6_5POS_BIT 0x00000100
434 1.1 uch #define TX39_INTRPRI7_MFIO19_18_17_16NEG_BIT 0x00000080
435 1.1 uch #define TX39_INTRPRI6_MFIO1_0_IO6_5NEG_BIT 0x00000040
436 1.1 uch #define TX39_INTRPRI5_MBUSDMAFULL_BIT 0x00000020
437 1.1 uch #define TX39_INTRPRI4_SNDDMACNT_BIT 0x00000010
438 1.1 uch #define TX39_INTRPRI3_TELDMACNT_BIT 0x00000008
439 1.1 uch #define TX39_INTRPRI2_CHIDMACNT_BIT 0x00000004
440 1.1 uch #define TX39_INTRPRI1_IO0POSNEG_BIT 0x00000002
441 1.1 uch #define TX39_INTRPRI0_BIT 0x00000001
442 1.1 uch
443 1.1 uch #define TX39_INTRPRI15_PWROK 15
444 1.1 uch #define TX39_INTRPRI14_TIMER_ALARM 14
445 1.1 uch #define TX39_INTRPRI13_TIMER_PERIODIC 13
446 1.1 uch #define TX39_INTRPRI12_MBUS 12
447 1.1 uch #define TX39_INTRPRI11_UARTARX 11
448 1.1 uch #define TX39_INTRPRI10_UARTBRX 10
449 1.1 uch #define TX39_INTRPRI9_MFIO19_18_17_16POS 9
450 1.1 uch #define TX39_INTRPRI8_MFIO1_0_IO6_5POS 8
451 1.1 uch #define TX39_INTRPRI7_MFIO19_18_17_16NEG 7
452 1.1 uch #define TX39_INTRPRI6_MFIO1_0_IO6_5NEG 6
453 1.1 uch #define TX39_INTRPRI5_MBUSDMAFULL 5
454 1.1 uch #define TX39_INTRPRI4_SNDDMACNT 4
455 1.1 uch #define TX39_INTRPRI3_TELDMACNT 3
456 1.1 uch #define TX39_INTRPRI2_CHIDMACNT 2
457 1.1 uch #define TX39_INTRPRI1_IO0POSNEG 1
458 1.1 uch #define TX39_INTRPRI0 0
459 1.1 uch #endif /* TX391X */
460 1.1 uch
461 1.1 uch #ifdef TX392X
462 1.1 uch #define TX39_INTRPRI15_PWROK_BIT 0x00008000
463 1.1 uch #define TX39_INTRPRI14_TIMER_ALARM_BIT 0x00004000
464 1.1 uch #define TX39_INTRPRI13_TIMER_PERIODIC_BIT 0x00002000
465 1.1 uch #define TX39_INTRPRI12_UARTABRX_BIT 0x00001000
466 1.1 uch #define TX39_INTRPRI11_MFIO19_18_17_16POS_BIT 0x00000800
467 1.1 uch #define TX39_INTRPRI10_MFIO1_0_IO6_5POS_BIT 0x00000400
468 1.1 uch #define TX39_INTRPRI9_MFIO19_18_17_16NEG_BIT 0x00000200
469 1.1 uch #define TX39_INTRPRI8_MFIO1_0_IO6_5NEG_BIT 0x00000100
470 1.1 uch #define TX39_INTRPRI5_MBUSDMAFULL_BIT 0x00000020
471 1.1 uch #define TX39_INTRPRI4_SNDDMACNT_BIT 0x00000010
472 1.1 uch #define TX39_INTRPRI3_TELDMACNT_BIT 0x00000008
473 1.1 uch #define TX39_INTRPRI2_CHIDMACNT_BIT 0x00000004
474 1.1 uch #define TX39_INTRPRI1_IO0POSNEG_BIT 0x00000002
475 1.1 uch #define TX39_INTRPRI0_BIT 0x00000001
476 1.1 uch
477 1.1 uch #define TX39_INTRPRI15_PWROK 15
478 1.1 uch #define TX39_INTRPRI14_TIMER_ALARM 14
479 1.1 uch #define TX39_INTRPRI13_TIMER_PERIODIC 13
480 1.1 uch #define TX39_INTRPRI12_UARTABRX 12
481 1.1 uch #define TX39_INTRPRI11_MFIO19_18_17_16POS 11
482 1.1 uch #define TX39_INTRPRI10_MFIO1_0_IO6_5POS 10
483 1.1 uch #define TX39_INTRPRI9_MFIO19_18_17_16NEG 9
484 1.1 uch #define TX39_INTRPRI8_MFIO1_0_IO6_5NEG 8
485 1.1 uch #define TX39_INTRPRI5_IRRXCRXE 5
486 1.1 uch #define TX39_INTRPRI4_SNDDMACNT 4
487 1.1 uch #define TX39_INTRPRI3_TELDMACNT 3
488 1.1 uch #define TX39_INTRPRI2_CHIDMACNT 2
489 1.1 uch #define TX39_INTRPRI1_IO0POSNEG 1
490 1.1 uch #define TX39_INTRPRI0 0
491 1.1 uch #endif /* TX392X */
492 1.1 uch
493 1.1 uch /*
494 1.1 uch * CPU connection
495 1.1 uch */
496 1.1 uch #define TX39_INTRIRQHIGH_MIPS_HARD_INT 4
497 1.1 uch #define TX39_INTRIRQLOW_MIPS_HARD_INT 2
498