Fix numerous spelling mistakes.
[dragonfly.git] / sys / net / i4b / layer1 / ihfc / i4b_ihfc_drv.h
blobcd59d9dfff5c751bdd5d8aba3cd959a2ad21659a
1 /*
2 * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
25 *---------------------------------------------------------------------------
27 * i4b_ihfc_drv.h - include file for the HFC-1/S/SP driver
28 * -------------------------------------------------------
30 * last edit-date: [Wed Jul 19 09:40:55 2000]
32 * $Id: i4b_ihfc_drv.h,v 1.7 2000/09/19 13:50:36 hm Exp $
34 * $FreeBSD: src/sys/i4b/layer1/ihfc/i4b_ihfc_drv.h,v 1.1.2.1 2001/08/10 14:08:37 obrien Exp $
35 * $DragonFly: src/sys/net/i4b/layer1/ihfc/i4b_ihfc_drv.h,v 1.3 2007/05/13 18:33:58 swildner Exp $
37 *---------------------------------------------------------------------------*/
38 #ifndef I4B_IHFC_DRV_H_
39 #define I4B_IHFC_DRV_H_
41 /*---------------------------------------------------------------------------*
42 * Ramptables related fifo (HFC-1/S/SP)
44 * The HFC-SP chip only uses ihfc_xxx[2] values for D-channel!
45 * NOTE: These tables are not used anymore.
46 *---------------------------------------------------------------------------*
48 * w - write, r - read: D1_w D1_r B1_w B1_r B2_w B2_r
49 * const u_char ihfc_readtable[6] = {0xa6, 0xa7, 0xbc, 0xbd, 0xbe, 0xbf};
50 * const u_char ihfc_writetable[6] = {0x96, 0x97, 0xac, 0xad, 0xae, 0xaf};
51 * const u_char ihfc_f1inctable[6] = {0x92, 0x93, 0xa8, 0xa9, 0xaa, 0xab};
52 * const u_char ihfc_f2inctable[6] = {0xa2, 0xa3, 0xb8, 0xb9, 0xba, 0xbb};
54 * const struct { u_char z1L, z1H, z2L, z2H, f1, f2, dummy; }
55 * ihfc_countertable[6] = {
56 * {0x90, 0x94, 0x98, 0x9c, 0x9a, 0x9e, 0x00}, D1_w
57 * {0x91, 0x95, 0x99, 0x9d, 0x9b, 0x9f, 0x00}, D1_r
58 * {0x80, 0x84, 0x88, 0x8c, 0xb0, 0xb4, 0x00}, B1_w
59 * {0x81, 0x85, 0x89, 0x8d, 0xb1, 0xb5, 0x00}, B1_r
60 * {0x82, 0x86, 0x8a, 0x8e, 0xb2, 0xb6, 0x00}, B2_w
61 * {0x83, 0x87, 0x8b, 0x8f, 0xb3, 0xb7, 0x00} B2_r
62 * };
63 *---------------------------------------------------------------------------*/
65 /*---------------------------------------------------------------------------*
66 * Ramptables related to configuration (HFC-1/S/SP)
68 * NOTE: Write registers only
69 *---------------------------------------------------------------------------*/
70 const u_char ihfc_configtable[11] =
72 0x18, 0x19, 0x1a, /* cirm, ctmt, int_m1 */
73 0x1b, 0x2e, 0x37, /* int_m2, mst_mode, clkdel */
74 0x31, 0x2f, 0x32, /* sctrl, connect, test/sctrl_e */
75 0x33, 0x00 /* sctrl_r */
77 const u_char isac_configtable[9] =
79 0x39, 0x30, 0x3b, /* adf2, spcr, sqxr */
80 0x38, 0x37, 0x22, /* adf1, stcr, mode */
81 0x20, 0x2b, 0x00 /* mask, star2 */
84 /*---------------------------------------------------------------------------*
85 * Ramptables related to statemachine (HFC-1/S/SP)
87 * state:
88 * 0 = deactivated
89 * 1 = pending
90 * 2 = syncronized
91 * 3 = activated
92 * 4 = error
93 * 5 = reset
94 * -1 = illegal
95 *---------------------------------------------------------------------------*/
97 const struct ihfc_FSMtable { u_char state, *string; }
99 ihfc_TEtable[16] = /* HFC-S/SP - TE */
101 { 0x05 ,"Reset" },
102 { 0xff , 0 },
103 { 0x01 ,"Sensing" },
104 { 0x00 ,"Deactivated" },
105 { 0x01 ,"Awaiting signal" },
106 { 0x01 ,"Identifying input" },
107 { 0x02 ,"Synchronized" },
108 { 0x03 ,"Activated" },
109 { 0x04 ,"Lost framing" },
110 { 0xff , 0 },
111 { 0xff , 0 },
112 { 0xff , 0 },
113 { 0xff , 0 },
114 { 0xff , 0 },
115 { 0xff , 0 },
116 { 0xff , 0 }
118 ihfc_NTtable[16] = /* HFC-S/SP - NT */
120 { 0x05 ,"Reset" },
121 { 0x00 ,"Deactive" },
122 { 0x02 ,"Pending activation" },
123 { 0x03 ,"Active" },
124 { 0x01 ,"Pending deactivation" },
125 { 0xff , 0 },
126 { 0xff , 0 },
127 { 0xff , 0 },
128 { 0xff , 0 },
129 { 0xff , 0 },
130 { 0xff , 0 },
131 { 0xff , 0 },
132 { 0xff , 0 },
133 { 0xff , 0 },
134 { 0xff , 0 },
135 { 0xff , 0 }
137 ihfc_TEtable2[16] = /* HFC-1/ISAC - TE */
139 { 0x00 ,"Deactivate request" },
140 { 0xff , 0 },
141 { 0xff , 0 },
142 { 0xff , 0 },
143 { 0x01 ,"Level detected" },
144 { 0xff , 0 },
145 { 0x04 ,"Error indication" },
146 { 0x00 ,"Power-up" },
147 { 0x02 ,"Activate request downstream" },
148 { 0xff , 0 },
149 { 0x00 ,"Test indication" },
150 { 0x00 ,"Awake test indication" },
151 { 0x03 ,"Activate ind. with priority class 8" },
152 { 0x03 ,"Activate ind. with priority class 10" },
153 { 0xff , 0 },
154 { 0x00 ,"Deactivate indication downstream" }
157 /*---------------------------------------------------------------------------*
158 * Ramptable related to ISAC EXIR (HFC-1)
160 * cmd: command to execute, if any.
162 *---------------------------------------------------------------------------*/
163 const struct ihfc_EXIRtable { u_char cmd, *string; }
165 ihfc_EXIRtable[8] =
167 { 0x00 ,"Watchdog Timer Overflow" },
168 { 0x00 ,"Subscriber Awake" },
169 { 0x00 ,"Monitor Status" },
170 { 0x00 ,"Rx Sync Xfer Overflow" },
171 { 0xc0 ,"Rx Frame Overflow" }, /* RMC + RRES */
172 { 0x00 ,"Protocol Error" },
173 { 0x01 ,"Tx Data Underrun" }, /* XRES */
174 { 0x01 ,"Tx Message Repeat" }, /* XRES */
177 /*---------------------------------------------------------------------------*
178 * Ramptables related to S/Q - channel (HFC-1/S/SP)
180 * From TE's viewpoint:
181 * Q: commands to NT
182 * S: indications from NT
184 * From NT's viewpoint:
185 * Q: indications from TE
186 * S: commands to TE
188 * cmd: not used
189 *---------------------------------------------------------------------------*/
190 const struct ihfc_SQtable { u_char cmd, *string; }
192 ihfc_Qtable[16] =
194 { 0x00, "Loss of Power indication" },
195 { 0x00, "ST request" },
196 { 0x00, 0 },
197 { 0x00, "LoopBack request (B1/B2)" },
198 { 0x00, 0 },
199 { 0x00, 0 },
200 { 0x00, 0 },
201 { 0x00, "LoopBack request (B1)" },
202 { 0x00, 0 },
203 { 0x00, 0 },
204 { 0x00, 0 },
205 { 0x00, "LoopBack request (B2)" },
206 { 0x00, "V-DCE slave mode" },
207 { 0x00, "V-DTE slave mode" },
208 { 0x00, 0 },
209 { 0x00, "Idle" }
211 ihfc_Stable[16] =
213 { 0x00, "Idle" },
214 { 0x00, "ST Fail" },
215 { 0x00, "ST Pass" },
216 { 0x00, "Disruptive Operation Indication" },
217 { 0x00, "DTSE-OUT" },
218 { 0x00, "V-DCE master mode" },
219 { 0x00, "ST Indication" },
220 { 0x00, "DTSE-IN" },
221 { 0x00, "LoopBack indication (B1/B2)" },
222 { 0x00, "Loss of Received Signal indication" },
223 { 0x00, "LoopBack indication (B2)" },
224 { 0x00, "DTSE-IN and OUT" },
225 { 0x00, "LoopBack indication (B1)" },
226 { 0x00, "Loss of power indication" }
230 #endif /* I4B_IHFC_DRV_H_ */