/* $Id: hpsctrl.h,v 2.2 91/01/10 20:39:53 dave Exp $ */
/****************************************************************/
/* hpsctrl.h													*/
/****************************************************************/
/*																*/
/*                 Confidential Information                     */
/*      Limited Distribution to Authorized Persons Only         */
/*     Created 1988 and Protected as an Unpublished Work        */
/*          Under the U.S. Copyright Act of 1976.               */
/*         Copyright (c) 1986,'88, Systech Corporation          */
/*                  All Rights Reserved                         */
/*																*/
/*	THIS SOFTWARE IS LICENSED BY AND IS THE	CONFIDENTIAL AND 	*/
/*	PROPRIETARY PROPERTY OF SYSTECH COMPUTER CORPORATION AND 	*/
/*	MAY NOT, WITHOUT THE PRIOR WRITTEN CONSENT OF SYSTECH 		*/
/*	COMPUTER CORPORATION, BE REPRODUCED, USED OR DISCLOSED 		*/
/*	EXCEPT IN ACCORDANCE WITH A SYSTECH COMPUTER CORPORATION 	*/
/*	SOFTWARE LICENSE AGREEMENT.									*/
/****************************************************************/

struct hpsctrl
{
	dev_t	 h_dev;			 /* minor device number for this HPS	*/
	short	 hpsslot;		 /* slot in cardcage occupied by HPS	*/
	struct	 HPS6816 *hpsio; /* address of I/O space in shared RAM	*/
	IOCBHDR	*buf_hd;		 /* iocb buffer pool head				*/
	IOCBHDR	*buf_tl;		 /* iocb buffer pool tail				*/
	unsigned short buf_no;	 /* number of iocb buffers in free pool	*/
#ifdef EISA
	char	 hps_bflags;	 /* Flags changed only in base routines	*/
	char	 hps_iflags;	 /* Various HPS flags					*/
#else
	short	 rhp_flags;		 /* set if process waiting for buffer	*/
#endif
	IOCBHDR	*iocbq_head;	 /* IOCB send queue head				*/
	IOCBHDR	*iocbq_tail;	 /* IOCB send queue tail				*/
	IOCBHDR	*iocb_waiting;	 /* for non-interrrupt IOCBs			*/
	IOCBHDR	*hps_last;		 /* address of last iocb sent to HPS	*/
	IOCBHDR	*hps_wrbuf;		 /* multi-write buffer address			*/
	IOCBHDR	*hps_rdbuf;		 /* multi-read buffer address			*/
#ifdef EISA
	char	 hps_stintr;	 /* Flag for self-test interrupts		*/
	char	 hps_busy;		 /* Software image of SBUSY status		*/
	char	 hps_col0;		 /* HPS VTIO column zero on output		*/
#else
	short	 hps_ready;		 /* self-test and init complete 		*/
	short	 hps_iflag;		 /* interrupt flag for self-test		*/
	short	 hps_busy;		 /* software image of SBUSY status		*/
	char	 primidle;		 /* flags for NOTIFY_ACT IOCTL			*/
#endif
};

#ifdef EISA
/*
 *	Defines for hps_bflags member.
 */
#define HPS_FOUND		0x01	/* HPS found in slot				*/
#define BIST_DONE		0x02	/* Self-test complete				*/
#define BIST_PASS		0x04	/* Self-test passed					*/
#define BIST_WAIT		0x08	/* Self-test in progress			*/
#define BIST_SLEEP		0x10	/* Process waiting for Self-test	*/

/*
 *	Defines for hps_iflags member.
 */
#define PIDLE_SLEEP		0x01	/* Process waiting for PRIM IDLE	*/
#define PIDLE_CHANGE	0x02	/* PRIM IDLE detected				*/
#define IOCB_SLEEP		0x04	/* Waiting for a free IOCB			*/
#define IOCB_TACT		0x08	/* IOCB completion timer active		*/
#endif

/*
 * MODIFICATION HISTORY:
 *
 * $Log:	hpsctrl.h,v $
 * Revision 1.1.2.1  92/06/24  13:53:37  marker
 * Branch RISCOS_5_01_2_FIXES off of trunk.
 * 
 * Revision 2.2  91/01/10  20:39:53  dave
 * Update header.
 * COSMETIC
 * 
 */
