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