2 * External Diva Server driver include file
4 * Copyright (C) Eicon Technology Corporation, 2000.
6 * Eicon File Revision : 1.5
8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
21 #define DIA_IOCTL_INIT (0)
22 #define DIA_IOCTL_LOAD (1)
23 #define DIA_IOCTL_CONFIG (2)
24 #define DIA_IOCTL_START (3)
25 #define DIA_IOCTL_GET_NUM (4)
26 #define DIA_IOCTL_GET_LIST (5)
27 #define DIA_IOCTL_LOG (6)
28 #define DIA_IOCTL_DETECT (7)
29 #define DIA_IOCTL_SPACE (8)
30 #define DIA_IOCTL_GET_MEM (9)
31 #define DIA_IOCTL_FLAVOUR (10)
32 #define DIA_IOCTL_XLOG_REQ (11)
36 #define XLOG_ERR_CARD_NUM (13)
37 #define XLOG_ERR_DONE (14)
38 #define XLOG_ERR_CMD (15)
39 #define XLOG_ERR_TIMEOUT (16)
40 #define XLOG_ERR_CARD_STATE (17)
41 #define XLOG_ERR_UNKNOWN (18)
46 #define DIA_UNKNOWN (0)
48 #define DIA_LOADED (2)
49 #define DIA_CONFIGURED (3)
50 #define DIA_RUNNING (4)
52 /* Stucture for getting card specific information from active cad driver */
61 /* use following to select which logging to have active */
63 #define DIVAS_LOG_DEBUG (1 << 0)
64 #define DIVAS_LOG_XLOG (1 << 1)
65 #define DIVAS_LOG_IDI (1 << 2)
66 #define DIVAS_LOG_CAPI (1 << 3)
68 /* stucture for DIA_IOCTL_LOG to get information from adapter */
73 int log_types; /* bit mask of log types: use DIVAS_LOG_XXX */
76 /* list of cards supported by this driver */
78 #define DIA_CARD_TYPE_DIVA_SERVER (0) /* Diva Server PRI */
79 #define DIA_CARD_TYPE_DIVA_SERVER_B (1) /* Diva Server BRI */
80 #define DIA_CARD_TYPE_DIVA_SERVER_Q (2) /* Diva Server 4-BRI */
84 #define DIA_BUS_TYPE_ISA (0)
85 #define DIA_BUS_TYPE_ISA_PNP (1)
86 #define DIA_BUS_TYPE_PCI (2)
87 #define DIA_BUS_TYPE_MCA (3)
89 /* types of memory used (index for memory array below) */
91 #define DIVAS_RAM_MEMORY 0
92 #define DIVAS_REG_MEMORY 1
93 #define DIVAS_CFG_MEMORY 2
94 #define DIVAS_SHARED_MEMORY 3
95 #define DIVAS_CTL_MEMORY 4
97 * card config information
98 * passed as parameter to DIA_IOCTL_INIT ioctl to initialise new card
103 int card_id; /* unique id assigned to this card */
104 int card_type; /* use DIA_CARD_TYPE_xxx above */
105 int bus_type; /* use DIA_BUS_TYPE_xxx above */
106 int bus_num; /* bus number (instance number of bus type) */
107 int func_num; /* adapter function number (PCI register) */
108 int slot; /* slot number in bus */
109 unsigned char irq; /* IRQ number */
110 int reset_base; /* Reset register for I/O mapped cards */
111 int io_base; /* I/O base for I/O mapped cards */
112 void *memory[5]; /* memory base addresses for memory mapped cards */
113 char name[9]; /* name of adapter */
114 int serial; /* serial number */
115 unsigned char int_priority; /* Interrupt priority */
119 * protocol configuration information
120 * passed as parameter to DIA_IOCTL_CONFIG ioctl to configure card
125 int card_id; /* to identify particular card */
128 unsigned char watchdog;
129 unsigned char permanent;
130 unsigned char x_interface;
131 unsigned char stable_l2;
132 unsigned char no_order_check;
133 unsigned char handset_type;
134 unsigned char sig_flags;
135 unsigned char low_channel;
136 unsigned char prot_version;
140 unsigned char oad[32];
141 unsigned char osa[32];
142 unsigned char spid[32];
148 * passed as parameter to DIA_IOCTL_LOAD ioctl
149 * one of these ioctl per code file to load
154 int card_id; /* card to load */
157 DIA_CPU_CODE, /* CPU code */
158 DIA_DSP_CODE, /* DSP code */
159 DIA_CONT_CODE, /* continuation of code */
160 DIA_TABLE_CODE, /* code table */
161 DIA_DLOAD_CNT, /* number of downloads*/
163 } code_type; /* code for CPU or DSP ? */
164 int length; /* length of code */
165 unsigned char *code; /* pointer (in user-space) to code */
169 * start configuration
170 * passed as parameter to DIA_IOCTL_START ioctl
175 int card_id; /* card to start */
178 /* used for retrieving memory from the card */
186 /* DIVA Server specific addresses */
188 #define DIVAS_CPU_START_ADDR (0x0)
189 #define ORG_MAX_PROTOCOL_CODE_SIZE 0x000A0000
190 #define ORG_MAX_DSP_CODE_SIZE (0x000F0000 - ORG_MAX_PROTOCOL_CODE_SIZE)
191 #define ORG_DSP_CODE_BASE (0xBF7F0000 - ORG_MAX_DSP_CODE_SIZE)
192 #define DIVAS_DSP_START_ADDR (0xBF7A0000)
193 #define DIVAS_SHARED_OFFSET (0x1000)
194 #define MP_DSP_CODE_BASE 0xa03a0000
195 #define MQ_PROTCODE_OFFSET 0x100000
196 #define MQ_SM_OFFSET 0X0f0000
198 #define V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000
199 #define V90D_MAX_DSP_CODE_SIZE (0x000F0000 - V90D_MAX_PROTOCOL_CODE_SIZE)
200 #define V90D_DSP_CODE_BASE (0xBF7F0000 - V90D_MAX_DSP_CODE_SIZE)
202 #define MQ_ORG_MAX_PROTOCOL_CODE_SIZE 0x000a0000 /* max 640K Protocol-Code */
203 #define MQ_ORG_MAX_DSP_CODE_SIZE 0x00050000 /* max 320K DSP-Code */
204 #define MQ_ORG_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
205 - MQ_ORG_MAX_DSP_CODE_SIZE)
206 #define MQ_V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000 /* max 576K Protocol-Code */
207 #define MQ_V90D_MAX_DSP_CODE_SIZE 0x00060000 /* max 384K DSP-Code if V.90D included */
208 #define MQ_MAX_DSP_DOWNLOAD_ADDR 0xa03f0000
209 #define MQ_V90D_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
210 - MQ_V90D_MAX_DSP_CODE_SIZE)
213 #define ALIGNMENT_MASK_MAESTRA 0xfffffffc