1: /* @(#)tmscpreg.h 1.4 (2.11BSD) 1998/1/28 */
2:
3: /****************************************************************
4: * *
5: * Licensed from Digital Equipment Corporation *
6: * Copyright (c) *
7: * Digital Equipment Corporation *
8: * Maynard, Massachusetts *
9: * 1985, 1986 *
10: * All rights reserved. *
11: * *
12: * The Information in this software is subject to change *
13: * without notice and should not be construed as a commitment *
14: * by Digital Equipment Corporation. Digital makes no *
15: * representations about the suitability of this software for *
16: * any purpose. It is supplied "As Is" without expressed or *
17: * implied warranty. *
18: * *
19: * If the Regents of the University of California or its *
20: * licensees modify the software in a manner creating *
21: * diriviative copyright rights, appropriate copyright *
22: * legends may be placed on the drivative work in addition *
23: * to that set forth above. *
24: * *
25: ****************************************************************/
26:
27: /*
28: * TMSCP registers and structures
29: */
30:
31: struct tmscpdevice {
32: short tmscpip; /* initialization and polling */
33: short tmscpsa; /* status and address */
34: };
35:
36: #define TMSCP_ERR 0100000 /* error bit */
37: #define TMSCP_STEP4 0040000 /* step 4 has started */
38: #define TMSCP_STEP3 0020000 /* step 3 has started */
39: #define TMSCP_STEP2 0010000 /* step 2 has started */
40: #define TMSCP_STEP1 0004000 /* step 1 has started */
41: #define TMSCP_NV 0002000 /* no host settable interrupt vector */
42: #define TMSCP_QB 0001000 /* controller supports Q22 bus */
43: #define TMSCP_DI 0000400 /* controller implements diagnostics */
44: #define TMSCP_OD 0000200 /* port allows odd host addr's in the buffer descriptor */
45: #define TMSCP_IE 0000200 /* interrupt enable */
46: #define TMSCP_MP 0000100 /* port supports address mapping */
47: #define TMSCP_LF 0000002 /* host requests last fail response packet */
48: #define TMSCP_PI 0000001 /* host requests adapter purge interrupts */
49: #define TMSCP_GO 0000001 /* start operation, after init */
50:
51: typedef struct { /* swap shorts for TMSCP controller */
52: short lsh;
53: short hsh;
54: } Trl;
55:
56: /*
57: * TMSCP Communications Area
58: */
59:
60: /*
61: * These defines were moved here so they could be shared between the
62: * driver and the crash dump module.
63: */
64: #ifndef NRSPL2
65: #define NRSPL2 3 /* log2 number of response packets */
66: #endif
67: #ifndef NCMDL2
68: #define NCMDL2 3 /* log2 number of command packets */
69: #endif
70:
71: #define NRSP (1<<NRSPL2)
72: #define NCMD (1<<NCMDL2)
73: #define RINGBASE (4 * sizeof (short))
74: /* Size to map in when mapping a controller's command packet area */
75: #define MAPBUFDESC (((btoc(sizeof (struct tmscp)) - 1) << 8) | RW)
76:
77: struct tmscpca {
78: short ca_xxx1; /* unused */
79: char ca_xxx2; /* unused */
80: char ca_bdp; /* BDP to purge */
81: short ca_cmdint; /* command queue transition interrupt flag */
82: short ca_rspint; /* response queue transition interrupt flag */
83: Trl ca_rspdsc[NRSP];/* response descriptors */
84: Trl ca_cmddsc[NCMD];/* command descriptors */
85: };
86:
87: #define ca_ringbase ca_rspdsc[0]
88:
89: #define TMSCP_OWN 0x8000 /* port owns descriptor (else host owns it) */
90: #define TMSCP_INT 0x4000 /* allow interrupt on ring transition */
Defined struct's
Defined macros
NCMD
defined in line
72; used 3 times
NRSP
defined in line
71; used 5 times
Usage of this include