xref: /freebsd-12.1/sys/dev/ncv/ncr53c500var.h (revision 718cf2cc)
1 /*	$FreeBSD$	*/
2 /*	$NecBSD: ncr53c500var.h,v 1.11.18.1 2001/06/08 06:27:45 honda Exp $	*/
3 /*	$NetBSD$	*/
4 
5 /*-
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * [NetBSD for NEC PC-98 series]
9  *  Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001
10  *	NetBSD/pc98 porting staff. All rights reserved.
11  *  Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001
12  *	Naofumi HONDA. All rights reserved.
13  *
14  *  Redistribution and use in source and binary forms, with or without
15  *  modification, are permitted provided that the following conditions
16  *  are met:
17  *  1. Redistributions of source code must retain the above copyright
18  *     notice, this list of conditions and the following disclaimer.
19  *  2. Redistributions in binary form must reproduce the above copyright
20  *     notice, this list of conditions and the following disclaimer in the
21  *     documentation and/or other materials provided with the distribution.
22  *  3. The name of the author may not be used to endorse or promote products
23  *     derived from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
29  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef	_NCR53C500VAR_H_
39 #define	_NCR53C500VAR_H_
40 
41 /*****************************************************************
42  * Host adapter structure
43  *****************************************************************/
44 struct ncv_softc {
45 	struct scsi_low_softc sc_sclow;		/* generic data */
46 
47 	int port_rid;
48 	int port_rid_dmy;
49 	int irq_rid;
50 	int mem_rid;
51 	struct resource *port_res;
52 	struct resource *port_res_dmy;
53 	struct resource *irq_res;
54 	struct resource *mem_res;
55 
56 	void *ncv_intrhand;
57 
58 	int sc_tmaxcnt;
59 	int sc_selstop;			/* sel atn stop asserted */
60 	int sc_compseq;			/* completion seq cmd asserted */
61 	int sc_sdatalen;		/* start datalen */
62 	int sc_tdatalen;		/* temp xfer data len */
63 
64 	struct ncv_hw sc_hw;		/* hardware register images */
65 };
66 
67 /*****************************************************************
68  * Lun information
69  *****************************************************************/
70 struct ncv_targ_info {
71 	struct targ_info nti_ti;
72 
73 	u_int8_t nti_reg_cfg3;		/* cfg3 images per lun */
74 	u_int8_t nti_reg_offset;	/* synch offset register per lun */
75 	u_int8_t nti_reg_period;	/* synch period register per lun */
76 };
77 
78 /*****************************************************************
79  * Proto
80  *****************************************************************/
81 int ncvprobesubr(struct resource *, u_int, int);
82 void ncvattachsubr(struct ncv_softc *);
83 int ncvintr(void *);
84 
85 #endif	/* !_NCR53C500VAR_H_ */
86