1
2
3
4
5
6
7
8
9
10
11
12 #ifndef TSI148_H
13 #define TSI148_H
14
15 #ifndef PCI_VENDOR_ID_TUNDRA
16 #define PCI_VENDOR_ID_TUNDRA 0x10e3
17 #endif
18
19 #ifndef PCI_DEVICE_ID_TUNDRA_TSI148
20 #define PCI_DEVICE_ID_TUNDRA_TSI148 0x148
21 #endif
22
23
24
25
26 #define TSI148_MAX_MASTER 8
27 #define TSI148_MAX_SLAVE 8
28 #define TSI148_MAX_DMA 2
29 #define TSI148_MAX_MAILBOX 4
30 #define TSI148_MAX_SEMAPHORE 8
31
32
33 struct tsi148_driver {
34 void __iomem *base;
35 wait_queue_head_t dma_queue[2];
36 wait_queue_head_t iack_queue;
37 void (*lm_callback[4])(void *);
38 void *lm_data[4];
39 void *crcsr_kernel;
40 dma_addr_t crcsr_bus;
41 struct vme_master_resource *flush_image;
42 struct mutex vme_rmw;
43 struct mutex vme_int;
44
45
46
47 };
48
49
50
51
52
53
54
55 struct tsi148_dma_descriptor {
56 __be32 dsau;
57 __be32 dsal;
58 __be32 ddau;
59 __be32 ddal;
60 __be32 dsat;
61 __be32 ddat;
62 __be32 dnlau;
63 __be32 dnlal;
64 __be32 dcnt;
65 __be32 ddbs;
66 };
67
68 struct tsi148_dma_entry {
69
70
71
72
73 struct tsi148_dma_descriptor descriptor;
74 struct list_head list;
75 dma_addr_t dma_handle;
76 };
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 #define TSI148_PCFS_ID 0x0
95 #define TSI148_PCFS_CSR 0x4
96 #define TSI148_PCFS_CLASS 0x8
97 #define TSI148_PCFS_MISC0 0xC
98 #define TSI148_PCFS_MBARL 0x10
99 #define TSI148_PCFS_MBARU 0x14
100
101 #define TSI148_PCFS_SUBID 0x28
102
103 #define TSI148_PCFS_CAPP 0x34
104
105 #define TSI148_PCFS_MISC1 0x3C
106
107 #define TSI148_PCFS_XCAPP 0x40
108 #define TSI148_PCFS_XSTAT 0x44
109
110
111
112
113
114
115
116
117 #define TSI148_LCSR_OT0_OTSAU 0x100
118 #define TSI148_LCSR_OT0_OTSAL 0x104
119 #define TSI148_LCSR_OT0_OTEAU 0x108
120 #define TSI148_LCSR_OT0_OTEAL 0x10C
121 #define TSI148_LCSR_OT0_OTOFU 0x110
122 #define TSI148_LCSR_OT0_OTOFL 0x114
123 #define TSI148_LCSR_OT0_OTBS 0x118
124 #define TSI148_LCSR_OT0_OTAT 0x11C
125
126 #define TSI148_LCSR_OT1_OTSAU 0x120
127 #define TSI148_LCSR_OT1_OTSAL 0x124
128 #define TSI148_LCSR_OT1_OTEAU 0x128
129 #define TSI148_LCSR_OT1_OTEAL 0x12C
130 #define TSI148_LCSR_OT1_OTOFU 0x130
131 #define TSI148_LCSR_OT1_OTOFL 0x134
132 #define TSI148_LCSR_OT1_OTBS 0x138
133 #define TSI148_LCSR_OT1_OTAT 0x13C
134
135 #define TSI148_LCSR_OT2_OTSAU 0x140
136 #define TSI148_LCSR_OT2_OTSAL 0x144
137 #define TSI148_LCSR_OT2_OTEAU 0x148
138 #define TSI148_LCSR_OT2_OTEAL 0x14C
139 #define TSI148_LCSR_OT2_OTOFU 0x150
140 #define TSI148_LCSR_OT2_OTOFL 0x154
141 #define TSI148_LCSR_OT2_OTBS 0x158
142 #define TSI148_LCSR_OT2_OTAT 0x15C
143
144 #define TSI148_LCSR_OT3_OTSAU 0x160
145 #define TSI148_LCSR_OT3_OTSAL 0x164
146 #define TSI148_LCSR_OT3_OTEAU 0x168
147 #define TSI148_LCSR_OT3_OTEAL 0x16C
148 #define TSI148_LCSR_OT3_OTOFU 0x170
149 #define TSI148_LCSR_OT3_OTOFL 0x174
150 #define TSI148_LCSR_OT3_OTBS 0x178
151 #define TSI148_LCSR_OT3_OTAT 0x17C
152
153 #define TSI148_LCSR_OT4_OTSAU 0x180
154 #define TSI148_LCSR_OT4_OTSAL 0x184
155 #define TSI148_LCSR_OT4_OTEAU 0x188
156 #define TSI148_LCSR_OT4_OTEAL 0x18C
157 #define TSI148_LCSR_OT4_OTOFU 0x190
158 #define TSI148_LCSR_OT4_OTOFL 0x194
159 #define TSI148_LCSR_OT4_OTBS 0x198
160 #define TSI148_LCSR_OT4_OTAT 0x19C
161
162 #define TSI148_LCSR_OT5_OTSAU 0x1A0
163 #define TSI148_LCSR_OT5_OTSAL 0x1A4
164 #define TSI148_LCSR_OT5_OTEAU 0x1A8
165 #define TSI148_LCSR_OT5_OTEAL 0x1AC
166 #define TSI148_LCSR_OT5_OTOFU 0x1B0
167 #define TSI148_LCSR_OT5_OTOFL 0x1B4
168 #define TSI148_LCSR_OT5_OTBS 0x1B8
169 #define TSI148_LCSR_OT5_OTAT 0x1BC
170
171 #define TSI148_LCSR_OT6_OTSAU 0x1C0
172 #define TSI148_LCSR_OT6_OTSAL 0x1C4
173 #define TSI148_LCSR_OT6_OTEAU 0x1C8
174 #define TSI148_LCSR_OT6_OTEAL 0x1CC
175 #define TSI148_LCSR_OT6_OTOFU 0x1D0
176 #define TSI148_LCSR_OT6_OTOFL 0x1D4
177 #define TSI148_LCSR_OT6_OTBS 0x1D8
178 #define TSI148_LCSR_OT6_OTAT 0x1DC
179
180 #define TSI148_LCSR_OT7_OTSAU 0x1E0
181 #define TSI148_LCSR_OT7_OTSAL 0x1E4
182 #define TSI148_LCSR_OT7_OTEAU 0x1E8
183 #define TSI148_LCSR_OT7_OTEAL 0x1EC
184 #define TSI148_LCSR_OT7_OTOFU 0x1F0
185 #define TSI148_LCSR_OT7_OTOFL 0x1F4
186 #define TSI148_LCSR_OT7_OTBS 0x1F8
187 #define TSI148_LCSR_OT7_OTAT 0x1FC
188
189 #define TSI148_LCSR_OT0 0x100
190 #define TSI148_LCSR_OT1 0x120
191 #define TSI148_LCSR_OT2 0x140
192 #define TSI148_LCSR_OT3 0x160
193 #define TSI148_LCSR_OT4 0x180
194 #define TSI148_LCSR_OT5 0x1A0
195 #define TSI148_LCSR_OT6 0x1C0
196 #define TSI148_LCSR_OT7 0x1E0
197
198 static const int TSI148_LCSR_OT[8] = { TSI148_LCSR_OT0, TSI148_LCSR_OT1,
199 TSI148_LCSR_OT2, TSI148_LCSR_OT3,
200 TSI148_LCSR_OT4, TSI148_LCSR_OT5,
201 TSI148_LCSR_OT6, TSI148_LCSR_OT7 };
202
203 #define TSI148_LCSR_OFFSET_OTSAU 0x0
204 #define TSI148_LCSR_OFFSET_OTSAL 0x4
205 #define TSI148_LCSR_OFFSET_OTEAU 0x8
206 #define TSI148_LCSR_OFFSET_OTEAL 0xC
207 #define TSI148_LCSR_OFFSET_OTOFU 0x10
208 #define TSI148_LCSR_OFFSET_OTOFL 0x14
209 #define TSI148_LCSR_OFFSET_OTBS 0x18
210 #define TSI148_LCSR_OFFSET_OTAT 0x1C
211
212
213
214
215
216 #define TSI148_LCSR_VIACK1 0x204
217 #define TSI148_LCSR_VIACK2 0x208
218 #define TSI148_LCSR_VIACK3 0x20C
219 #define TSI148_LCSR_VIACK4 0x210
220 #define TSI148_LCSR_VIACK5 0x214
221 #define TSI148_LCSR_VIACK6 0x218
222 #define TSI148_LCSR_VIACK7 0x21C
223
224 static const int TSI148_LCSR_VIACK[8] = { 0, TSI148_LCSR_VIACK1,
225 TSI148_LCSR_VIACK2, TSI148_LCSR_VIACK3,
226 TSI148_LCSR_VIACK4, TSI148_LCSR_VIACK5,
227 TSI148_LCSR_VIACK6, TSI148_LCSR_VIACK7 };
228
229
230
231
232
233 #define TSI148_LCSR_RMWAU 0x220
234 #define TSI148_LCSR_RMWAL 0x224
235 #define TSI148_LCSR_RMWEN 0x228
236 #define TSI148_LCSR_RMWC 0x22C
237 #define TSI148_LCSR_RMWS 0x230
238
239
240
241
242
243 #define TSI148_LCSR_VMCTRL 0x234
244 #define TSI148_LCSR_VCTRL 0x238
245 #define TSI148_LCSR_VSTAT 0x23C
246
247
248
249
250
251 #define TSI148_LCSR_PSTAT 0x240
252
253
254
255
256
257 #define TSI148_LCSR_VMEFL 0x250
258
259
260
261
262
263 #define TSI148_LCSR_VEAU 0x260
264 #define TSI148_LCSR_VEAL 0x264
265 #define TSI148_LCSR_VEAT 0x268
266
267
268
269
270
271 #define TSI148_LCSR_EDPAU 0x270
272 #define TSI148_LCSR_EDPAL 0x274
273 #define TSI148_LCSR_EDPXA 0x278
274 #define TSI148_LCSR_EDPXS 0x27C
275 #define TSI148_LCSR_EDPAT 0x280
276
277
278
279
280
281 #define TSI148_LCSR_IT0_ITSAU 0x300
282 #define TSI148_LCSR_IT0_ITSAL 0x304
283 #define TSI148_LCSR_IT0_ITEAU 0x308
284 #define TSI148_LCSR_IT0_ITEAL 0x30C
285 #define TSI148_LCSR_IT0_ITOFU 0x310
286 #define TSI148_LCSR_IT0_ITOFL 0x314
287 #define TSI148_LCSR_IT0_ITAT 0x318
288
289 #define TSI148_LCSR_IT1_ITSAU 0x320
290 #define TSI148_LCSR_IT1_ITSAL 0x324
291 #define TSI148_LCSR_IT1_ITEAU 0x328
292 #define TSI148_LCSR_IT1_ITEAL 0x32C
293 #define TSI148_LCSR_IT1_ITOFU 0x330
294 #define TSI148_LCSR_IT1_ITOFL 0x334
295 #define TSI148_LCSR_IT1_ITAT 0x338
296
297 #define TSI148_LCSR_IT2_ITSAU 0x340
298 #define TSI148_LCSR_IT2_ITSAL 0x344
299 #define TSI148_LCSR_IT2_ITEAU 0x348
300 #define TSI148_LCSR_IT2_ITEAL 0x34C
301 #define TSI148_LCSR_IT2_ITOFU 0x350
302 #define TSI148_LCSR_IT2_ITOFL 0x354
303 #define TSI148_LCSR_IT2_ITAT 0x358
304
305 #define TSI148_LCSR_IT3_ITSAU 0x360
306 #define TSI148_LCSR_IT3_ITSAL 0x364
307 #define TSI148_LCSR_IT3_ITEAU 0x368
308 #define TSI148_LCSR_IT3_ITEAL 0x36C
309 #define TSI148_LCSR_IT3_ITOFU 0x370
310 #define TSI148_LCSR_IT3_ITOFL 0x374
311 #define TSI148_LCSR_IT3_ITAT 0x378
312
313 #define TSI148_LCSR_IT4_ITSAU 0x380
314 #define TSI148_LCSR_IT4_ITSAL 0x384
315 #define TSI148_LCSR_IT4_ITEAU 0x388
316 #define TSI148_LCSR_IT4_ITEAL 0x38C
317 #define TSI148_LCSR_IT4_ITOFU 0x390
318 #define TSI148_LCSR_IT4_ITOFL 0x394
319 #define TSI148_LCSR_IT4_ITAT 0x398
320
321 #define TSI148_LCSR_IT5_ITSAU 0x3A0
322 #define TSI148_LCSR_IT5_ITSAL 0x3A4
323 #define TSI148_LCSR_IT5_ITEAU 0x3A8
324 #define TSI148_LCSR_IT5_ITEAL 0x3AC
325 #define TSI148_LCSR_IT5_ITOFU 0x3B0
326 #define TSI148_LCSR_IT5_ITOFL 0x3B4
327 #define TSI148_LCSR_IT5_ITAT 0x3B8
328
329 #define TSI148_LCSR_IT6_ITSAU 0x3C0
330 #define TSI148_LCSR_IT6_ITSAL 0x3C4
331 #define TSI148_LCSR_IT6_ITEAU 0x3C8
332 #define TSI148_LCSR_IT6_ITEAL 0x3CC
333 #define TSI148_LCSR_IT6_ITOFU 0x3D0
334 #define TSI148_LCSR_IT6_ITOFL 0x3D4
335 #define TSI148_LCSR_IT6_ITAT 0x3D8
336
337 #define TSI148_LCSR_IT7_ITSAU 0x3E0
338 #define TSI148_LCSR_IT7_ITSAL 0x3E4
339 #define TSI148_LCSR_IT7_ITEAU 0x3E8
340 #define TSI148_LCSR_IT7_ITEAL 0x3EC
341 #define TSI148_LCSR_IT7_ITOFU 0x3F0
342 #define TSI148_LCSR_IT7_ITOFL 0x3F4
343 #define TSI148_LCSR_IT7_ITAT 0x3F8
344
345
346 #define TSI148_LCSR_IT0 0x300
347 #define TSI148_LCSR_IT1 0x320
348 #define TSI148_LCSR_IT2 0x340
349 #define TSI148_LCSR_IT3 0x360
350 #define TSI148_LCSR_IT4 0x380
351 #define TSI148_LCSR_IT5 0x3A0
352 #define TSI148_LCSR_IT6 0x3C0
353 #define TSI148_LCSR_IT7 0x3E0
354
355 static const int TSI148_LCSR_IT[8] = { TSI148_LCSR_IT0, TSI148_LCSR_IT1,
356 TSI148_LCSR_IT2, TSI148_LCSR_IT3,
357 TSI148_LCSR_IT4, TSI148_LCSR_IT5,
358 TSI148_LCSR_IT6, TSI148_LCSR_IT7 };
359
360 #define TSI148_LCSR_OFFSET_ITSAU 0x0
361 #define TSI148_LCSR_OFFSET_ITSAL 0x4
362 #define TSI148_LCSR_OFFSET_ITEAU 0x8
363 #define TSI148_LCSR_OFFSET_ITEAL 0xC
364 #define TSI148_LCSR_OFFSET_ITOFU 0x10
365 #define TSI148_LCSR_OFFSET_ITOFL 0x14
366 #define TSI148_LCSR_OFFSET_ITAT 0x18
367
368
369
370
371
372 #define TSI148_LCSR_GBAU 0x400
373 #define TSI148_LCSR_GBAL 0x404
374 #define TSI148_LCSR_GCSRAT 0x408
375
376
377
378
379
380 #define TSI148_LCSR_CBAU 0x40C
381 #define TSI148_LCSR_CBAL 0x410
382 #define TSI148_LCSR_CSRAT 0x414
383
384
385
386
387
388
389 #define TSI148_LCSR_CROU 0x418
390 #define TSI148_LCSR_CROL 0x41C
391 #define TSI148_LCSR_CRAT 0x420
392
393
394
395
396
397 #define TSI148_LCSR_LMBAU 0x424
398 #define TSI148_LCSR_LMBAL 0x428
399 #define TSI148_LCSR_LMAT 0x42C
400
401
402
403
404
405 #define TSI148_LCSR_BCU 0x430
406 #define TSI148_LCSR_BCL 0x434
407 #define TSI148_LCSR_BPGTR 0x438
408 #define TSI148_LCSR_BPCTR 0x43C
409 #define TSI148_LCSR_VICR 0x440
410
411
412
413
414
415 #define TSI148_LCSR_INTEN 0x448
416 #define TSI148_LCSR_INTEO 0x44C
417 #define TSI148_LCSR_INTS 0x450
418 #define TSI148_LCSR_INTC 0x454
419 #define TSI148_LCSR_INTM1 0x458
420 #define TSI148_LCSR_INTM2 0x45C
421
422
423
424
425
426 #define TSI148_LCSR_DCTL0 0x500
427 #define TSI148_LCSR_DSTA0 0x504
428 #define TSI148_LCSR_DCSAU0 0x508
429 #define TSI148_LCSR_DCSAL0 0x50C
430 #define TSI148_LCSR_DCDAU0 0x510
431 #define TSI148_LCSR_DCDAL0 0x514
432 #define TSI148_LCSR_DCLAU0 0x518
433 #define TSI148_LCSR_DCLAL0 0x51C
434 #define TSI148_LCSR_DSAU0 0x520
435 #define TSI148_LCSR_DSAL0 0x524
436 #define TSI148_LCSR_DDAU0 0x528
437 #define TSI148_LCSR_DDAL0 0x52C
438 #define TSI148_LCSR_DSAT0 0x530
439 #define TSI148_LCSR_DDAT0 0x534
440 #define TSI148_LCSR_DNLAU0 0x538
441 #define TSI148_LCSR_DNLAL0 0x53C
442 #define TSI148_LCSR_DCNT0 0x540
443 #define TSI148_LCSR_DDBS0 0x544
444
445 #define TSI148_LCSR_DCTL1 0x580
446 #define TSI148_LCSR_DSTA1 0x584
447 #define TSI148_LCSR_DCSAU1 0x588
448 #define TSI148_LCSR_DCSAL1 0x58C
449 #define TSI148_LCSR_DCDAU1 0x590
450 #define TSI148_LCSR_DCDAL1 0x594
451 #define TSI148_LCSR_DCLAU1 0x598
452 #define TSI148_LCSR_DCLAL1 0x59C
453 #define TSI148_LCSR_DSAU1 0x5A0
454 #define TSI148_LCSR_DSAL1 0x5A4
455 #define TSI148_LCSR_DDAU1 0x5A8
456 #define TSI148_LCSR_DDAL1 0x5AC
457 #define TSI148_LCSR_DSAT1 0x5B0
458 #define TSI148_LCSR_DDAT1 0x5B4
459 #define TSI148_LCSR_DNLAU1 0x5B8
460 #define TSI148_LCSR_DNLAL1 0x5BC
461 #define TSI148_LCSR_DCNT1 0x5C0
462 #define TSI148_LCSR_DDBS1 0x5C4
463
464 #define TSI148_LCSR_DMA0 0x500
465 #define TSI148_LCSR_DMA1 0x580
466
467
468 static const int TSI148_LCSR_DMA[TSI148_MAX_DMA] = { TSI148_LCSR_DMA0,
469 TSI148_LCSR_DMA1 };
470
471 #define TSI148_LCSR_OFFSET_DCTL 0x0
472 #define TSI148_LCSR_OFFSET_DSTA 0x4
473 #define TSI148_LCSR_OFFSET_DCSAU 0x8
474 #define TSI148_LCSR_OFFSET_DCSAL 0xC
475 #define TSI148_LCSR_OFFSET_DCDAU 0x10
476 #define TSI148_LCSR_OFFSET_DCDAL 0x14
477 #define TSI148_LCSR_OFFSET_DCLAU 0x18
478 #define TSI148_LCSR_OFFSET_DCLAL 0x1C
479 #define TSI148_LCSR_OFFSET_DSAU 0x20
480 #define TSI148_LCSR_OFFSET_DSAL 0x24
481 #define TSI148_LCSR_OFFSET_DDAU 0x28
482 #define TSI148_LCSR_OFFSET_DDAL 0x2C
483 #define TSI148_LCSR_OFFSET_DSAT 0x30
484 #define TSI148_LCSR_OFFSET_DDAT 0x34
485 #define TSI148_LCSR_OFFSET_DNLAU 0x38
486 #define TSI148_LCSR_OFFSET_DNLAL 0x3C
487 #define TSI148_LCSR_OFFSET_DCNT 0x40
488 #define TSI148_LCSR_OFFSET_DDBS 0x44
489
490
491
492
493
494
495
496
497
498
499
500
501 #define TSI148_GCSR_ID 0x600
502 #define TSI148_GCSR_CSR 0x604
503 #define TSI148_GCSR_SEMA0 0x608
504 #define TSI148_GCSR_SEMA1 0x60C
505
506
507
508
509
510
511 #define TSI148_GCSR_MBOX0 0x610
512 #define TSI148_GCSR_MBOX1 0x614
513 #define TSI148_GCSR_MBOX2 0x618
514 #define TSI148_GCSR_MBOX3 0x61C
515
516 static const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0,
517 TSI148_GCSR_MBOX1,
518 TSI148_GCSR_MBOX2,
519 TSI148_GCSR_MBOX3 };
520
521
522
523
524
525
526
527
528
529
530
531 #define TSI148_CSRBCR 0xFF4
532 #define TSI148_CSRBSR 0xFF8
533 #define TSI148_CBAR 0xFFC
534
535
536
537
538
539
540
541
542
543
544
545 #define TSI148_PCFS_CMMD_SERR (1<<8)
546 #define TSI148_PCFS_CMMD_PERR (1<<6)
547 #define TSI148_PCFS_CMMD_MSTR (1<<2)
548 #define TSI148_PCFS_CMMD_MEMSP (1<<1)
549 #define TSI148_PCFS_CMMD_IOSP (1<<0)
550
551 #define TSI148_PCFS_STAT_RCPVE (1<<15)
552 #define TSI148_PCFS_STAT_SIGSE (1<<14)
553 #define TSI148_PCFS_STAT_RCVMA (1<<13)
554 #define TSI148_PCFS_STAT_RCVTA (1<<12)
555 #define TSI148_PCFS_STAT_SIGTA (1<<11)
556 #define TSI148_PCFS_STAT_SELTIM (3<<9)
557 #define TSI148_PCFS_STAT_DPAR (1<<8)
558 #define TSI148_PCFS_STAT_FAST (1<<7)
559 #define TSI148_PCFS_STAT_P66M (1<<5)
560 #define TSI148_PCFS_STAT_CAPL (1<<4)
561
562
563
564
565 #define TSI148_PCFS_CLAS_M (0xFF<<24)
566 #define TSI148_PCFS_SUBCLAS_M (0xFF<<16)
567 #define TSI148_PCFS_PROGIF_M (0xFF<<8)
568 #define TSI148_PCFS_REVID_M (0xFF<<0)
569
570
571
572
573 #define TSI148_PCFS_HEAD_M (0xFF<<16)
574 #define TSI148_PCFS_MLAT_M (0xFF<<8)
575 #define TSI148_PCFS_CLSZ_M (0xFF<<0)
576
577
578
579
580 #define TSI148_PCFS_MBARL_BASEL_M (0xFFFFF<<12)
581 #define TSI148_PCFS_MBARL_PRE (1<<3)
582 #define TSI148_PCFS_MBARL_MTYPE_M (3<<1)
583 #define TSI148_PCFS_MBARL_IOMEM (1<<0)
584
585
586
587
588 #define TSI148_PCFS_MSICAP_64BAC (1<<7)
589 #define TSI148_PCFS_MSICAP_MME_M (7<<4)
590 #define TSI148_PCFS_MSICAP_MMC_M (7<<1)
591 #define TSI148_PCFS_MSICAP_MSIEN (1<<0)
592
593
594
595
596 #define TSI148_PCFS_MSIAL_M (0x3FFFFFFF<<2)
597
598
599
600
601 #define TSI148_PCFS_MSIMD_M (0xFFFF<<0)
602
603
604
605
606 #define TSI148_PCFS_PCIXCAP_MOST_M (7<<4)
607 #define TSI148_PCFS_PCIXCAP_MMRBC_M (3<<2)
608 #define TSI148_PCFS_PCIXCAP_ERO (1<<1)
609 #define TSI148_PCFS_PCIXCAP_DPERE (1<<0)
610
611
612
613
614 #define TSI148_PCFS_PCIXSTAT_RSCEM (1<<29)
615 #define TSI148_PCFS_PCIXSTAT_DMCRS_M (7<<26)
616 #define TSI148_PCFS_PCIXSTAT_DMOST_M (7<<23)
617
618 #define TSI148_PCFS_PCIXSTAT_DMMRC_M (3<<21)
619 #define TSI148_PCFS_PCIXSTAT_DC (1<<20)
620 #define TSI148_PCFS_PCIXSTAT_USC (1<<19)
621 #define TSI148_PCFS_PCIXSTAT_SCD (1<<18)
622 #define TSI148_PCFS_PCIXSTAT_133C (1<<17)
623 #define TSI148_PCFS_PCIXSTAT_64D (1<<16)
624 #define TSI148_PCFS_PCIXSTAT_BN_M (0xFF<<8)
625 #define TSI148_PCFS_PCIXSTAT_DN_M (0x1F<<3)
626 #define TSI148_PCFS_PCIXSTAT_FN_M (7<<0)
627
628
629
630
631
632
633
634
635 #define TSI148_LCSR_OTSAL_M (0xFFFF<<16)
636
637
638
639
640 #define TSI148_LCSR_OTEAL_M (0xFFFF<<16)
641
642
643
644
645 #define TSI148_LCSR_OTOFFL_M (0xFFFF<<16)
646
647
648
649
650 #define TSI148_LCSR_OTBS_M (0xFFFFF<<0)
651
652
653
654
655 #define TSI148_LCSR_OTAT_EN (1<<31)
656 #define TSI148_LCSR_OTAT_MRPFD (1<<18)
657
658 #define TSI148_LCSR_OTAT_PFS_M (3<<16)
659 #define TSI148_LCSR_OTAT_PFS_2 (0<<16)
660 #define TSI148_LCSR_OTAT_PFS_4 (1<<16)
661 #define TSI148_LCSR_OTAT_PFS_8 (2<<16)
662 #define TSI148_LCSR_OTAT_PFS_16 (3<<16)
663
664 #define TSI148_LCSR_OTAT_2eSSTM_M (7<<11)
665 #define TSI148_LCSR_OTAT_2eSSTM_160 (0<<11)
666 #define TSI148_LCSR_OTAT_2eSSTM_267 (1<<11)
667 #define TSI148_LCSR_OTAT_2eSSTM_320 (2<<11)
668
669 #define TSI148_LCSR_OTAT_TM_M (7<<8)
670 #define TSI148_LCSR_OTAT_TM_SCT (0<<8)
671 #define TSI148_LCSR_OTAT_TM_BLT (1<<8)
672 #define TSI148_LCSR_OTAT_TM_MBLT (2<<8)
673 #define TSI148_LCSR_OTAT_TM_2eVME (3<<8)
674 #define TSI148_LCSR_OTAT_TM_2eSST (4<<8)
675 #define TSI148_LCSR_OTAT_TM_2eSSTB (5<<8)
676
677 #define TSI148_LCSR_OTAT_DBW_M (3<<6)
678 #define TSI148_LCSR_OTAT_DBW_16 (0<<6)
679 #define TSI148_LCSR_OTAT_DBW_32 (1<<6)
680
681 #define TSI148_LCSR_OTAT_SUP (1<<5)
682 #define TSI148_LCSR_OTAT_PGM (1<<4)
683
684 #define TSI148_LCSR_OTAT_AMODE_M (0xf<<0)
685 #define TSI148_LCSR_OTAT_AMODE_A16 (0<<0)
686 #define TSI148_LCSR_OTAT_AMODE_A24 (1<<0)
687 #define TSI148_LCSR_OTAT_AMODE_A32 (2<<0)
688 #define TSI148_LCSR_OTAT_AMODE_A64 (4<<0)
689 #define TSI148_LCSR_OTAT_AMODE_CRCSR (5<<0)
690 #define TSI148_LCSR_OTAT_AMODE_USER1 (8<<0)
691 #define TSI148_LCSR_OTAT_AMODE_USER2 (9<<0)
692 #define TSI148_LCSR_OTAT_AMODE_USER3 (10<<0)
693 #define TSI148_LCSR_OTAT_AMODE_USER4 (11<<0)
694
695
696
697
698 #define TSI148_LCSR_VMCTRL_VSA (1<<27)
699 #define TSI148_LCSR_VMCTRL_VS (1<<26)
700 #define TSI148_LCSR_VMCTRL_DHB (1<<25)
701 #define TSI148_LCSR_VMCTRL_DWB (1<<24)
702
703 #define TSI148_LCSR_VMCTRL_RMWEN (1<<20)
704
705 #define TSI148_LCSR_VMCTRL_ATO_M (7<<16)
706
707 #define TSI148_LCSR_VMCTRL_ATO_32 (0<<16)
708 #define TSI148_LCSR_VMCTRL_ATO_128 (1<<16)
709 #define TSI148_LCSR_VMCTRL_ATO_512 (2<<16)
710 #define TSI148_LCSR_VMCTRL_ATO_2M (3<<16)
711 #define TSI148_LCSR_VMCTRL_ATO_8M (4<<16)
712 #define TSI148_LCSR_VMCTRL_ATO_32M (5<<16)
713 #define TSI148_LCSR_VMCTRL_ATO_128M (6<<16)
714 #define TSI148_LCSR_VMCTRL_ATO_DIS (7<<16)
715
716 #define TSI148_LCSR_VMCTRL_VTOFF_M (7<<12)
717 #define TSI148_LCSR_VMCTRL_VTOFF_0 (0<<12)
718 #define TSI148_LCSR_VMCTRL_VTOFF_1 (1<<12)
719 #define TSI148_LCSR_VMCTRL_VTOFF_2 (2<<12)
720 #define TSI148_LCSR_VMCTRL_VTOFF_4 (3<<12)
721 #define TSI148_LCSR_VMCTRL_VTOFF_8 (4<<12)
722 #define TSI148_LCSR_VMCTRL_VTOFF_16 (5<<12)
723 #define TSI148_LCSR_VMCTRL_VTOFF_32 (6<<12)
724 #define TSI148_LCSR_VMCTRL_VTOFF_64 (7<<12)
725
726 #define TSI148_LCSR_VMCTRL_VTON_M (7<<8)
727 #define TSI148_LCSR_VMCTRL_VTON_4 (0<<8)
728 #define TSI148_LCSR_VMCTRL_VTON_8 (1<<8)
729 #define TSI148_LCSR_VMCTRL_VTON_16 (2<<8)
730 #define TSI148_LCSR_VMCTRL_VTON_32 (3<<8)
731 #define TSI148_LCSR_VMCTRL_VTON_64 (4<<8)
732 #define TSI148_LCSR_VMCTRL_VTON_128 (5<<8)
733 #define TSI148_LCSR_VMCTRL_VTON_256 (6<<8)
734 #define TSI148_LCSR_VMCTRL_VTON_512 (7<<8)
735
736 #define TSI148_LCSR_VMCTRL_VREL_M (3<<3)
737
738 #define TSI148_LCSR_VMCTRL_VREL_T_D (0<<3)
739 #define TSI148_LCSR_VMCTRL_VREL_T_R_D (1<<3)
740 #define TSI148_LCSR_VMCTRL_VREL_T_B_D (2<<3)
741 #define TSI148_LCSR_VMCTRL_VREL_T_D_R (3<<3)
742
743 #define TSI148_LCSR_VMCTRL_VFAIR (1<<2)
744 #define TSI148_LCSR_VMCTRL_VREQL_M (3<<0)
745
746
747
748
749
750 #define TSI148_LCSR_VCTRL_LRE (1<<31)
751
752 #define TSI148_LCSR_VCTRL_DLT_M (0xF<<24)
753 #define TSI148_LCSR_VCTRL_DLT_OFF (0<<24)
754 #define TSI148_LCSR_VCTRL_DLT_16 (1<<24)
755 #define TSI148_LCSR_VCTRL_DLT_32 (2<<24)
756 #define TSI148_LCSR_VCTRL_DLT_64 (3<<24)
757 #define TSI148_LCSR_VCTRL_DLT_128 (4<<24)
758 #define TSI148_LCSR_VCTRL_DLT_256 (5<<24)
759 #define TSI148_LCSR_VCTRL_DLT_512 (6<<24)
760 #define TSI148_LCSR_VCTRL_DLT_1024 (7<<24)
761 #define TSI148_LCSR_VCTRL_DLT_2048 (8<<24)
762 #define TSI148_LCSR_VCTRL_DLT_4096 (9<<24)
763 #define TSI148_LCSR_VCTRL_DLT_8192 (0xA<<24)
764 #define TSI148_LCSR_VCTRL_DLT_16384 (0xB<<24)
765 #define TSI148_LCSR_VCTRL_DLT_32768 (0xC<<24)
766
767 #define TSI148_LCSR_VCTRL_NERBB (1<<20)
768
769
770 #define TSI148_LCSR_VCTRL_SRESET (1<<17)
771 #define TSI148_LCSR_VCTRL_LRESET (1<<16)
772
773 #define TSI148_LCSR_VCTRL_SFAILAI (1<<15)
774 #define TSI148_LCSR_VCTRL_BID_M (0x1F<<8)
775
776 #define TSI148_LCSR_VCTRL_ATOEN (1<<7)
777 #define TSI148_LCSR_VCTRL_ROBIN (1<<6)
778
779 #define TSI148_LCSR_VCTRL_GTO_M (7<<0)
780
781 #define TSI148_LCSR_VCTRL_GTO_8 (0<<0)
782 #define TSI148_LCSR_VCTRL_GTO_16 (1<<0)
783 #define TSI148_LCSR_VCTRL_GTO_32 (2<<0)
784 #define TSI148_LCSR_VCTRL_GTO_64 (3<<0)
785 #define TSI148_LCSR_VCTRL_GTO_128 (4<<0)
786 #define TSI148_LCSR_VCTRL_GTO_256 (5<<0)
787 #define TSI148_LCSR_VCTRL_GTO_512 (6<<0)
788 #define TSI148_LCSR_VCTRL_GTO_DIS (7<<0)
789
790
791
792
793 #define TSI148_LCSR_VSTAT_CPURST (1<<15)
794 #define TSI148_LCSR_VSTAT_BRDFL (1<<14)
795 #define TSI148_LCSR_VSTAT_PURSTS (1<<12)
796 #define TSI148_LCSR_VSTAT_BDFAILS (1<<11)
797 #define TSI148_LCSR_VSTAT_SYSFAILS (1<<10)
798 #define TSI148_LCSR_VSTAT_ACFAILS (1<<9)
799 #define TSI148_LCSR_VSTAT_SCONS (1<<8)
800 #define TSI148_LCSR_VSTAT_GAP (1<<5)
801 #define TSI148_LCSR_VSTAT_GA_M (0x1F<<0)
802
803
804
805
806 #define TSI148_LCSR_PSTAT_REQ64S (1<<6)
807 #define TSI148_LCSR_PSTAT_M66ENS (1<<5)
808 #define TSI148_LCSR_PSTAT_FRAMES (1<<4)
809 #define TSI148_LCSR_PSTAT_IRDYS (1<<3)
810 #define TSI148_LCSR_PSTAT_DEVSELS (1<<2)
811 #define TSI148_LCSR_PSTAT_STOPS (1<<1)
812 #define TSI148_LCSR_PSTAT_TRDYS (1<<0)
813
814
815
816
817 #define TSI148_LCSR_VEAT_VES (1<<31)
818 #define TSI148_LCSR_VEAT_VEOF (1<<30)
819 #define TSI148_LCSR_VEAT_VESCL (1<<29)
820 #define TSI148_LCSR_VEAT_2EOT (1<<21)
821 #define TSI148_LCSR_VEAT_2EST (1<<20)
822 #define TSI148_LCSR_VEAT_BERR (1<<19)
823 #define TSI148_LCSR_VEAT_LWORD (1<<18)
824 #define TSI148_LCSR_VEAT_WRITE (1<<17)
825 #define TSI148_LCSR_VEAT_IACK (1<<16)
826 #define TSI148_LCSR_VEAT_DS1 (1<<15)
827 #define TSI148_LCSR_VEAT_DS0 (1<<14)
828 #define TSI148_LCSR_VEAT_AM_M (0x3F<<8)
829 #define TSI148_LCSR_VEAT_XAM_M (0xFF<<0)
830
831
832
833
834
835 #define TSI148_LCSR_EDPAT_EDPCL (1<<29)
836
837
838
839
840 #define TSI148_LCSR_ITSAL6432_M (0xFFFF<<16)
841 #define TSI148_LCSR_ITSAL24_M (0x00FFF<<12)
842 #define TSI148_LCSR_ITSAL16_M (0x0000FFF<<4)
843
844
845
846
847 #define TSI148_LCSR_ITEAL6432_M (0xFFFF<<16)
848 #define TSI148_LCSR_ITEAL24_M (0x00FFF<<12)
849 #define TSI148_LCSR_ITEAL16_M (0x0000FFF<<4)
850
851
852
853
854 #define TSI148_LCSR_ITOFFL6432_M (0xFFFF<<16)
855 #define TSI148_LCSR_ITOFFL24_M (0xFFFFF<<12)
856 #define TSI148_LCSR_ITOFFL16_M (0xFFFFFFF<<4)
857
858
859
860
861 #define TSI148_LCSR_ITAT_EN (1<<31)
862 #define TSI148_LCSR_ITAT_TH (1<<18)
863
864 #define TSI148_LCSR_ITAT_VFS_M (3<<16)
865 #define TSI148_LCSR_ITAT_VFS_64 (0<<16)
866 #define TSI148_LCSR_ITAT_VFS_128 (1<<16)
867 #define TSI148_LCSR_ITAT_VFS_256 (2<<16)
868 #define TSI148_LCSR_ITAT_VFS_512 (3<<16)
869
870 #define TSI148_LCSR_ITAT_2eSSTM_M (7<<12)
871 #define TSI148_LCSR_ITAT_2eSSTM_160 (0<<12)
872 #define TSI148_LCSR_ITAT_2eSSTM_267 (1<<12)
873 #define TSI148_LCSR_ITAT_2eSSTM_320 (2<<12)
874
875 #define TSI148_LCSR_ITAT_2eSSTB (1<<11)
876 #define TSI148_LCSR_ITAT_2eSST (1<<10)
877 #define TSI148_LCSR_ITAT_2eVME (1<<9)
878 #define TSI148_LCSR_ITAT_MBLT (1<<8)
879 #define TSI148_LCSR_ITAT_BLT (1<<7)
880
881 #define TSI148_LCSR_ITAT_AS_M (7<<4)
882 #define TSI148_LCSR_ITAT_AS_A16 (0<<4)
883 #define TSI148_LCSR_ITAT_AS_A24 (1<<4)
884 #define TSI148_LCSR_ITAT_AS_A32 (2<<4)
885 #define TSI148_LCSR_ITAT_AS_A64 (4<<4)
886
887 #define TSI148_LCSR_ITAT_SUPR (1<<3)
888 #define TSI148_LCSR_ITAT_NPRIV (1<<2)
889 #define TSI148_LCSR_ITAT_PGM (1<<1)
890 #define TSI148_LCSR_ITAT_DATA (1<<0)
891
892
893
894
895 #define TSI148_LCSR_GBAL_M (0x7FFFFFF<<5)
896
897
898
899
900 #define TSI148_LCSR_GCSRAT_EN (1<<7)
901
902 #define TSI148_LCSR_GCSRAT_AS_M (7<<4)
903 #define TSI148_LCSR_GCSRAT_AS_A16 (0<<4)
904 #define TSI148_LCSR_GCSRAT_AS_A24 (1<<4)
905 #define TSI148_LCSR_GCSRAT_AS_A32 (2<<4)
906 #define TSI148_LCSR_GCSRAT_AS_A64 (4<<4)
907
908 #define TSI148_LCSR_GCSRAT_SUPR (1<<3)
909 #define TSI148_LCSR_GCSRAT_NPRIV (1<<2)
910 #define TSI148_LCSR_GCSRAT_PGM (1<<1)
911 #define TSI148_LCSR_GCSRAT_DATA (1<<0)
912
913
914
915
916 #define TSI148_LCSR_CBAL_M (0xFFFFF<<12)
917
918
919
920
921 #define TSI148_LCSR_CRGAT_EN (1<<7)
922
923 #define TSI148_LCSR_CRGAT_AS_M (7<<4)
924 #define TSI148_LCSR_CRGAT_AS_A16 (0<<4)
925 #define TSI148_LCSR_CRGAT_AS_A24 (1<<4)
926 #define TSI148_LCSR_CRGAT_AS_A32 (2<<4)
927 #define TSI148_LCSR_CRGAT_AS_A64 (4<<4)
928
929 #define TSI148_LCSR_CRGAT_SUPR (1<<3)
930 #define TSI148_LCSR_CRGAT_NPRIV (1<<2)
931 #define TSI148_LCSR_CRGAT_PGM (1<<1)
932 #define TSI148_LCSR_CRGAT_DATA (1<<0)
933
934
935
936
937 #define TSI148_LCSR_CROL_M (0x1FFF<<19)
938
939
940
941
942 #define TSI148_LCSR_CRAT_EN (1<<7)
943
944
945
946
947 #define TSI148_LCSR_LMBAL_M (0x7FFFFFF<<5)
948
949
950
951
952 #define TSI148_LCSR_LMAT_EN (1<<7)
953
954 #define TSI148_LCSR_LMAT_AS_M (7<<4)
955 #define TSI148_LCSR_LMAT_AS_A16 (0<<4)
956 #define TSI148_LCSR_LMAT_AS_A24 (1<<4)
957 #define TSI148_LCSR_LMAT_AS_A32 (2<<4)
958 #define TSI148_LCSR_LMAT_AS_A64 (4<<4)
959
960 #define TSI148_LCSR_LMAT_SUPR (1<<3)
961 #define TSI148_LCSR_LMAT_NPRIV (1<<2)
962 #define TSI148_LCSR_LMAT_PGM (1<<1)
963 #define TSI148_LCSR_LMAT_DATA (1<<0)
964
965
966
967
968 #define TSI148_LCSR_BPGTR_BPGT_M (0xFFFF<<0)
969
970
971
972
973 #define TSI148_LCSR_BPCTR_BPCT_M (0xFFFFFF<<0)
974
975
976
977
978 #define TSI148_LCSR_VICR_CNTS_M (3<<22)
979 #define TSI148_LCSR_VICR_CNTS_DIS (1<<22)
980 #define TSI148_LCSR_VICR_CNTS_IRQ1 (2<<22)
981 #define TSI148_LCSR_VICR_CNTS_IRQ2 (3<<22)
982
983 #define TSI148_LCSR_VICR_EDGIS_M (3<<20)
984 #define TSI148_LCSR_VICR_EDGIS_DIS (1<<20)
985 #define TSI148_LCSR_VICR_EDGIS_IRQ1 (2<<20)
986 #define TSI148_LCSR_VICR_EDGIS_IRQ2 (3<<20)
987
988 #define TSI148_LCSR_VICR_IRQIF_M (3<<18)
989 #define TSI148_LCSR_VICR_IRQIF_NORM (1<<18)
990 #define TSI148_LCSR_VICR_IRQIF_PULSE (2<<18)
991 #define TSI148_LCSR_VICR_IRQIF_PROG (3<<18)
992 #define TSI148_LCSR_VICR_IRQIF_1U (4<<18)
993
994 #define TSI148_LCSR_VICR_IRQ2F_M (3<<16)
995 #define TSI148_LCSR_VICR_IRQ2F_NORM (1<<16)
996 #define TSI148_LCSR_VICR_IRQ2F_PULSE (2<<16)
997 #define TSI148_LCSR_VICR_IRQ2F_PROG (3<<16)
998 #define TSI148_LCSR_VICR_IRQ2F_1U (4<<16)
999
1000 #define TSI148_LCSR_VICR_BIP (1<<15)
1001
1002 #define TSI148_LCSR_VICR_IRQC (1<<12)
1003 #define TSI148_LCSR_VICR_IRQS (1<<11)
1004
1005 #define TSI148_LCSR_VICR_IRQL_M (7<<8)
1006 #define TSI148_LCSR_VICR_IRQL_1 (1<<8)
1007 #define TSI148_LCSR_VICR_IRQL_2 (2<<8)
1008 #define TSI148_LCSR_VICR_IRQL_3 (3<<8)
1009 #define TSI148_LCSR_VICR_IRQL_4 (4<<8)
1010 #define TSI148_LCSR_VICR_IRQL_5 (5<<8)
1011 #define TSI148_LCSR_VICR_IRQL_6 (6<<8)
1012 #define TSI148_LCSR_VICR_IRQL_7 (7<<8)
1013
1014 static const int TSI148_LCSR_VICR_IRQL[8] = { 0, TSI148_LCSR_VICR_IRQL_1,
1015 TSI148_LCSR_VICR_IRQL_2, TSI148_LCSR_VICR_IRQL_3,
1016 TSI148_LCSR_VICR_IRQL_4, TSI148_LCSR_VICR_IRQL_5,
1017 TSI148_LCSR_VICR_IRQL_6, TSI148_LCSR_VICR_IRQL_7 };
1018
1019 #define TSI148_LCSR_VICR_STID_M (0xFF<<0)
1020
1021
1022
1023
1024 #define TSI148_LCSR_INTEN_DMA1EN (1<<25)
1025 #define TSI148_LCSR_INTEN_DMA0EN (1<<24)
1026 #define TSI148_LCSR_INTEN_LM3EN (1<<23)
1027 #define TSI148_LCSR_INTEN_LM2EN (1<<22)
1028 #define TSI148_LCSR_INTEN_LM1EN (1<<21)
1029 #define TSI148_LCSR_INTEN_LM0EN (1<<20)
1030 #define TSI148_LCSR_INTEN_MB3EN (1<<19)
1031 #define TSI148_LCSR_INTEN_MB2EN (1<<18)
1032 #define TSI148_LCSR_INTEN_MB1EN (1<<17)
1033 #define TSI148_LCSR_INTEN_MB0EN (1<<16)
1034 #define TSI148_LCSR_INTEN_PERREN (1<<13)
1035 #define TSI148_LCSR_INTEN_VERREN (1<<12)
1036 #define TSI148_LCSR_INTEN_VIEEN (1<<11)
1037 #define TSI148_LCSR_INTEN_IACKEN (1<<10)
1038 #define TSI148_LCSR_INTEN_SYSFLEN (1<<9)
1039 #define TSI148_LCSR_INTEN_ACFLEN (1<<8)
1040 #define TSI148_LCSR_INTEN_IRQ7EN (1<<7)
1041 #define TSI148_LCSR_INTEN_IRQ6EN (1<<6)
1042 #define TSI148_LCSR_INTEN_IRQ5EN (1<<5)
1043 #define TSI148_LCSR_INTEN_IRQ4EN (1<<4)
1044 #define TSI148_LCSR_INTEN_IRQ3EN (1<<3)
1045 #define TSI148_LCSR_INTEN_IRQ2EN (1<<2)
1046 #define TSI148_LCSR_INTEN_IRQ1EN (1<<1)
1047
1048 static const int TSI148_LCSR_INTEN_LMEN[4] = { TSI148_LCSR_INTEN_LM0EN,
1049 TSI148_LCSR_INTEN_LM1EN,
1050 TSI148_LCSR_INTEN_LM2EN,
1051 TSI148_LCSR_INTEN_LM3EN };
1052
1053 static const int TSI148_LCSR_INTEN_IRQEN[7] = { TSI148_LCSR_INTEN_IRQ1EN,
1054 TSI148_LCSR_INTEN_IRQ2EN,
1055 TSI148_LCSR_INTEN_IRQ3EN,
1056 TSI148_LCSR_INTEN_IRQ4EN,
1057 TSI148_LCSR_INTEN_IRQ5EN,
1058 TSI148_LCSR_INTEN_IRQ6EN,
1059 TSI148_LCSR_INTEN_IRQ7EN };
1060
1061
1062
1063
1064 #define TSI148_LCSR_INTEO_DMA1EO (1<<25)
1065 #define TSI148_LCSR_INTEO_DMA0EO (1<<24)
1066 #define TSI148_LCSR_INTEO_LM3EO (1<<23)
1067 #define TSI148_LCSR_INTEO_LM2EO (1<<22)
1068 #define TSI148_LCSR_INTEO_LM1EO (1<<21)
1069 #define TSI148_LCSR_INTEO_LM0EO (1<<20)
1070 #define TSI148_LCSR_INTEO_MB3EO (1<<19)
1071 #define TSI148_LCSR_INTEO_MB2EO (1<<18)
1072 #define TSI148_LCSR_INTEO_MB1EO (1<<17)
1073 #define TSI148_LCSR_INTEO_MB0EO (1<<16)
1074 #define TSI148_LCSR_INTEO_PERREO (1<<13)
1075 #define TSI148_LCSR_INTEO_VERREO (1<<12)
1076 #define TSI148_LCSR_INTEO_VIEEO (1<<11)
1077 #define TSI148_LCSR_INTEO_IACKEO (1<<10)
1078 #define TSI148_LCSR_INTEO_SYSFLEO (1<<9)
1079 #define TSI148_LCSR_INTEO_ACFLEO (1<<8)
1080 #define TSI148_LCSR_INTEO_IRQ7EO (1<<7)
1081 #define TSI148_LCSR_INTEO_IRQ6EO (1<<6)
1082 #define TSI148_LCSR_INTEO_IRQ5EO (1<<5)
1083 #define TSI148_LCSR_INTEO_IRQ4EO (1<<4)
1084 #define TSI148_LCSR_INTEO_IRQ3EO (1<<3)
1085 #define TSI148_LCSR_INTEO_IRQ2EO (1<<2)
1086 #define TSI148_LCSR_INTEO_IRQ1EO (1<<1)
1087
1088 static const int TSI148_LCSR_INTEO_LMEO[4] = { TSI148_LCSR_INTEO_LM0EO,
1089 TSI148_LCSR_INTEO_LM1EO,
1090 TSI148_LCSR_INTEO_LM2EO,
1091 TSI148_LCSR_INTEO_LM3EO };
1092
1093 static const int TSI148_LCSR_INTEO_IRQEO[7] = { TSI148_LCSR_INTEO_IRQ1EO,
1094 TSI148_LCSR_INTEO_IRQ2EO,
1095 TSI148_LCSR_INTEO_IRQ3EO,
1096 TSI148_LCSR_INTEO_IRQ4EO,
1097 TSI148_LCSR_INTEO_IRQ5EO,
1098 TSI148_LCSR_INTEO_IRQ6EO,
1099 TSI148_LCSR_INTEO_IRQ7EO };
1100
1101
1102
1103
1104 #define TSI148_LCSR_INTS_DMA1S (1<<25)
1105 #define TSI148_LCSR_INTS_DMA0S (1<<24)
1106 #define TSI148_LCSR_INTS_LM3S (1<<23)
1107 #define TSI148_LCSR_INTS_LM2S (1<<22)
1108 #define TSI148_LCSR_INTS_LM1S (1<<21)
1109 #define TSI148_LCSR_INTS_LM0S (1<<20)
1110 #define TSI148_LCSR_INTS_MB3S (1<<19)
1111 #define TSI148_LCSR_INTS_MB2S (1<<18)
1112 #define TSI148_LCSR_INTS_MB1S (1<<17)
1113 #define TSI148_LCSR_INTS_MB0S (1<<16)
1114 #define TSI148_LCSR_INTS_PERRS (1<<13)
1115 #define TSI148_LCSR_INTS_VERRS (1<<12)
1116 #define TSI148_LCSR_INTS_VIES (1<<11)
1117 #define TSI148_LCSR_INTS_IACKS (1<<10)
1118 #define TSI148_LCSR_INTS_SYSFLS (1<<9)
1119 #define TSI148_LCSR_INTS_ACFLS (1<<8)
1120 #define TSI148_LCSR_INTS_IRQ7S (1<<7)
1121 #define TSI148_LCSR_INTS_IRQ6S (1<<6)
1122 #define TSI148_LCSR_INTS_IRQ5S (1<<5)
1123 #define TSI148_LCSR_INTS_IRQ4S (1<<4)
1124 #define TSI148_LCSR_INTS_IRQ3S (1<<3)
1125 #define TSI148_LCSR_INTS_IRQ2S (1<<2)
1126 #define TSI148_LCSR_INTS_IRQ1S (1<<1)
1127
1128 static const int TSI148_LCSR_INTS_LMS[4] = { TSI148_LCSR_INTS_LM0S,
1129 TSI148_LCSR_INTS_LM1S,
1130 TSI148_LCSR_INTS_LM2S,
1131 TSI148_LCSR_INTS_LM3S };
1132
1133 static const int TSI148_LCSR_INTS_MBS[4] = { TSI148_LCSR_INTS_MB0S,
1134 TSI148_LCSR_INTS_MB1S,
1135 TSI148_LCSR_INTS_MB2S,
1136 TSI148_LCSR_INTS_MB3S };
1137
1138
1139
1140
1141 #define TSI148_LCSR_INTC_DMA1C (1<<25)
1142 #define TSI148_LCSR_INTC_DMA0C (1<<24)
1143 #define TSI148_LCSR_INTC_LM3C (1<<23)
1144 #define TSI148_LCSR_INTC_LM2C (1<<22)
1145 #define TSI148_LCSR_INTC_LM1C (1<<21)
1146 #define TSI148_LCSR_INTC_LM0C (1<<20)
1147 #define TSI148_LCSR_INTC_MB3C (1<<19)
1148 #define TSI148_LCSR_INTC_MB2C (1<<18)
1149 #define TSI148_LCSR_INTC_MB1C (1<<17)
1150 #define TSI148_LCSR_INTC_MB0C (1<<16)
1151 #define TSI148_LCSR_INTC_PERRC (1<<13)
1152 #define TSI148_LCSR_INTC_VERRC (1<<12)
1153 #define TSI148_LCSR_INTC_VIEC (1<<11)
1154 #define TSI148_LCSR_INTC_IACKC (1<<10)
1155 #define TSI148_LCSR_INTC_SYSFLC (1<<9)
1156 #define TSI148_LCSR_INTC_ACFLC (1<<8)
1157
1158 static const int TSI148_LCSR_INTC_LMC[4] = { TSI148_LCSR_INTC_LM0C,
1159 TSI148_LCSR_INTC_LM1C,
1160 TSI148_LCSR_INTC_LM2C,
1161 TSI148_LCSR_INTC_LM3C };
1162
1163 static const int TSI148_LCSR_INTC_MBC[4] = { TSI148_LCSR_INTC_MB0C,
1164 TSI148_LCSR_INTC_MB1C,
1165 TSI148_LCSR_INTC_MB2C,
1166 TSI148_LCSR_INTC_MB3C };
1167
1168
1169
1170
1171 #define TSI148_LCSR_INTM1_DMA1M_M (3<<18)
1172 #define TSI148_LCSR_INTM1_DMA0M_M (3<<16)
1173 #define TSI148_LCSR_INTM1_LM3M_M (3<<14)
1174 #define TSI148_LCSR_INTM1_LM2M_M (3<<12)
1175 #define TSI148_LCSR_INTM1_LM1M_M (3<<10)
1176 #define TSI148_LCSR_INTM1_LM0M_M (3<<8)
1177 #define TSI148_LCSR_INTM1_MB3M_M (3<<6)
1178 #define TSI148_LCSR_INTM1_MB2M_M (3<<4)
1179 #define TSI148_LCSR_INTM1_MB1M_M (3<<2)
1180 #define TSI148_LCSR_INTM1_MB0M_M (3<<0)
1181
1182
1183
1184
1185 #define TSI148_LCSR_INTM2_PERRM_M (3<<26)
1186 #define TSI148_LCSR_INTM2_VERRM_M (3<<24)
1187 #define TSI148_LCSR_INTM2_VIEM_M (3<<22)
1188 #define TSI148_LCSR_INTM2_IACKM_M (3<<20)
1189 #define TSI148_LCSR_INTM2_SYSFLM_M (3<<18)
1190 #define TSI148_LCSR_INTM2_ACFLM_M (3<<16)
1191 #define TSI148_LCSR_INTM2_IRQ7M_M (3<<14)
1192 #define TSI148_LCSR_INTM2_IRQ6M_M (3<<12)
1193 #define TSI148_LCSR_INTM2_IRQ5M_M (3<<10)
1194 #define TSI148_LCSR_INTM2_IRQ4M_M (3<<8)
1195 #define TSI148_LCSR_INTM2_IRQ3M_M (3<<6)
1196 #define TSI148_LCSR_INTM2_IRQ2M_M (3<<4)
1197 #define TSI148_LCSR_INTM2_IRQ1M_M (3<<2)
1198
1199
1200
1201
1202 #define TSI148_LCSR_DCTL_ABT (1<<27)
1203 #define TSI148_LCSR_DCTL_PAU (1<<26)
1204 #define TSI148_LCSR_DCTL_DGO (1<<25)
1205
1206 #define TSI148_LCSR_DCTL_MOD (1<<23)
1207
1208 #define TSI148_LCSR_DCTL_VBKS_M (7<<12)
1209 #define TSI148_LCSR_DCTL_VBKS_32 (0<<12)
1210 #define TSI148_LCSR_DCTL_VBKS_64 (1<<12)
1211 #define TSI148_LCSR_DCTL_VBKS_128 (2<<12)
1212 #define TSI148_LCSR_DCTL_VBKS_256 (3<<12)
1213 #define TSI148_LCSR_DCTL_VBKS_512 (4<<12)
1214 #define TSI148_LCSR_DCTL_VBKS_1024 (5<<12)
1215 #define TSI148_LCSR_DCTL_VBKS_2048 (6<<12)
1216 #define TSI148_LCSR_DCTL_VBKS_4096 (7<<12)
1217
1218 #define TSI148_LCSR_DCTL_VBOT_M (7<<8)
1219 #define TSI148_LCSR_DCTL_VBOT_0 (0<<8)
1220 #define TSI148_LCSR_DCTL_VBOT_1 (1<<8)
1221 #define TSI148_LCSR_DCTL_VBOT_2 (2<<8)
1222 #define TSI148_LCSR_DCTL_VBOT_4 (3<<8)
1223 #define TSI148_LCSR_DCTL_VBOT_8 (4<<8)
1224 #define TSI148_LCSR_DCTL_VBOT_16 (5<<8)
1225 #define TSI148_LCSR_DCTL_VBOT_32 (6<<8)
1226 #define TSI148_LCSR_DCTL_VBOT_64 (7<<8)
1227
1228 #define TSI148_LCSR_DCTL_PBKS_M (7<<4)
1229 #define TSI148_LCSR_DCTL_PBKS_32 (0<<4)
1230 #define TSI148_LCSR_DCTL_PBKS_64 (1<<4)
1231 #define TSI148_LCSR_DCTL_PBKS_128 (2<<4)
1232 #define TSI148_LCSR_DCTL_PBKS_256 (3<<4)
1233 #define TSI148_LCSR_DCTL_PBKS_512 (4<<4)
1234 #define TSI148_LCSR_DCTL_PBKS_1024 (5<<4)
1235 #define TSI148_LCSR_DCTL_PBKS_2048 (6<<4)
1236 #define TSI148_LCSR_DCTL_PBKS_4096 (7<<4)
1237
1238 #define TSI148_LCSR_DCTL_PBOT_M (7<<0)
1239 #define TSI148_LCSR_DCTL_PBOT_0 (0<<0)
1240 #define TSI148_LCSR_DCTL_PBOT_1 (1<<0)
1241 #define TSI148_LCSR_DCTL_PBOT_2 (2<<0)
1242 #define TSI148_LCSR_DCTL_PBOT_4 (3<<0)
1243 #define TSI148_LCSR_DCTL_PBOT_8 (4<<0)
1244 #define TSI148_LCSR_DCTL_PBOT_16 (5<<0)
1245 #define TSI148_LCSR_DCTL_PBOT_32 (6<<0)
1246 #define TSI148_LCSR_DCTL_PBOT_64 (7<<0)
1247
1248
1249
1250
1251 #define TSI148_LCSR_DSTA_SMA (1<<31)
1252 #define TSI148_LCSR_DSTA_RTA (1<<30)
1253 #define TSI148_LCSR_DSTA_MRC (1<<29)
1254 #define TSI148_LCSR_DSTA_VBE (1<<28)
1255 #define TSI148_LCSR_DSTA_ABT (1<<27)
1256 #define TSI148_LCSR_DSTA_PAU (1<<26)
1257 #define TSI148_LCSR_DSTA_DON (1<<25)
1258 #define TSI148_LCSR_DSTA_BSY (1<<24)
1259
1260
1261
1262
1263 #define TSI148_LCSR_DCLAL_M (0x3FFFFFF<<6)
1264
1265
1266
1267
1268 #define TSI148_LCSR_DSAT_TYP_M (3<<28)
1269 #define TSI148_LCSR_DSAT_TYP_PCI (0<<28)
1270 #define TSI148_LCSR_DSAT_TYP_VME (1<<28)
1271 #define TSI148_LCSR_DSAT_TYP_PAT (2<<28)
1272
1273 #define TSI148_LCSR_DSAT_PSZ (1<<25)
1274 #define TSI148_LCSR_DSAT_NIN (1<<24)
1275
1276 #define TSI148_LCSR_DSAT_2eSSTM_M (3<<11)
1277 #define TSI148_LCSR_DSAT_2eSSTM_160 (0<<11)
1278 #define TSI148_LCSR_DSAT_2eSSTM_267 (1<<11)
1279 #define TSI148_LCSR_DSAT_2eSSTM_320 (2<<11)
1280
1281 #define TSI148_LCSR_DSAT_TM_M (7<<8)
1282 #define TSI148_LCSR_DSAT_TM_SCT (0<<8)
1283 #define TSI148_LCSR_DSAT_TM_BLT (1<<8)
1284 #define TSI148_LCSR_DSAT_TM_MBLT (2<<8)
1285 #define TSI148_LCSR_DSAT_TM_2eVME (3<<8)
1286 #define TSI148_LCSR_DSAT_TM_2eSST (4<<8)
1287 #define TSI148_LCSR_DSAT_TM_2eSSTB (5<<8)
1288
1289 #define TSI148_LCSR_DSAT_DBW_M (3<<6)
1290 #define TSI148_LCSR_DSAT_DBW_16 (0<<6)
1291 #define TSI148_LCSR_DSAT_DBW_32 (1<<6)
1292
1293 #define TSI148_LCSR_DSAT_SUP (1<<5)
1294 #define TSI148_LCSR_DSAT_PGM (1<<4)
1295
1296 #define TSI148_LCSR_DSAT_AMODE_M (0xf<<0)
1297 #define TSI148_LCSR_DSAT_AMODE_A16 (0<<0)
1298 #define TSI148_LCSR_DSAT_AMODE_A24 (1<<0)
1299 #define TSI148_LCSR_DSAT_AMODE_A32 (2<<0)
1300 #define TSI148_LCSR_DSAT_AMODE_A64 (4<<0)
1301 #define TSI148_LCSR_DSAT_AMODE_CRCSR (5<<0)
1302 #define TSI148_LCSR_DSAT_AMODE_USER1 (8<<0)
1303 #define TSI148_LCSR_DSAT_AMODE_USER2 (9<<0)
1304 #define TSI148_LCSR_DSAT_AMODE_USER3 (0xa<<0)
1305 #define TSI148_LCSR_DSAT_AMODE_USER4 (0xb<<0)
1306
1307
1308
1309
1310 #define TSI148_LCSR_DDAT_TYP_PCI (0<<28)
1311 #define TSI148_LCSR_DDAT_TYP_VME (1<<28)
1312
1313 #define TSI148_LCSR_DDAT_2eSSTM_M (3<<11)
1314 #define TSI148_LCSR_DDAT_2eSSTM_160 (0<<11)
1315 #define TSI148_LCSR_DDAT_2eSSTM_267 (1<<11)
1316 #define TSI148_LCSR_DDAT_2eSSTM_320 (2<<11)
1317
1318 #define TSI148_LCSR_DDAT_TM_M (7<<8)
1319 #define TSI148_LCSR_DDAT_TM_SCT (0<<8)
1320 #define TSI148_LCSR_DDAT_TM_BLT (1<<8)
1321 #define TSI148_LCSR_DDAT_TM_MBLT (2<<8)
1322 #define TSI148_LCSR_DDAT_TM_2eVME (3<<8)
1323 #define TSI148_LCSR_DDAT_TM_2eSST (4<<8)
1324 #define TSI148_LCSR_DDAT_TM_2eSSTB (5<<8)
1325
1326 #define TSI148_LCSR_DDAT_DBW_M (3<<6)
1327 #define TSI148_LCSR_DDAT_DBW_16 (0<<6)
1328 #define TSI148_LCSR_DDAT_DBW_32 (1<<6)
1329
1330 #define TSI148_LCSR_DDAT_SUP (1<<5)
1331 #define TSI148_LCSR_DDAT_PGM (1<<4)
1332
1333 #define TSI148_LCSR_DDAT_AMODE_M (0xf<<0)
1334 #define TSI148_LCSR_DDAT_AMODE_A16 (0<<0)
1335 #define TSI148_LCSR_DDAT_AMODE_A24 (1<<0)
1336 #define TSI148_LCSR_DDAT_AMODE_A32 (2<<0)
1337 #define TSI148_LCSR_DDAT_AMODE_A64 (4<<0)
1338 #define TSI148_LCSR_DDAT_AMODE_CRCSR (5<<0)
1339 #define TSI148_LCSR_DDAT_AMODE_USER1 (8<<0)
1340 #define TSI148_LCSR_DDAT_AMODE_USER2 (9<<0)
1341 #define TSI148_LCSR_DDAT_AMODE_USER3 (0xa<<0)
1342 #define TSI148_LCSR_DDAT_AMODE_USER4 (0xb<<0)
1343
1344
1345
1346
1347 #define TSI148_LCSR_DNLAL_DNLAL_M (0x3FFFFFF<<6)
1348 #define TSI148_LCSR_DNLAL_LLA (1<<0)
1349
1350
1351
1352
1353 #define TSI148_LCSR_DBS_M (0x1FFFFF<<0)
1354
1355
1356
1357
1358
1359
1360
1361
1362 #define TSI148_GCSR_GCTRL_LRST (1<<15)
1363 #define TSI148_GCSR_GCTRL_SFAILEN (1<<14)
1364 #define TSI148_GCSR_GCTRL_BDFAILS (1<<13)
1365 #define TSI148_GCSR_GCTRL_SCON (1<<12)
1366 #define TSI148_GCSR_GCTRL_MEN (1<<11)
1367
1368 #define TSI148_GCSR_GCTRL_LMI3S (1<<7)
1369 #define TSI148_GCSR_GCTRL_LMI2S (1<<6)
1370 #define TSI148_GCSR_GCTRL_LMI1S (1<<5)
1371 #define TSI148_GCSR_GCTRL_LMI0S (1<<4)
1372 #define TSI148_GCSR_GCTRL_MBI3S (1<<3)
1373 #define TSI148_GCSR_GCTRL_MBI2S (1<<2)
1374 #define TSI148_GCSR_GCTRL_MBI1S (1<<1)
1375 #define TSI148_GCSR_GCTRL_MBI0S (1<<0)
1376
1377 #define TSI148_GCSR_GAP (1<<5)
1378 #define TSI148_GCSR_GA_M (0x1F<<0)
1379
1380
1381
1382
1383
1384
1385
1386
1387 #define TSI148_CRCSR_CSRBCR_LRSTC (1<<7)
1388 #define TSI148_CRCSR_CSRBCR_SFAILC (1<<6)
1389 #define TSI148_CRCSR_CSRBCR_BDFAILS (1<<5)
1390 #define TSI148_CRCSR_CSRBCR_MENC (1<<4)
1391 #define TSI148_CRCSR_CSRBCR_BERRSC (1<<3)
1392
1393
1394
1395
1396 #define TSI148_CRCSR_CSRBSR_LISTS (1<<7)
1397 #define TSI148_CRCSR_CSRBSR_SFAILS (1<<6)
1398 #define TSI148_CRCSR_CSRBSR_BDFAILS (1<<5)
1399 #define TSI148_CRCSR_CSRBSR_MENS (1<<4)
1400 #define TSI148_CRCSR_CSRBSR_BERRS (1<<3)
1401
1402
1403
1404
1405 #define TSI148_CRCSR_CBAR_M (0x1F<<3)
1406
1407 #endif