xref: /netbsd-src/sys/arch/hp300/dev/hp98265reg.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: hp98265reg.h,v 1.2 2005/12/11 12:17:14 christos Exp $	*/
20da9bed8Stsutsui 
30da9bed8Stsutsui /*
40da9bed8Stsutsui  * Copyright (c) 1990, 1993
50da9bed8Stsutsui  *	The Regents of the University of California.  All rights reserved.
60da9bed8Stsutsui  *
70da9bed8Stsutsui  * This code is derived from software contributed to Berkeley by
80da9bed8Stsutsui  * Van Jacobson of Lawrence Berkeley Laboratory.
90da9bed8Stsutsui  *
100da9bed8Stsutsui  * Redistribution and use in source and binary forms, with or without
110da9bed8Stsutsui  * modification, are permitted provided that the following conditions
120da9bed8Stsutsui  * are met:
130da9bed8Stsutsui  * 1. Redistributions of source code must retain the above copyright
140da9bed8Stsutsui  *    notice, this list of conditions and the following disclaimer.
150da9bed8Stsutsui  * 2. Redistributions in binary form must reproduce the above copyright
160da9bed8Stsutsui  *    notice, this list of conditions and the following disclaimer in the
170da9bed8Stsutsui  *    documentation and/or other materials provided with the distribution.
180da9bed8Stsutsui  * 3. Neither the name of the University nor the names of its contributors
190da9bed8Stsutsui  *    may be used to endorse or promote products derived from this software
200da9bed8Stsutsui  *    without specific prior written permission.
210da9bed8Stsutsui  *
220da9bed8Stsutsui  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
230da9bed8Stsutsui  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
240da9bed8Stsutsui  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
250da9bed8Stsutsui  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
260da9bed8Stsutsui  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
270da9bed8Stsutsui  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
280da9bed8Stsutsui  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
290da9bed8Stsutsui  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
300da9bed8Stsutsui  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
310da9bed8Stsutsui  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
320da9bed8Stsutsui  * SUCH DAMAGE.
330da9bed8Stsutsui  *
340da9bed8Stsutsui  *	@(#)scsireg.h	8.1 (Berkeley) 6/10/93
350da9bed8Stsutsui  */
360da9bed8Stsutsui 
370da9bed8Stsutsui /*
380da9bed8Stsutsui  * HP 98265A SCSI Interface Hardware Description.
390da9bed8Stsutsui  */
400da9bed8Stsutsui 
410da9bed8Stsutsui #define SPC_OFFSET	32
420da9bed8Stsutsui #define SPC_SIZE	(32 * 2)	/* XXX */
430da9bed8Stsutsui 
440da9bed8Stsutsui #define HPSCSI_ID	0x00
450da9bed8Stsutsui #define  ID_MASK	0x1f
460da9bed8Stsutsui #define  SCSI_ID	0x07
470da9bed8Stsutsui #define  ID_WORD_DMA	0x20
480da9bed8Stsutsui 
490da9bed8Stsutsui #define HPSCSI_CSR	0x01
500da9bed8Stsutsui #define  CSR_IE		0x80
510da9bed8Stsutsui #define  CSR_IR		0x40
520da9bed8Stsutsui #define  SCSI_IPL(csr)	((((csr) >> 4) & 3) + 3)
530da9bed8Stsutsui #define  CSR_DMA32	0x08
540da9bed8Stsutsui #define  CSR_DMAIN	0x04
550da9bed8Stsutsui #define  CSR_DE1	0x02
560da9bed8Stsutsui #define  CSR_DE0	0x01
570da9bed8Stsutsui 
580da9bed8Stsutsui #define HPSCSI_WRAP	0x02
590da9bed8Stsutsui #define  WRAP_REQ	0x80
600da9bed8Stsutsui #define  WRAP_ACK	0x40
610da9bed8Stsutsui #define  WRAP_BSY	0x08
620da9bed8Stsutsui #define  WRAP_MSG	0x04
630da9bed8Stsutsui #define  WRAP_CD	0x02
640da9bed8Stsutsui #define  WRAP_IO	0x01
650da9bed8Stsutsui 
660da9bed8Stsutsui #define HPSCSI_HCONF	0x03
670da9bed8Stsutsui #define  HCONF_TP	0x80
680da9bed8Stsutsui #define  SCSI_SYNC_XFER(hconf) (((hconf) >> 5) & 3)
690da9bed8Stsutsui #define  HCONF_SD	0x10
700da9bed8Stsutsui #define  HCONF_PARITY	0x08
71