3 /*****************************************************************************
5 Copyright © 1993, 1994 Digital Equipment Corporation,
6 Maynard, Massachusetts.
10 Permission to use, copy, modify, and distribute this software and its
11 documentation for any purpose and without fee is hereby granted, provided
12 that the copyright notice and this permission notice appear in all copies
13 of software and supporting documentation, and that the name of Digital not
14 be used in advertising or publicity pertaining to distribution of the software
15 without specific, written prior permission. Digital grants this permission
16 provided that you prominently mark, as not part of the original, any
17 modifications made to this software or documentation.
19 Digital Equipment Corporation disclaims all warranties and/or guarantees
20 with regard to this software, including all implied warranties of fitness for
21 a particular purpose and merchantability, and makes no representations
22 regarding the use of, or the results of the use of, the software and
23 documentation in terms of correctness, accuracy, reliability, currentness or
24 otherwise; and you rely on the software, documentation and results solely at
27 ******************************************************************************/
30 * $Id: ssb.h,v 1.1.1.1 1997/10/30 23:27:17 verghese Exp $;
35 * Revision 1.1.1.1 1997/10/30 23:27:17 verghese
38 * Revision 1.3 1994/08/05 20:13:47 fdh
39 * Updated Copyright header and RCS $Id: identifier.
41 * Revision 1.2 1994/06/20 14:18:59 fdh
42 * Fixup header file preprocessor #include conditionals.
44 * Revision 1.1 1993/06/08 19:56:16 fdh
52 /* Set up SSB definitions */
53 /* Last modified on 1/3/91 by L. Stewart */
55 #define SSB_stcreset1 0x0800 /* CR_DIR */
56 #define SSB_stcreset2 0x3820 /* CR_CABEN | CR_AUTO | CR_DIR */
59 #define SSB_TagCable 0
64 #define SSB_TagStartTV 4
65 #define SSB_TagTVStat 6
66 #define SSB_TagLocalStat 7
68 #define SSB_AdrLocalStat 0x4000
69 #define SSB_AdrSRA 0x8000
70 #define SSB_AdrSRB 0x8001
72 #define SSB_LCRenable 0x1
73 #define SSB_LCRclrstat 0x2
74 #define SSB_LCRfifomr 0x4
75 #define SSB_LCRreset 0x8
76 #define SSB_LCRled 0x10
78 #define SSB_LSTfifoff 0x100
79 #define SSB_LSTfifohf 0x200
80 #define SSB_LSTfifoef 0x400
81 #define SSB_LSTinst 0x800
82 #define SSB_LSTid 0x1000
83 #define SSB_LSTotherinst 0x2000
84 #define SSB_LSTcnfg0 0x4000
85 #define SSB_LSTcnfg1 0x8000
86 #define SSB_LSTnode 0xf000
88 #define SSB_CRrParityS 0x01
89 #define SSB_CRdataWP 0x02
90 #define SSB_CRadrWP 0x04
91 #define SSB_CRerrEnable 0x08
92 #define SSB_CRreset 0x10
93 #define SSB_CRdoConfig 0x20
94 #define SSB_CRnodeClock 0x40
96 #define SSB_SRAshared 0x00000080
97 #define SSB_SRAdirty 0x00100000
98 #define SSB_SRAnType 0x80000000
100 #define SSB_PSRinst 0x001
101 #define SSB_PSRmerror 0x002
102 #define SSB_PSRreset 0x004
103 #define SSB_PSRerror 0x008
104 #define SSB_PSRserror 0x010
105 #define SSB_PSRisr 0x7e0
108 unsigned sequence
: 8;
117 unsigned crreset
: 1;
118 unsigned crfifomr
: 1;
119 unsigned crclrstat
: 1;
120 unsigned crenable
: 1;
123 struct SSB_pstattype
{
134 unsigned nodeType
: 1;
137 unsigned p1stat
: 11;
143 unsigned p1count
: 8;
144 unsigned p0count
: 8;
145 unsigned arbcount
: 16;
148 extern int ssb_sequence
;
149 extern int ssb_localcr
;
150 extern int ssb_maincr
;
153 extern int ssb_config1
;
154 extern int ssb_config0
;
155 extern int ssb_lastsra
;
156 extern int ssb_lastsrb
;
157 extern int ssb_lastlsr
;
158 extern int ssb_lastieecc
;
159 extern struct SSB_lsrtype ssb_lsr
;
161 extern struct SSB_sratype ssb_sra
;
162 extern struct SSB_srbtype ssb_srb
;
163 extern int ssb_resid
;
164 extern struct SSB_pstattype ssb_portstatus
;
168 #define SSB_CR SSB_stcreset2
171 #define SSB_CABLE(x) (wfifo(x, SSB_TagCable))
172 #define SSB_LDSLOT(x) (wfifo(x, SSB_TagSlot))
173 #define SSB_LDTVA(x, w) (wfifo((x) | ((w) ? 0x80000000 : 0), SSB_TagTVA))
174 #define SSB_LDRFA(a, c) (wfifo(((255 - c) << 16) + a, SSB_TagRFA))
175 #define SSB_LDORF(x) (wfifo(x, SSB_TagORF))
176 #define SSB_STARTTV(a, c, w) (wfifo(( (w << 15) | ((255 - c) << 16) | a), SSB_TagStartTV ))
177 #define SSB_TVSTAT(x) (wfifo(x, SSB_TagTVStat))
178 #define SSB_LOCALSTAT(x) (wfifo(x, SSB_TagLocalStat))
180 #define SSB_CFF() ( STC_SETCR(tvp->crmask & ~STC_CRFIFOMR), \
181 STC_SETCR(tvp->crmask | STC_CRFIFOMR) )
183 #endif /* __SSB_H_LOADED */