xref: /csrg-svn/sys/vax/uba/udareg.h (revision 29252)
123354Smckusick /*
2*29252Smckusick  * Copyright (c) 1982, 1986 Regents of the University of California.
323354Smckusick  * All rights reserved.  The Berkeley software License Agreement
423354Smckusick  * specifies the terms and conditions for redistribution.
523354Smckusick  *
6*29252Smckusick  *	@(#)udareg.h	7.1 (Berkeley) 06/05/86
723354Smckusick  */
84741Swnj 
94741Swnj /*
104741Swnj  * UDA-50 registers and structures
114741Swnj  */
124741Swnj 
134741Swnj struct udadevice {
144741Swnj 	short	udaip;		/* initialization and polling */
154741Swnj 	short	udasa;		/* status and address */
164741Swnj };
174741Swnj 
184741Swnj #define	UDA_ERR		0100000	/* error bit */
194741Swnj #define	UDA_STEP4	0040000	/* step 4 has started */
204741Swnj #define	UDA_STEP3	0020000	/* step 3 has started */
214741Swnj #define	UDA_STEP2	0010000	/* step 2 has started */
224741Swnj #define	UDA_STEP1	0004000	/* step 1 has started */
234741Swnj #define	UDA_NV		0002000	/* no host settable interrupt vector */
244741Swnj #define	UDA_QB		0001000	/* controller supports Q22 bus */
254741Swnj #define	UDA_DI		0000400	/* controller implements diagnostics */
264741Swnj #define	UDA_IE		0000200	/* interrupt enable */
274741Swnj #define	UDA_PI		0000001	/* host requests adapter purge interrupts */
284741Swnj #define	UDA_GO		0000001	/* start operation, after init */
294741Swnj 
304741Swnj 
314741Swnj /*
324741Swnj  * UDA Communications Area
334741Swnj  */
344741Swnj 
354741Swnj struct udaca {
364741Swnj 	short	ca_xxx1;	/* unused */
374741Swnj 	char	ca_xxx2;	/* unused */
384741Swnj 	char	ca_bdp;		/* BDP to purge */
394741Swnj 	short	ca_cmdint;	/* command queue transition interrupt flag */
404741Swnj 	short	ca_rspint;	/* response queue transition interrupt flag */
414741Swnj 	long	ca_rspdsc[NRSP];/* response descriptors */
424741Swnj 	long	ca_cmddsc[NCMD];/* command descriptors */
434741Swnj };
444741Swnj 
454741Swnj #define	ca_ringbase	ca_rspdsc[0]
464741Swnj 
474741Swnj #define	UDA_OWN	0x80000000	/* UDA owns this descriptor */
484741Swnj #define	UDA_INT	0x40000000	/* allow interrupt on ring transition */
494741Swnj 
504741Swnj /*
514741Swnj  * MSCP packet info
524741Swnj  */
534741Swnj struct mscp_header {
544741Swnj 	short	uda_msglen;	/* length of MSCP packet */
554741Swnj 	char	uda_credits;	/* low 4 bits: credits, high 4 bits: msgtype */
564741Swnj 	char	uda_vcid;	/* virtual circuit id */
574741Swnj };
58