1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
/* $NetBSD: daicreg.h,v 1.4 2003/12/04 13:57:30 keihan Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Martin Husemann <martin@NetBSD.org>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Shared memory definitions for Diehl activ isdn adapters.
*/
/*
* Values after reset, before isdn support is downloaded
*/
#define DAIC_BOOT_CTRL 0 /* byte */
#define DAIC_BOOT_CARD 1 /* byte */
#define DAIC_BOOT_MSIZE 2 /* byte */
#define DAIC_BOOT_EBIT 4 /* 2 byte */
#define DAIC_BOOT_ELOC 6 /* 4 byte */
#define DAIC_BOOT_SIGNATURE 30 /* 2 byte */
#define DAIC_BOOT_BUF 256 /* 256 bytes */
#define DAIC_SERNO 1008
#define DAIC_SWID 1016
#define DAIC_DOSIO 0x3e8
#define DAIC_MEMFREE 0x3f4
#define DAIC_SET_CARD 0x3fc
#define DAIC_IRQ 0x3fe
#define DAIC_BOOT_START 0
#define DAIC_BOOT_CODE 0x200
#define DAIC_BOOT_END 0x3ff
#define DAIC_BOOT_SET_RESET 0x400 /* byte */
#define DAIC_BOOT_CLR_RESET 0x401 /* byte */
/*
* Parameters for the microcode
*/
#define DAIC_BOOT_TEI 8
#define DAIC_BOOT_NT2 9
#define DAIC_BOOT_ZERO 10
#define DAIC_BOOT_WATCHDOG 11
#define DAIC_BOOT_PERMANENT 12
#define DAIC_BOOT_XINTERFACE 13
/*
* Response from microcode
*/
#define DAIC_SIGNATURE_VALUE 0x4447
/*
* Diagnostic interface
*/
#define DAIC_DIAG_REQ 0x380 /* byte */
#define DAIC_DIAG_RC 0x381 /* byte */
#define DAIC_DIAG_MEM 0x382 /* 4 byte */
#define DAIC_DIAG_LENGTH 0x386 /* 2 byte */
#define DAIC_DIAG_PORT 0x388 /* 2 byte */
#define DAIC_DIAG_DATA 0x390 /* 48 byte */
#define DAIC_DIAG_DATA_SIZE 48
#define DAIC_DIAG_MAXCMD 14
/*
* Values after download, with software running on card
*/
#define DAIC_COM_REQ 0 /* byte */
#define DAIC_COM_REQID 1 /* byte */
#define DAIC_COM_RC 2 /* byte */
#define DAIC_COM_RCID 3 /* byte */
#define DAIC_COM_IND 4 /* byte */
#define DAIC_COM_INDID 5 /* byte */
#define DAIC_COM_IMASK 6 /* byte */
#define DAIC_COM_RNR 7 /* byte */
#define DAIC_COM_XLOCK 8 /* byte */
#define DAIC_COM_INTERRUPT 9 /* byte */
#define DAIC_COM_REQCH 10 /* byte */
#define DAIC_COM_RCCH 11 /* byte */
#define DAIC_COM_INDCH 12 /* byte */
#define DAIC_COM_MIND 13 /* byte */
#define DAIC_COM_MLENGTH 14 /* 2 byte */
#define DAIC_COM_SIGNATURE 30 /* 2 byte */
#define DAIC_COM_XBUFFER 32 /* 272 byte */
#define DAIC_COM_RBUFFER 304 /* 272 byte */
/*
* Diagnostic commands/results
*/
#define DAIC_TEST_RDY 0
#define DAIC_TEST_MEM 1
#define DAIC_TEST_SKIP 2
#define DAIC_TEST_BUSY 3
/*
* ID's of global instances on the card
*/
#define DAIC_GLOBALID_DCHAN 0
#define DAIC_GLOBALID_ISO3 0x20
#define DAIC_GLOBALID_ISO2 0x60
#define DAIC_GLOBALID_TASKS 0x80
#define DAIC_GLOBALID_TIMER 0xa0
#define DAIC_GLOBALID_PHONE 0xc0
/*
* REQUEST codes
*/
#define DAIC_REQ_ASSIGN 0x01
#define DAIC_REQ_INDICATE 0x0a
#define DAIC_REQ_CALL 0x01
/*
* INDICATION codes
*/
#define DAIC_IND_HANGUP 0x03
#define DAIC_IND_INDICATE 0x0a
#define DAIC_IND_INFO 0x0d
/*
* return codes
*/
#define DAIC_RC_UNKNOWN_COMMAND 0x01
#define DAIC_RC_WRONG_COMMAND 0x02
#define DAIC_RC_WRONG_ID 0x03
#define DAIC_RC_WRONG_CH 0x04
#define DAIC_RC_UNKNOWN_IE 0x05
#define DAIC_RC_WRONG_IE 0x06
#define DAIC_RC_OUT_OF_RESRCS 0x07
#define DAIC_RC_ASSIGN_RC 0xe0
#define DAIC_RC_ASSIGN_MASK 0xf0
#define DAIC_RC_ERRMASK 0x0f
#define DAIC_RC_ASSIGN_OK 0xef
#define DAIC_RC_TIMER_INT 0xfe
#define DAIC_RC_OK 0xff
|