Debian Codegraph @

drivers/dahdi/wct4xxp/wct4xxp.h

raw symbols SCIP
1 /*
2 * Wildcard T400P FXS Interface Driver for DAHDI Telephony interface
3 *
4 * Written by Mark Spencer <[email protected]>
5 *
6 * Copyright (C) 2001-2010, Digium, Inc.
7 *
8 * All rights reserved.
9 *
10 */
11
12 /*
13 * See http://www.asterisk.org for more information about
14 * the Asterisk project. Please do not directly contact
15 * any of the maintainers of this project for assistance;
16 * the project provides a web site, mailing lists and IRC
17 * channels for your use.
18 *
19 * This program is free software, distributed under the terms of
20 * the GNU General Public License Version 2 as published by the
21 * Free Software Foundation. See the LICENSE file included with
22 * this program for more details.
23 */
24
25 #include <linux/ioctl.h>
26
27 #define FRMR_TTR_BASE 0x10
28 #define FRMR_RTR_BASE 0x0c
29 #define FRMR_TSEO 0xa0
30 #define FRMR_TSBS1 0xa1
31 #define FRMR_CCR1 0x09
32 #define FRMR_CCR1_ITF 0x08
33 #define FRMR_CCR1_EITS 0x10
34 #define FRMR_CCR2 0x0a
35 #define FRMR_CCR2_RCRC 0x04
36 #define FRMR_CCR2_RADD 0x10
37 #define FRMR_MODE 0x03
38 #define FRMR_MODE_NO_ADDR_CMP 0x80
39 #define FRMR_MODE_SS7 0x20
40 #define FRMR_MODE_HRAC 0x08
41 #define FRMR_IMR0 0x14
42 #define FRMR_IMR0_RME 0x80
43 #define FRMR_IMR0_RPF 0x01
44 #define FRMR_IMR1 0x15
45 #define FRMR_IMR1_ALLS 0x20
46 #define FRMR_IMR1_XDU 0x10
47 #define FRMR_IMR1_XPR 0x01
48 #define FRMR_XC0 0x22
49 #define FRMR_XC1 0x23
50 #define FRMR_RC0 0x24
51 #define FRMR_RC1 0x25
52 #define FRMR_SIC1 0x3e
53 #define FRMR_SIC2 0x3f
54 #define FRMR_SIC3 0x40
55 #define FRMR_CMR1 0x44
56 #define FRMR_CMR2 0x45
57 /* OctalFALC Only */
58 #define FRMR_CMR4 0x41
59 #define FRMR_CMR5 0x42
60 #define FRMR_CMR6 0x43
61 #define FRMR_GPC2 0x8a
62 /* End Octal */
63 #define FRMR_GCR 0x46
64 #define FRMR_ISR0 0x68
65 #define FRMR_ISR0_RME 0x80
66 #define FRMR_ISR0_RPF 0x01
67 #define FRMR_ISR1 0x69
68 #define FRMR_ISR1_ALLS 0x20
69 #define FRMR_ISR1_XDU 0x10
70 #define FRMR_ISR1_XPR 0x01
71 #define FRMR_ISR2 0x6a
72 #define FRMR_ISR3 0x6b
73 #define FRMR_ISR4 0x6c
74 #define FRMR_GIS 0x6e
75 #define FRMR_GIS_ISR0 0x01
76 #define FRMR_GIS_ISR1 0x02
77 #define FRMR_GIS_ISR2 0x04
78 #define FRMR_GIS_ISR3 0x08
79 #define FRMR_GIS_ISR4 0x10
80 #define FRMR_CIS 0x6f
81 #define FRMR_CIS_GIS1 0x01
82 #define FRMR_CIS_GIS2 0x02
83 #define FRMR_CIS_GIS3 0x04
84 #define FRMR_CIS_GIS4 0x08
85
86 /* CIS - Octal falc bits */
87 #define FRMR_CIS_GIS5 0x10
88 #define FRMR_CIS_GIS6 0x20
89 #define FRMR_CIS_GIS7 0x40
90 #define FRMR_CIS_GIS8 0x80
91
92 #define FRMR_CMDR 0x02
93 #define FRMR_CMDR_SRES 0x01
94 #define FRMR_CMDR_XRES 0x10
95 #define FRMR_CMDR_RMC 0x80
96 #define FRMR_CMDR_XTF 0x04
97 #define FRMR_CMDR_XHF 0x08
98 #define FRMR_CMDR_XME 0x02
99 #define FRMR_RSIS 0x65
100 #define FRMR_RSIS_VFR 0x80
101 #define FRMR_RSIS_RDO 0x40
102 #define FRMR_RSIS_CRC16 0x20
103 #define FRMR_RSIS_RAB 0x10
104 #define FRMR_RBCL 0x66
105 #define FRMR_RBCL_MAX_SIZE 0x1f
106 #define FRMR_RBCH 0x67
107 #define FRMR_RXFIFO 0x00
108 #define FRMR_SIS 0x64
109 #define FRMR_SIS_XFW 0x40
110 #define FRMR_TXFIFO 0x00
111
112 #define FRS0 0x4c
113 #define FRS0_LOS (1<<7)
114 #define FRS0_LFA (1<<5)
115 #define FRS0_LMFA (1<<1)
116
117 #define FRS1 0x4d
118 #define FRS1_XLS (1<<1)
119 #define FRS1_XLO (1<<0)
120
121 #define NUM_REGS 0xa9
122 #define NUM_PCI 12
123
124 struct t4_regs {
125 unsigned int pci[NUM_PCI];
126 unsigned char regs[NUM_REGS];
127 };
128
129 struct t4_reg {
130 unsigned int reg;
131 unsigned int val;
132 };
133
134 #define WCT4_GET_REGS _IOW(DAHDI_CODE, 60, struct t4_regs)
135 #define WCT4_GET_REG _IOW(DAHDI_CODE, 61, struct t4_reg)
136 #define WCT4_SET_REG _IOW(DAHDI_CODE, 62, struct t4_reg)
137