ncr53c500var.h revision 97684
1228753Smm/* $FreeBSD: head/sys/dev/ncv/ncr53c500var.h 97684 2002-05-31 23:39:04Z imp $ */ 2228753Smm/* $NecBSD: ncr53c500var.h,v 1.11.18.1 2001/06/08 06:27:45 honda Exp $ */ 3228753Smm/* $NetBSD$ */ 4228753Smm 5228753Smm/* 6228753Smm * [NetBSD for NEC PC-98 series] 7228753Smm * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 8228753Smm * NetBSD/pc98 porting staff. All rights reserved. 9228753Smm * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 10228753Smm * Naofumi HONDA. All rights reserved. 11228753Smm * 12228753Smm * Redistribution and use in source and binary forms, with or without 13228753Smm * modification, are permitted provided that the following conditions 14228753Smm * are met: 15228753Smm * 1. Redistributions of source code must retain the above copyright 16228753Smm * notice, this list of conditions and the following disclaimer. 17228753Smm * 2. Redistributions in binary form must reproduce the above copyright 18228753Smm * notice, this list of conditions and the following disclaimer in the 19228753Smm * documentation and/or other materials provided with the distribution. 20228753Smm * 3. The name of the author may not be used to endorse or promote products 21228753Smm * derived from this software without specific prior written permission. 22228753Smm * 23228753Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24228753Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25228753Smm * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26228753Smm * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 27228753Smm * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28228753Smm * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29228753Smm * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30228753Smm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31228753Smm * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32228753Smm * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33228753Smm * POSSIBILITY OF SUCH DAMAGE. 34228753Smm */ 35228753Smm 36228753Smm#ifndef _NCR53C500VAR_H_ 37228753Smm#define _NCR53C500VAR_H_ 38228753Smm 39228753Smm/***************************************************************** 40228753Smm * Host adapter structure 41228753Smm *****************************************************************/ 42228753Smmstruct ncv_softc { 43228753Smm struct scsi_low_softc sc_sclow; /* generic data */ 44228753Smm 45228753Smm#ifdef __NetBSD__ 46228753Smm bus_space_tag_t sc_iot; 47228753Smm bus_space_tag_t sc_memt; 48228753Smm bus_space_handle_t sc_ioh; 49228753Smm 50228753Smm void *sc_ih; 51228753Smm#endif /* __NetBSD__ */ 52228753Smm 53228753Smm#ifdef __FreeBSD__ 54228753Smm bus_space_tag_t sc_iot; 55228753Smm bus_space_tag_t sc_memt; 56228753Smm bus_space_handle_t sc_ioh; 57228753Smm 58228753Smm int port_rid; 59228753Smm int port_rid_dmy; 60228753Smm int irq_rid; 61228753Smm int mem_rid; 62228753Smm struct resource *port_res; 63228753Smm struct resource *port_res_dmy; 64228753Smm struct resource *irq_res; 65228753Smm struct resource *mem_res; 66228753Smm 67228753Smm void *ncv_intrhand; 68228753Smm#endif /* __FreeBSD__ */ 69228753Smm 70228753Smm int sc_tmaxcnt; 71228753Smm int sc_selstop; /* sel atn stop asserted */ 72228753Smm int sc_compseq; /* completion seq cmd asserted */ 73228753Smm int sc_sdatalen; /* start datalen */ 74228753Smm int sc_tdatalen; /* temp xfer data len */ 75228753Smm 76228753Smm struct ncv_hw sc_hw; /* hardware register images */ 77228753Smm}; 78228753Smm 79228753Smm/***************************************************************** 80228753Smm * Lun information 81228753Smm *****************************************************************/ 82228753Smmstruct ncv_targ_info { 83228753Smm struct targ_info nti_ti; 84228753Smm 85228753Smm u_int8_t nti_reg_cfg3; /* cfg3 images per lun */ 86228753Smm u_int8_t nti_reg_offset; /* synch offset register per lun */ 87228753Smm u_int8_t nti_reg_period; /* synch period register per lun */ 88228753Smm}; 89228753Smm 90228753Smm/***************************************************************** 91228753Smm * Proto 92228753Smm *****************************************************************/ 93228753Smmint ncvprobesubr(bus_space_tag_t, bus_space_handle_t ioh, u_int, int); 94228753Smmvoid ncvattachsubr(struct ncv_softc *); 95228753Smmint ncvprint(void *, const char *); 96228753Smmint ncvintr(void *); 97228753Smm 98228753Smm#if defined(__i386__) && 0 99228753Smm#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq)) 100228753Smm#else /* !__i386__ */ 101228753Smm#define SOFT_INTR_REQUIRED(slp) 102228753Smm#endif /* !__i386__ */ 103228753Smm#endif /* !_NCR53C500VAR_H_ */ 104228753Smm