1 /* $NetBSD: cscreg.h,v 1.1 2001/10/05 22:27:55 reinoud Exp $ */ 2 3 /*- 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Scott Stevens. 9 * 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. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the NetBSD 21 * Foundation, Inc. and its contributors. 22 * 4. Neither the name of The NetBSD Foundation nor the names of its 23 * contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39 /* 40 * Cumana SCSI-2 with FAS216 SCSI interface hardware description. 41 */ 42 43 #ifndef _CSCREG_H_ 44 #define _CSCREG_H_ 45 46 #include <acorn32/podulebus/sfasvar.h> 47 48 typedef volatile unsigned short vu_short; 49 50 typedef struct csc_regmap { 51 sfas_regmap_t FAS216; 52 vu_char *status0; 53 vu_char *alatch; 54 vu_short *dack; 55 } csc_regmap_t; 56 typedef csc_regmap_t *csc_regmap_p; 57 58 /* 59 * Register information 60 */ 61 #define CSC_STATUS0 0x0000 62 #define CSC_ALATCH 0x0014 63 #define CSC_DACK 0x0200 64 #define CSC_FAS_OFFSET_BASE 0x0300 65 #define CSC_FAS_OFFSET_TCL 0x00 66 #define CSC_FAS_OFFSET_TCM 0x04 67 #define CSC_FAS_OFFSET_FIFO 0x08 68 #define CSC_FAS_OFFSET_COMMAND 0x0c 69 #define CSC_FAS_OFFSET_DESTID 0x10 70 #define CSC_FAS_OFFSET_TIMEOUT 0x14 71 #define CSC_FAS_OFFSET_PERIOD 0x18 72 #define CSC_FAS_OFFSET_OFFSET 0x1c 73 #define CSC_FAS_OFFSET_CONFIG1 0x20 74 #define CSC_FAS_OFFSET_CLKCONV 0x24 75 #define CSC_FAS_OFFSET_TEST 0x28 76 #define CSC_FAS_OFFSET_CONFIG2 0x2c 77 #define CSC_FAS_OFFSET_CONFIG3 0x30 78 #define CSC_FAS_OFFSET_TCH 0x38 79 #define CSC_FAS_OFFSET_FIFOBOT 0x3c 80 81 #define CSC_STATUS0_INT 0x01 82 #define CSC_STATUS0_DREQ 0x02 83 #define CSC_STATUS0_EDOUT 0x04 84 #define CSC_STATUS0_LATCHED 0x08 85 86 #define CSC_ALATCH_DEFS_P7 0x01 87 #define CSC_ALATCH_DEFS_INTEN 0x02 88 #define CSC_ALATCH_DEFS_TERM 0x04 89 #define CSC_ALATCH_DEFS_RSVD 0x08 90 #define CSC_ALATCH_DEFS_PROG 0x10 91 #define CSC_ALATCH_DEFS_DMA32 0x20 92 #define CSC_ALATCH_DEFS_DMAEN 0x40 93 #define CSC_ALATCH_DEFS_DMADIR 0x80 94 95 #endif 96