xref: /netbsd-src/sys/arch/hp300/dev/fhpibreg.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: fhpibreg.h,v 1.6 2005/12/11 12:17:13 christos Exp $	*/
2132b4143Scgd 
36dedb515Scgd /*
4c1e1831bSmycroft  * Copyright (c) 1982, 1990, 1993
5c1e1831bSmycroft  *	The Regents of the University of California.  All rights reserved.
66dedb515Scgd  *
76dedb515Scgd  * Redistribution and use in source and binary forms, with or without
86dedb515Scgd  * modification, are permitted provided that the following conditions
96dedb515Scgd  * are met:
106dedb515Scgd  * 1. Redistributions of source code must retain the above copyright
116dedb515Scgd  *    notice, this list of conditions and the following disclaimer.
126dedb515Scgd  * 2. Redistributions in binary form must reproduce the above copyright
136dedb515Scgd  *    notice, this list of conditions and the following disclaimer in the
146dedb515Scgd  *    documentation and/or other materials provided with the distribution.
15aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
166dedb515Scgd  *    may be used to endorse or promote products derived from this software
176dedb515Scgd  *    without specific prior written permission.
186dedb515Scgd  *
196dedb515Scgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
206dedb515Scgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
216dedb515Scgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
226dedb515Scgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
236dedb515Scgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
246dedb515Scgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
256dedb515Scgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
266dedb515Scgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
276dedb515Scgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
286dedb515Scgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
296dedb515Scgd  * SUCH DAMAGE.
306dedb515Scgd  *
31132b4143Scgd  *	@(#)fhpibreg.h	8.1 (Berkeley) 6/10/93
326dedb515Scgd  */
336dedb515Scgd 
34c1e1831bSmycroft #include <hp300/dev/iotypes.h>	/* XXX */
356dedb515Scgd 
366dedb515Scgd struct	fhpibdevice {
376dedb515Scgd 	u_char	hpib_pad0;
386dedb515Scgd 	vu_char	hpib_cid;
396dedb515Scgd 	u_char	hpib_pad1;
406dedb515Scgd #define	hpib_ie		hpib_ids
416dedb515Scgd 	vu_char	hpib_ids;
426dedb515Scgd 	u_char	hpib_pad2;
436dedb515Scgd 	vu_char	hpib_ctrl2;
446dedb515Scgd 	u_char	hpib_pad3;
456dedb515Scgd 	vu_char	hpib_latch;
466dedb515Scgd 	u_char	hpib_pad4[9];
476dedb515Scgd 	vu_char	hpib_intr;
486dedb515Scgd 	u_char	hpib_pad5;
496dedb515Scgd 	vu_char	hpib_imask;
506dedb515Scgd 	u_char	hpib_pad6;
516dedb515Scgd 	vu_char	hpib_data;
526dedb515Scgd 	u_char	hpib_pad7;
536dedb515Scgd 	vu_char	hpib_stat;
546dedb515Scgd 	u_char	hpib_pad8;
556dedb515Scgd 	vu_char	hpib_cmd;
566dedb515Scgd 	u_char	hpib_pad9;
576dedb515Scgd 	vu_char	hpib_ar;
586dedb515Scgd 	u_char	hpib_pad10;
596dedb515Scgd 	vu_char	hpib_pmask;
606dedb515Scgd 	u_char	hpib_pad11;
616dedb515Scgd 	vu_char	hpib_psense;
626dedb515Scgd };
636dedb515Scgd 
646dedb515Scgd /* status bits */
656dedb515Scgd #define	ST_READ0        0xC0
666dedb515Scgd #define	ST_READ1	0x80
676dedb515Scgd #define	ST_IENAB	0x80
686dedb515Scgd #define	ST_EOI		0x80
696dedb515Scgd #define	ST_ATN		0x40
706dedb515Scgd #define	ST_WRITE	0x00
716dedb515Scgd 
726dedb515Scgd /* control bits */
736dedb515Scgd #define	CT_8BIT		0x80
746dedb515Scgd #define	CT_REN		0x20
756dedb515Scgd #define	CT_IFC		0x10
766dedb515Scgd #define	CT_FIFOSEL	0x02
776dedb515Scgd #define	CT_INITFIFO	0x01
786dedb515Scgd 
796dedb515Scgd #define	IM_PABORT	0x40
806dedb515Scgd #define	IM_PPRESP	0x20
816dedb515Scgd #define	IM_ROOM		0x08
826dedb515Scgd #define	IM_BYTE		0x04
836dedb515Scgd #define	IM_IDLE		0x02
846dedb515Scgd 
856dedb515Scgd #define	AR_ARONC	0x80
86