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
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
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 $
36 *---------------------------------------------------------------------------*/
37 #ifndef I4B_IHFC_DRV_H_
38 #define I4B_IHFC_DRV_H_
40 /*---------------------------------------------------------------------------*
41 * Ramptables related fifo (HFC-1/S/SP)
43 * The HFC-SP chip only uses ihfc_xxx[2] values for D-channel!
44 * NOTE: These tables are not used anymore.
45 *---------------------------------------------------------------------------*
47 * w - write, r - read: D1_w D1_r B1_w B1_r B2_w B2_r
48 * const u_char ihfc_readtable[6] = {0xa6, 0xa7, 0xbc, 0xbd, 0xbe, 0xbf};
49 * const u_char ihfc_writetable[6] = {0x96, 0x97, 0xac, 0xad, 0xae, 0xaf};
50 * const u_char ihfc_f1inctable[6] = {0x92, 0x93, 0xa8, 0xa9, 0xaa, 0xab};
51 * const u_char ihfc_f2inctable[6] = {0xa2, 0xa3, 0xb8, 0xb9, 0xba, 0xbb};
53 * const struct { u_char z1L, z1H, z2L, z2H, f1, f2, dummy; }
54 * ihfc_countertable[6] = {
55 * {0x90, 0x94, 0x98, 0x9c, 0x9a, 0x9e, 0x00}, D1_w
56 * {0x91, 0x95, 0x99, 0x9d, 0x9b, 0x9f, 0x00}, D1_r
57 * {0x80, 0x84, 0x88, 0x8c, 0xb0, 0xb4, 0x00}, B1_w
58 * {0x81, 0x85, 0x89, 0x8d, 0xb1, 0xb5, 0x00}, B1_r
59 * {0x82, 0x86, 0x8a, 0x8e, 0xb2, 0xb6, 0x00}, B2_w
60 * {0x83, 0x87, 0x8b, 0x8f, 0xb3, 0xb7, 0x00} B2_r
62 *---------------------------------------------------------------------------*/
64 /*---------------------------------------------------------------------------*
65 * Ramptables related to configuration (HFC-1/S/SP)
67 * NOTE: Write registers only
68 *---------------------------------------------------------------------------*/
69 const u_char ihfc_configtable[11] =
71 0x18, 0x19, 0x1a, /* cirm, ctmt, int_m1 */
72 0x1b, 0x2e, 0x37, /* int_m2, mst_mode, clkdel */
73 0x31, 0x2f, 0x32, /* sctrl, connect, test/sctrl_e */
74 0x33, 0x00 /* sctrl_r */
76 const u_char isac_configtable[9] =
78 0x39, 0x30, 0x3b, /* adf2, spcr, sqxr */
79 0x38, 0x37, 0x22, /* adf1, stcr, mode */
80 0x20, 0x2b, 0x00 /* mask, star2 */
83 /*---------------------------------------------------------------------------*
84 * Ramptables related to statemachine (HFC-1/S/SP)
94 *---------------------------------------------------------------------------*/
96 const struct ihfc_FSMtable { u_char state, *string; }
98 ihfc_TEtable[16] = /* HFC-S/SP - TE */
103 { 0x00 ,"Deactivated" },
104 { 0x01 ,"Awaiting signal" },
105 { 0x01 ,"Identifying input" },
106 { 0x02 ,"Syncronized" },
107 { 0x03 ,"Activated" },
108 { 0x04 ,"Lost framing" },
117 ihfc_NTtable[16] = /* HFC-S/SP - NT */
120 { 0x00 ,"Deactive" },
121 { 0x02 ,"Pending activation" },
123 { 0x01 ,"Pending deactivation" },
136 ihfc_TEtable2[16] = /* HFC-1/ISAC - TE */
138 { 0x00 ,"Deactivate request" },
142 { 0x01 ,"Level detected" },
144 { 0x04 ,"Error indication" },
145 { 0x00 ,"Power-up" },
146 { 0x02 ,"Activate request downstream" },
148 { 0x00 ,"Test indication" },
149 { 0x00 ,"Awake test indication" },
150 { 0x03 ,"Activate ind. with priority class 8" },
151 { 0x03 ,"Activate ind. with priority class 10" },
153 { 0x00 ,"Deactivate indication downstream" }
156 /*---------------------------------------------------------------------------*
157 * Ramptable related to ISAC EXIR (HFC-1)
159 * cmd: command to execute, if any.
161 *---------------------------------------------------------------------------*/
162 const struct ihfc_EXIRtable { u_char cmd, *string; }
166 { 0x00 ,"Watchdog Timer Overflow" },
167 { 0x00 ,"Subscriber Awake" },
168 { 0x00 ,"Monitor Status" },
169 { 0x00 ,"Rx Sync Xfer Overflow" },
170 { 0xc0 ,"Rx Frame Overflow" }, /* RMC + RRES */
171 { 0x00 ,"Protocol Error" },
172 { 0x01 ,"Tx Data Underrun" }, /* XRES */
173 { 0x01 ,"Tx Message Repeat" }, /* XRES */
176 /*---------------------------------------------------------------------------*
177 * Ramptables related to S/Q - channel (HFC-1/S/SP)
179 * From TE's viewpoint:
181 * S: indications from NT
183 * From NT's viewpoint:
184 * Q: indications from TE
188 *---------------------------------------------------------------------------*/
189 const struct ihfc_SQtable { u_char cmd, *string; }
193 { 0x00, "Loss of Power indication" },
194 { 0x00, "ST request" },
196 { 0x00, "LoopBack request (B1/B2)" },
200 { 0x00, "LoopBack request (B1)" },
204 { 0x00, "LoopBack request (B2)" },
205 { 0x00, "V-DCE slave mode" },
206 { 0x00, "V-DTE slave mode" },
215 { 0x00, "Disruptive Operation Indication" },
216 { 0x00, "DTSE-OUT" },
217 { 0x00, "V-DCE master mode" },
218 { 0x00, "ST Indication" },
220 { 0x00, "LoopBack indication (B1/B2)" },
221 { 0x00, "Loss of Received Signal indication" },
222 { 0x00, "LoopBack indication (B2)" },
223 { 0x00, "DTSE-IN and OUT" },
224 { 0x00, "LoopBack indication (B1)" },
225 { 0x00, "Loss of power indication" }
229 #endif /* I4B_IHFC_DRV_H_ */