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