mb86601reg.h revision 1.1 1 /* $NetBSD: mb86601reg.h,v 1.1 1997/10/19 09:29:25 oki Exp $ */
2
3 /*
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Van Jacobson of Lawrence Berkeley Laboratory.
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 University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)scsireg.h 8.1 (Berkeley) 6/10/93
39 */
40
41 /*
42 * FUJITSU MB86601A SCSI Protocol Controler Hardware Description.
43 */
44
45 struct mb86601 {
46 u_char p32, scsi_bdid;
47 u_char p34, scsi_sctl;
48 #define SCTL_DISABLE 0x80
49 #define SCTL_CTRLRST 0x40
50 #define SCTL_DIAG 0x20
51 #define SCTL_ABRT_ENAB 0x10
52 #define SCTL_PARITY_ENAB 0x08
53 #define SCTL_SEL_ENAB 0x04
54 #define SCTL_RESEL_ENAB 0x02
55 #define SCTL_INTR_ENAB 0x01
56 u_char p36, scsi_scmd;
57 #define SCMD_RST 0x10
58 #define SCMD_ICPT_XFR 0x08
59 #define SCMD_PROG_XFR 0x04
60 #define SCMD_PAD 0x01 /* if initiator */
61 #define SCMD_PERR_STOP 0x01 /* if target */
62 /* command codes */
63 #define SCMD_BUS_REL 0x00
64 #define SCMD_SELECT 0x20
65 #define SCMD_RST_ATN 0x40
66 #define SCMD_SET_ATN 0x60
67 #define SCMD_XFR 0x80
68 #define SCMD_XFR_PAUSE 0xa0
69 #define SCMD_RST_ACK 0xc0
70 #define SCMD_SET_ACK 0xe0
71 u_char p38, scsi_tmod;
72 #define TMOD_SYNC 0x80
73 u_char p40, scsi_ints;
74 #define INTS_SEL 0x80
75 #define INTS_RESEL 0x40
76 #define INTS_DISCON 0x20
77 #define INTS_CMD_DONE 0x10
78 #define INTS_SRV_REQ 0x08
79 #define INTS_TIMEOUT 0x04
80 #define INTS_HARD_ERR 0x02
81 #define INTS_RST 0x01
82 u_char p42, scsi_psns;
83 #define PSNS_REQ 0x80
84 #define PSNS_ACK 0x40
85 #define PSNS_ATN 0x20
86 #define PSNS_SEL 0x10
87 #define PSNS_BSY 0x08
88 u_char p44, scsi_ssts;
89 #define SSTS_INITIATOR 0x80
90 #define SSTS_TARGET 0x40
91 #define SSTS_BUSY 0x20
92 #define SSTS_XFR 0x10
93 #define SSTS_ACTIVE (SSTS_INITIATOR|SSTS_XFR)
94 #define SSTS_RST 0x08
95 #define SSTS_TCZERO 0x04
96 #define SSTS_DREG_FULL 0x02
97 #define SSTS_DREG_EMPTY 0x01
98 u_char p46, scsi_serr;
99 #define SERR_SCSI_PAR 0x80
100 #define SERR_SPC_PAR 0x40
101 #define SERR_TC_PAR 0x08
102 #define SERR_PHASE_ERR 0x04
103 #define SERR_SHORT_XFR 0x02
104 #define SERR_OFFSET 0x01
105 u_char p48, scsi_pctl;
106 #define PCTL_BFINT_ENAB 0x80
107 u_char p50, scsi_mbc;
108 u_char p52, scsi_dreg;
109 u_char p54, scsi_temp;
110 u_char p56, scsi_tch;
111 u_char p58, scsi_tcm;
112 u_char p60, scsi_tcl;
113 u_char p62, scsi_exbf;
114 };
115