167468Snon/* $FreeBSD: releng/10.2/sys/dev/nsp/nspvar.h 240325 2012-09-10 18:49:49Z jhb $ */ 279697Snon/* $NecBSD: nspvar.h,v 1.7.14.5 2001/06/29 06:27:54 honda Exp $ */ 367468Snon/* $NetBSD$ */ 467468Snon 5139749Simp/*- 667468Snon * [NetBSD for NEC PC-98 series] 779697Snon * Copyright (c) 1998, 1999, 2000, 2001 867468Snon * NetBSD/pc98 porting staff. All rights reserved. 979697Snon * 1079697Snon * Copyright (c) 1998, 1999, 2000, 2001 1179697Snon * Naofumi HONDA. All rights reserved. 1267468Snon * 1367468Snon * Redistribution and use in source and binary forms, with or without 1467468Snon * modification, are permitted provided that the following conditions 1567468Snon * are met: 1667468Snon * 1. Redistributions of source code must retain the above copyright 1767468Snon * notice, this list of conditions and the following disclaimer. 1867468Snon * 2. Redistributions in binary form must reproduce the above copyright 1967468Snon * notice, this list of conditions and the following disclaimer in the 2067468Snon * documentation and/or other materials provided with the distribution. 2167468Snon * 3. The name of the author may not be used to endorse or promote products 2267468Snon * derived from this software without specific prior written permission. 2367468Snon * 2467468Snon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2567468Snon * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 2667468Snon * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2767468Snon * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 2867468Snon * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 2967468Snon * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 3067468Snon * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3167468Snon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 3267468Snon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 3367468Snon * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3467468Snon * POSSIBILITY OF SUCH DAMAGE. 3567468Snon */ 3667468Snon 3767468Snon#ifndef _NSPVAR_H_ 3867468Snon#define _NSPVAR_H_ 3967468Snon 4067468Snon/***************************************************************** 4167468Snon * Host adapter structure 4267468Snon *****************************************************************/ 4367468Snonstruct nsp_softc { 4467468Snon struct scsi_low_softc sc_sclow; /* generic data */ 4567468Snon 4667468Snon bus_space_tag_t sc_iot; 4767468Snon bus_space_handle_t sc_ioh; 4867468Snon bus_space_tag_t sc_memt; 4967468Snon bus_space_handle_t sc_memh; 5067468Snon 5179697Snon int port_rid; 5279697Snon int irq_rid; 5379697Snon int mem_rid; 5479697Snon struct resource *port_res; 5579697Snon struct resource *irq_res; 5679697Snon struct resource *mem_res; 5779697Snon 5879697Snon void *nsp_intrhand; 5979697Snon 6079697Snon int sc_tmaxcnt; /* timeout count */ 6167468Snon int sc_seltout; /* selection timeout counter */ 6267468Snon int sc_timer; /* timer start */ 6367468Snon 6479697Snon int sc_suspendio; /* SMIT: data suspendio bytes */ 6579697Snon u_int8_t sc_xfermr; /* SMIT: fifo control reg */ 6679697Snon int sc_dataout_timeout; /* data out timeout counter */ 6767468Snon 6867468Snon u_int sc_idbit; /* host id bit pattern */ 6967468Snon u_int sc_cnt; /* fifo R/W count (host) */ 7079697Snon 7167468Snon u_int8_t sc_iclkdiv; /* scsi chip clock divisor */ 7267468Snon u_int8_t sc_clkdiv; /* asic chip clock divisor */ 7367468Snon u_int8_t sc_icr; /* interrupt control reg */ 7467468Snon 7567468Snon u_int8_t sc_busc; /* busc registers */ 7679697Snon u_int8_t sc_parr; /* parity control register */ 7767468Snon}; 7867468Snon 7967468Snon/***************************************************************** 8079697Snon * Lun information 8167468Snon *****************************************************************/ 8273025Snonstruct nsp_targ_info { 8379697Snon struct targ_info nti_ti; /* generic lun info */ 8467468Snon 8573025Snon u_int8_t nti_reg_syncr; /* sync registers per devices */ 8673025Snon u_int8_t nti_reg_ackwidth; /* ackwidth per devices */ 8767468Snon}; 8867468Snon 8967468Snon/***************************************************************** 9067468Snon * Proto 9167468Snon *****************************************************************/ 9292739Salfredint nspprobesubr(bus_space_tag_t, bus_space_handle_t, u_int); 9392739Salfredvoid nspattachsubr(struct nsp_softc *); 9492739Salfredint nspintr(void *); 9567468Snon 9667468Snon#endif /* !_NSPVAR_H_ */ 97