Remove nsp(4) driver
nsp(4) is marked as gone in 12. Remove it. There are no sightings of it in the nycbug dmesg database. It was for an obscure SCSI card that sold mostly in Japan, and was especially popilar among pc98 hackers in the 4.x time frame. It was also only enabled on i386. Relnote: Yes
This commit is contained in:
parent
2dfd358865
commit
08204c2cc3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339571
@ -372,7 +372,6 @@ MAN= aac.4 \
|
||||
ng_vjc.4 \
|
||||
ng_vlan.4 \
|
||||
nmdm.4 \
|
||||
nsp.4 \
|
||||
${_ntb.4} \
|
||||
${_ntb_hw_intel.4} \
|
||||
${_ntb_hw_plx.4} \
|
||||
|
@ -1,98 +0,0 @@
|
||||
.\" Copyright (c) 2003 Noriaki MITSUNAGA. All rights reserved.
|
||||
.\" Copyright (c) 2003 Hideyuki KURASHINA. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 8, 2004
|
||||
.Dt NSP 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm nsp
|
||||
.Nd "Workbit Ninja SCSI-3 based PC-Card SCSI host adapter driver"
|
||||
.Sh SYNOPSIS
|
||||
To compile this driver into the kernel,
|
||||
place the following lines in your
|
||||
kernel configuration file:
|
||||
.Bd -ragged -offset indent
|
||||
.Cd "device scbus"
|
||||
.Cd "device nsp"
|
||||
.Ed
|
||||
.Pp
|
||||
Alternatively, to load the driver as a
|
||||
module at boot time, place the following line in
|
||||
.Xr loader.conf 5 :
|
||||
.Bd -literal -offset indent
|
||||
nsp_load="YES"
|
||||
.Ed
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides access to the
|
||||
.Tn SCSI
|
||||
bus connected to a PC-Card
|
||||
.Tn SCSI
|
||||
host adapter based on a Ninja SCSI-3 controller by Workbit.
|
||||
.Sh HARDWARE
|
||||
Controllers supported by the
|
||||
.Nm
|
||||
driver include:
|
||||
.Pp
|
||||
.Bl -bullet -compact
|
||||
.It
|
||||
Alpha-Data AD-PCS201
|
||||
.It
|
||||
I-O DATA CBSC16
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr cd 4 ,
|
||||
.Xr ch 4 ,
|
||||
.Xr da 4 ,
|
||||
.Xr intro 4 ,
|
||||
.Xr pccard 4 ,
|
||||
.Xr sa 4 ,
|
||||
.Xr scsi 4
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
driver has been developed for
|
||||
.Nx Ns / Ns Tn pc98
|
||||
and ported for
|
||||
.Fx .
|
||||
It first appeared in
|
||||
.Fx 3.4
|
||||
with PAO3 and merged in
|
||||
.Fx 4.2 .
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
.Nm
|
||||
driver was written by
|
||||
.An Naofumi HONDA .
|
||||
.Pp
|
||||
This manual page was written by
|
||||
.An Noriaki MITSUNAGA Aq Mt non@FreeBSD.org
|
||||
and
|
||||
.An Hideyuki KURASHINA Aq Mt rushani@FreeBSD.org .
|
||||
.Sh BUGS
|
||||
SMIT mode is only supported under OLDCARD now.
|
@ -428,10 +428,8 @@ device twa # 3ware 9000 series PATA/SATA RAID
|
||||
#
|
||||
# SCSI host adapters:
|
||||
#
|
||||
# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters.
|
||||
# stg: TMC 18C30, 18C50 based SCSI host adapters.
|
||||
|
||||
device nsp
|
||||
device stg
|
||||
|
||||
#
|
||||
|
@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.c optional ctl
|
||||
cam/mmc/mmc_xpt.c optional scbus mmccam
|
||||
cam/mmc/mmc_da.c optional scbus mmccam da
|
||||
cam/scsi/scsi_da.c optional da
|
||||
cam/scsi/scsi_low.c optional nsp | stg
|
||||
cam/scsi/scsi_low.c optional stg
|
||||
cam/scsi/scsi_pass.c optional pass
|
||||
cam/scsi/scsi_pt.c optional pt
|
||||
cam/scsi/scsi_sa.c optional sa
|
||||
|
1817
sys/dev/nsp/nsp.c
1817
sys/dev/nsp/nsp.c
File diff suppressed because it is too large
Load Diff
@ -1,296 +0,0 @@
|
||||
/* $NecBSD: nsp_pisa.c,v 1.4 1999/04/15 01:35:54 kmatsuda Exp $ */
|
||||
/* $NetBSD$ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* [Ported for FreeBSD]
|
||||
* Copyright (c) 2000
|
||||
* Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe.
|
||||
* All rights reserved.
|
||||
* [NetBSD for NEC PC-98 series]
|
||||
* Copyright (c) 1998
|
||||
* NetBSD/pc98 porting staff. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <dev/pccard/pccardvar.h>
|
||||
|
||||
#include <cam/scsi/scsi_low.h>
|
||||
|
||||
#include <dev/nsp/nspreg.h>
|
||||
#include <dev/nsp/nspvar.h>
|
||||
|
||||
#define NSP_HOSTID 7
|
||||
|
||||
#include "pccarddevs.h"
|
||||
|
||||
#define PIO_MODE 0x100 /* pd_flags */
|
||||
|
||||
static int nspprobe(device_t devi);
|
||||
static int nspattach(device_t devi);
|
||||
|
||||
static void nsp_card_unload (device_t);
|
||||
|
||||
const struct pccard_product nsp_products[] = {
|
||||
PCMCIA_CARD(IODATA3, CBSC16),
|
||||
PCMCIA_CARD(PANASONIC, KME),
|
||||
PCMCIA_CARD(WORKBIT2, NINJA_SCSI3),
|
||||
PCMCIA_CARD(WORKBIT, ULTRA_NINJA_16),
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/*
|
||||
* Additional code for FreeBSD new-bus PC Card frontend
|
||||
*/
|
||||
|
||||
static void
|
||||
nsp_pccard_intr(void * arg)
|
||||
{
|
||||
struct nsp_softc *sc;
|
||||
|
||||
sc = arg;
|
||||
SCSI_LOW_LOCK(&sc->sc_sclow);
|
||||
nspintr(sc);
|
||||
SCSI_LOW_UNLOCK(&sc->sc_sclow);
|
||||
}
|
||||
|
||||
static void
|
||||
nsp_release_resource(device_t dev)
|
||||
{
|
||||
struct nsp_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (sc->nsp_intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->nsp_intrhand);
|
||||
if (sc->port_res)
|
||||
bus_release_resource(dev, SYS_RES_IOPORT,
|
||||
sc->port_rid, sc->port_res);
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
sc->irq_rid, sc->irq_res);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
sc->mem_rid, sc->mem_res);
|
||||
mtx_destroy(&sc->sc_sclow.sl_lock);
|
||||
}
|
||||
|
||||
static int
|
||||
nsp_alloc_resource(device_t dev)
|
||||
{
|
||||
struct nsp_softc *sc = device_get_softc(dev);
|
||||
rman_res_t ioaddr, iosize, maddr, msize;
|
||||
int error;
|
||||
|
||||
error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize);
|
||||
if (error || iosize < NSP_IOSIZE)
|
||||
return(ENOMEM);
|
||||
|
||||
mtx_init(&sc->sc_sclow.sl_lock, "nsp", NULL, MTX_DEF);
|
||||
sc->port_rid = 0;
|
||||
sc->port_res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT,
|
||||
&sc->port_rid, NSP_IOSIZE,
|
||||
RF_ACTIVE);
|
||||
if (sc->port_res == NULL) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
}
|
||||
|
||||
sc->irq_rid = 0;
|
||||
sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid,
|
||||
RF_ACTIVE);
|
||||
if (sc->irq_res == NULL) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
}
|
||||
|
||||
error = bus_get_resource(dev, SYS_RES_MEMORY, 0, &maddr, &msize);
|
||||
if (error)
|
||||
return(0); /* XXX */
|
||||
|
||||
/* No need to allocate memory if not configured and it's in PIO mode */
|
||||
if (maddr == 0 || msize == 0) {
|
||||
if ((device_get_flags(dev) & PIO_MODE) == 0) {
|
||||
printf("Memory window was not configured. Configure or use in PIO mode.");
|
||||
nsp_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
}
|
||||
/* no need to allocate memory if PIO mode */
|
||||
return(0);
|
||||
}
|
||||
|
||||
sc->mem_rid = 0;
|
||||
sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
RF_ACTIVE);
|
||||
if (sc->mem_res == NULL) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int
|
||||
nsp_pccard_probe(device_t dev)
|
||||
{
|
||||
const struct pccard_product *pp;
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, nsp_products,
|
||||
sizeof(nsp_products[0]), NULL)) != NULL) {
|
||||
if (pp->pp_name)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
return(EIO);
|
||||
}
|
||||
|
||||
static int
|
||||
nsp_pccard_attach(device_t dev)
|
||||
{
|
||||
struct nsp_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
error = nsp_alloc_resource(dev);
|
||||
if (error)
|
||||
return(error);
|
||||
if (nspprobe(dev) == 0) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENXIO);
|
||||
}
|
||||
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY |
|
||||
INTR_MPSAFE, NULL, nsp_pccard_intr, sc, &sc->nsp_intrhand);
|
||||
if (error) {
|
||||
nsp_release_resource(dev);
|
||||
return(error);
|
||||
}
|
||||
if (nspattach(dev) == 0) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENXIO);
|
||||
}
|
||||
gone_in_dev(dev, 12, "nsp(4) driver");
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int
|
||||
nsp_pccard_detach(device_t dev)
|
||||
{
|
||||
nsp_card_unload(dev);
|
||||
nsp_release_resource(dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static device_method_t nsp_pccard_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, nsp_pccard_probe),
|
||||
DEVMETHOD(device_attach, nsp_pccard_attach),
|
||||
DEVMETHOD(device_detach, nsp_pccard_detach),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t nsp_pccard_driver = {
|
||||
"nsp",
|
||||
nsp_pccard_methods,
|
||||
sizeof(struct nsp_softc),
|
||||
};
|
||||
|
||||
static devclass_t nsp_devclass;
|
||||
|
||||
MODULE_DEPEND(nsp, scsi_low, 1, 1, 1);
|
||||
DRIVER_MODULE(nsp, pccard, nsp_pccard_driver, nsp_devclass, 0, 0);
|
||||
PCCARD_PNP_INFO(nsp_products);
|
||||
|
||||
static void
|
||||
nsp_card_unload(device_t devi)
|
||||
{
|
||||
struct nsp_softc *sc = device_get_softc(devi);
|
||||
|
||||
scsi_low_deactivate(&sc->sc_sclow);
|
||||
scsi_low_detach(&sc->sc_sclow);
|
||||
}
|
||||
|
||||
static int
|
||||
nspprobe(device_t devi)
|
||||
{
|
||||
int rv;
|
||||
struct nsp_softc *sc = device_get_softc(devi);
|
||||
|
||||
rv = nspprobesubr(sc->port_res,
|
||||
device_get_flags(devi));
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
nspattach(device_t devi)
|
||||
{
|
||||
struct nsp_softc *sc;
|
||||
struct scsi_low_softc *slp;
|
||||
u_int32_t flags = device_get_flags(devi);
|
||||
u_int iobase = bus_get_resource_start(devi, SYS_RES_IOPORT, 0);
|
||||
|
||||
if (iobase == 0) {
|
||||
device_printf(devi, "no ioaddr is given\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc = device_get_softc(devi);
|
||||
slp = &sc->sc_sclow;
|
||||
slp->sl_dev = devi;
|
||||
|
||||
if (sc->mem_res == NULL) {
|
||||
device_printf(devi,
|
||||
"WARNING: CANNOT GET Memory RESOURCE going PIO mode\n");
|
||||
flags |= PIO_MODE;
|
||||
}
|
||||
|
||||
/* slp->sl_irq = devi->pd_irq; */
|
||||
sc->sc_iclkdiv = CLKDIVR_20M;
|
||||
sc->sc_clkdiv = CLKDIVR_40M;
|
||||
|
||||
slp->sl_hostid = NSP_HOSTID;
|
||||
slp->sl_cfgflags = flags;
|
||||
|
||||
nspattachsubr(sc);
|
||||
|
||||
return(NSP_IOSIZE);
|
||||
}
|
@ -1,223 +0,0 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $NecBSD: nspreg.h,v 1.4.14.3 2001/06/29 06:27:53 honda Exp $ */
|
||||
/* $NetBSD$ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* [NetBSD for NEC PC-98 series]
|
||||
* Copyright (c) 1998
|
||||
* NetBSD/pc98 porting staff. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _NSPREG_H_
|
||||
#define _NSPREG_H_
|
||||
|
||||
/* base registers */
|
||||
#define nsp_irqcr 0
|
||||
#define IRQCR_RESCL 0x01
|
||||
#define IRQCR_PHCL 0x02
|
||||
#define IRQCR_TIMERCL 0x04
|
||||
#define IRQCR_FIFOCL 0x08
|
||||
#define IRQCR_SCSIIDIS 0x10
|
||||
#define IRQCR_EXTIDIS 0x20
|
||||
#define IRQCR_TIMERIDIS 0x40
|
||||
#define IRQCR_FIFOIDIS 0x80
|
||||
#define IRQCR_ALLMASK 0xff
|
||||
#define IRQCR_IRQDIS 0xf0
|
||||
|
||||
#define nsp_irqsr 0
|
||||
#define IRQSR_SCSI 0x01
|
||||
#define IRQSR_EXT 0x02
|
||||
#define IRQSR_TIMER 0x04
|
||||
#define IRQSR_FIFO 0x08
|
||||
#define IRQSR_MASK 0x0f
|
||||
|
||||
#define nsp_ifselr 1
|
||||
#define IFSELR_IFSEL 0x01
|
||||
#define IFSELR_REGSEL 0x04
|
||||
|
||||
#define nsp_fifosr 1
|
||||
#define FIFOSR_CHIPREVM 0x0f
|
||||
#define FIFOSR_CHIPIDM 0x70
|
||||
#define FIFOSR_FULLEMP 0x80
|
||||
|
||||
#define nsp_idxr 2
|
||||
#define nsp_datar 3
|
||||
#define nsp_fifodr 4
|
||||
|
||||
/* indexed registers */
|
||||
#define NSPR_EXTBUSC 0x10
|
||||
|
||||
#define NSPR_CLKDIVR 0x11
|
||||
#define CLKDIVR_40M 0x02
|
||||
#define CLKDIVR_20M 0x01
|
||||
|
||||
#define NSPR_TERMPWRC 0x13
|
||||
#define TERMPWRC_POWON 0x01
|
||||
|
||||
#define NSPR_SCIENR 0x15
|
||||
#define SCIENR_SCCHG 0x01
|
||||
#define SCIENR_RESEL 0x10
|
||||
#define SCIENR_FIFO 0x20
|
||||
#define SCIENR_RST 0x40
|
||||
|
||||
#define NSPR_IRQPHS 0x16
|
||||
#define IRQPHS_LMSG 0x01
|
||||
#define IRQPHS_LIO 0x02
|
||||
#define IRQPHS_LCD 0x04
|
||||
#define IRQPHS_LBF 0x08
|
||||
#define IRQPHS_PCHG 0x10
|
||||
#define IRQPHS_RSEL 0x20
|
||||
#define IRQPHS_FIFO 0x40
|
||||
#define IRQPHS_RST 0x80
|
||||
#define IRQPHS_PHMASK (IRQPHS_LCD | IRQPHS_LMSG | IRQPHS_LIO)
|
||||
|
||||
#define NSPR_TIMERCNT 0x17
|
||||
|
||||
#define NSPR_SCBUSCR 0x18
|
||||
#define SCBUSCR_SEL 0x01
|
||||
#define SCBUSCR_RST 0x02
|
||||
#define SCBUSCR_DOUT 0x04
|
||||
#define SCBUSCR_ATN 0x08
|
||||
#define SCBUSCR_ACK 0x10
|
||||
#define SCBUSCR_BSY 0x20
|
||||
#define SCBUSCR_ADIR 0x40
|
||||
#define SCBUSCR_ACKEN 0x80
|
||||
|
||||
#define NSPR_SCBUSMON 0x19
|
||||
#define SCBUSMON_MSG 0x01
|
||||
#define SCBUSMON_IO 0x02
|
||||
#define SCBUSMON_CD 0x04
|
||||
#define SCBUSMON_BSY 0x08
|
||||
#define SCBUSMON_ACK 0x10
|
||||
#define SCBUSMON_REQ 0x20
|
||||
#define SCBUSMON_SEL 0x40
|
||||
#define SCBUSMON_ATN 0x80
|
||||
|
||||
#define NSPR_SETARBIT 0x1A
|
||||
|
||||
#define NSPR_ARBITS 0x1A
|
||||
#define ARBITS_EXEC 0x01
|
||||
#define ARBITS_CLR 0x02
|
||||
#define ARBITS_WIN 0x02
|
||||
#define ARBITS_FAIL 0x04
|
||||
#define ARBITS_RESEL 0x08
|
||||
|
||||
#define NSPR_PARITYR 0x1B /* (W/R) */
|
||||
#define PARITYR_ENABLE 0x01
|
||||
#define PARITYR_CLEAR 0x02
|
||||
#define PARITYR_PE 0x02
|
||||
|
||||
#define NSPR_CMDCR 0x1C /* (W) */
|
||||
#define CMDCR_PTCLR 0x01
|
||||
#define CMDCR_EXEC 0x02
|
||||
|
||||
#define NSPR_RESELR 0x1C /* (R) */
|
||||
#define NSPR_CMDDR 0x1D /* (W/R) */
|
||||
|
||||
#define NSPR_PTCLRR 0x1E /* (W) */
|
||||
#define PTCLRR_PT 0x01
|
||||
#define PTCLRR_ACK 0x02
|
||||
#define PTCLRR_REQ 0x04
|
||||
#define PTCLRR_HOST 0x08
|
||||
#define PTCLRR_RSS 0x30
|
||||
#define PTCLRR_RSS_ACK 0x00
|
||||
#define PTCLRR_RSS_REQ 0x10
|
||||
#define PTCLRR_RSS_HOST 0x20
|
||||
|
||||
#define NSPR_XFERCR 0x1E /* (R) */
|
||||
|
||||
#define NSPR_XFERMR 0x20
|
||||
#define XFERMR_MEM8 0x01
|
||||
#define XFERMR_MEM32 0x02
|
||||
#define XFERMR_ADR24 0x04
|
||||
#define XFERMR_ADR32 0x08
|
||||
#define XFERMR_IO8 0x10
|
||||
#define XFERMR_IO32 0x20
|
||||
#define XFERMR_XEN 0x40
|
||||
#define XFERMR_FIFOEN 0x80
|
||||
|
||||
#define NSPR_SYNCR 0x21
|
||||
#define SYNCR_OFFM 0x0f
|
||||
#define SYNCR_PERM 0xf0
|
||||
#define SYNCR_PERS 4
|
||||
|
||||
#define NSPR_DATA 0x22
|
||||
#define NSPR_DATAACK 0x23
|
||||
#define NSPR_OCR 0x26
|
||||
#define OCR_ROMEN 0x01
|
||||
#define OCR_TERMPWROUT 0x02
|
||||
#define OCR_TERMPWRS 0x04
|
||||
|
||||
#define NSPR_ACKWIDTH 0x27
|
||||
|
||||
/* SCBUSMON phase defs */
|
||||
#define SCBUSMON_FREE 0
|
||||
#define SCBUSMON_CMD \
|
||||
(SCBUSMON_BSY | SCBUSMON_CD | SCBUSMON_REQ)
|
||||
#define SCBUSMON_MSGIN \
|
||||
(SCBUSMON_BSY | SCBUSMON_MSG | SCBUSMON_IO | SCBUSMON_CD | SCBUSMON_REQ)
|
||||
#define SCBUSMON_MSGOUT \
|
||||
(SCBUSMON_BSY | SCBUSMON_MSG | SCBUSMON_CD | SCBUSMON_REQ)
|
||||
#define SCBUSMON_DATAIN \
|
||||
(SCBUSMON_BSY | SCBUSMON_IO | SCBUSMON_REQ)
|
||||
#define SCBUSMON_DATAOUT \
|
||||
(SCBUSMON_BSY | SCBUSMON_REQ)
|
||||
#define SCBUSMON_STATUS \
|
||||
(SCBUSMON_BSY | SCBUSMON_IO | SCBUSMON_CD | SCBUSMON_REQ)
|
||||
#define SCBUSMON_RESELECT \
|
||||
(SCBUSMON_SEL | SCBUSMON_IO)
|
||||
#define SCBUSMON_PHMASK \
|
||||
(SCBUSMON_SEL | SCBUSMON_CD | SCBUSMON_MSG | SCBUSMON_IO)
|
||||
|
||||
/* Data phase */
|
||||
#define NSP_IS_PHASE_DATA(ph) \
|
||||
((((ph) & SCBUSMON_PHMASK) & ~SCBUSMON_IO) == 0)
|
||||
#define NSP_IS_IRQPHS_DATA(ph) \
|
||||
((((ph) & IRQPHS_PHMASK) & ~SCBUSMON_IO) == 0)
|
||||
|
||||
/* SCSI phase */
|
||||
#define PHASE_CMD (SCBUSMON_CMD & SCBUSMON_PHMASK)
|
||||
#define PHASE_DATAIN (SCBUSMON_DATAIN & SCBUSMON_PHMASK)
|
||||
#define PHASE_DATAOUT (SCBUSMON_DATAOUT & SCBUSMON_PHMASK)
|
||||
#define PHASE_STATUS (SCBUSMON_STATUS & SCBUSMON_PHMASK)
|
||||
#define PHASE_MSGIN (SCBUSMON_MSGIN & SCBUSMON_PHMASK)
|
||||
#define PHASE_MSGOUT (SCBUSMON_MSGOUT & SCBUSMON_PHMASK)
|
||||
#define PHASE_SEL (SCBUSMON_SEL | SCBUSMON_IO)
|
||||
|
||||
#define IRQPHS_CMD (IRQPHS_LCD)
|
||||
#define IRQPHS_DATAIN (IRQPHS_LIO)
|
||||
#define IRQPHS_DATAOUT (0)
|
||||
#define IRQPHS_STATUS (IRQPHS_LCD | IRQPHS_LIO)
|
||||
#define IRQPHS_MSGIN (IRQPHS_LCD | IRQPHS_LMSG | IRQPHS_LIO)
|
||||
#define IRQPHS_MSGOUT (IRQPHS_LCD | IRQPHS_LMSG)
|
||||
|
||||
/* Size */
|
||||
#define NSP_MEMSIZE NBPG
|
||||
#define NSP_IOSIZE 16
|
||||
#define NSP_BUFFER_SIZE 512
|
||||
#endif /* !_NSPREG_H_ */
|
@ -1,93 +0,0 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $NecBSD: nspvar.h,v 1.7.14.5 2001/06/29 06:27:54 honda Exp $ */
|
||||
/* $NetBSD$ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* [NetBSD for NEC PC-98 series]
|
||||
* Copyright (c) 1998, 1999, 2000, 2001
|
||||
* NetBSD/pc98 porting staff. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 1998, 1999, 2000, 2001
|
||||
* Naofumi HONDA. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _NSPVAR_H_
|
||||
#define _NSPVAR_H_
|
||||
|
||||
/*****************************************************************
|
||||
* Host adapter structure
|
||||
*****************************************************************/
|
||||
struct nsp_softc {
|
||||
struct scsi_low_softc sc_sclow; /* generic data */
|
||||
|
||||
int port_rid;
|
||||
int irq_rid;
|
||||
int mem_rid;
|
||||
struct resource *port_res;
|
||||
struct resource *irq_res;
|
||||
struct resource *mem_res;
|
||||
|
||||
void *nsp_intrhand;
|
||||
|
||||
int sc_tmaxcnt; /* timeout count */
|
||||
int sc_seltout; /* selection timeout counter */
|
||||
int sc_timer; /* timer start */
|
||||
|
||||
int sc_suspendio; /* SMIT: data suspendio bytes */
|
||||
u_int8_t sc_xfermr; /* SMIT: fifo control reg */
|
||||
int sc_dataout_timeout; /* data out timeout counter */
|
||||
|
||||
u_int sc_idbit; /* host id bit pattern */
|
||||
u_int sc_cnt; /* fifo R/W count (host) */
|
||||
|
||||
u_int8_t sc_iclkdiv; /* scsi chip clock divisor */
|
||||
u_int8_t sc_clkdiv; /* asic chip clock divisor */
|
||||
u_int8_t sc_icr; /* interrupt control reg */
|
||||
|
||||
u_int8_t sc_busc; /* busc registers */
|
||||
u_int8_t sc_parr; /* parity control register */
|
||||
};
|
||||
|
||||
/*****************************************************************
|
||||
* Lun information
|
||||
*****************************************************************/
|
||||
struct nsp_targ_info {
|
||||
struct targ_info nti_ti; /* generic lun info */
|
||||
|
||||
u_int8_t nti_reg_syncr; /* sync registers per devices */
|
||||
u_int8_t nti_reg_ackwidth; /* ackwidth per devices */
|
||||
};
|
||||
|
||||
/*****************************************************************
|
||||
* Proto
|
||||
*****************************************************************/
|
||||
int nspprobesubr(struct resource *, u_int);
|
||||
void nspattachsubr(struct nsp_softc *);
|
||||
int nspintr(void *);
|
||||
|
||||
#endif /* !_NSPVAR_H_ */
|
@ -659,10 +659,8 @@ device twa # 3ware 9000 series PATA/SATA RAID
|
||||
#
|
||||
# SCSI host adapters:
|
||||
#
|
||||
# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters.
|
||||
# stg: TMC 18C30, 18C50 based SCSI host adapters.
|
||||
|
||||
device nsp
|
||||
device stg
|
||||
hint.stg.0.at="isa"
|
||||
hint.stg.0.port="0x140"
|
||||
|
@ -279,7 +279,6 @@ SUBDIR= \
|
||||
nfssvc \
|
||||
nge \
|
||||
nmdm \
|
||||
${_nsp} \
|
||||
nullfs \
|
||||
${_ntb} \
|
||||
${_nvd} \
|
||||
@ -756,7 +755,6 @@ _glxiic= glxiic
|
||||
_glxsb= glxsb
|
||||
#_ibcs2= ibcs2
|
||||
_ncr= ncr
|
||||
_nsp= nsp
|
||||
_pcfclock= pcfclock
|
||||
_pst= pst
|
||||
_sbni= sbni
|
||||
|
@ -1,10 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/dev/nsp
|
||||
|
||||
KMOD= nsp
|
||||
SRCS= nsp.c nsp_pccard.c
|
||||
SRCS+= device_if.h bus_if.h pci_if.h isa_if.h card_if.h pccarddevs.h
|
||||
SRCS+= opt_cam.h opt_scsi.h opt_ddb.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
Loading…
Reference in New Issue
Block a user