xref: /original-bsd/sys/vax/uba/udareg.h (revision 2d18f455)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)udareg.h	7.1 (Berkeley) 06/05/86
7  */
8 
9 /*
10  * UDA-50 registers and structures
11  */
12 
13 struct udadevice {
14 	short	udaip;		/* initialization and polling */
15 	short	udasa;		/* status and address */
16 };
17 
18 #define	UDA_ERR		0100000	/* error bit */
19 #define	UDA_STEP4	0040000	/* step 4 has started */
20 #define	UDA_STEP3	0020000	/* step 3 has started */
21 #define	UDA_STEP2	0010000	/* step 2 has started */
22 #define	UDA_STEP1	0004000	/* step 1 has started */
23 #define	UDA_NV		0002000	/* no host settable interrupt vector */
24 #define	UDA_QB		0001000	/* controller supports Q22 bus */
25 #define	UDA_DI		0000400	/* controller implements diagnostics */
26 #define	UDA_IE		0000200	/* interrupt enable */
27 #define	UDA_PI		0000001	/* host requests adapter purge interrupts */
28 #define	UDA_GO		0000001	/* start operation, after init */
29 
30 
31 /*
32  * UDA Communications Area
33  */
34 
35 struct udaca {
36 	short	ca_xxx1;	/* unused */
37 	char	ca_xxx2;	/* unused */
38 	char	ca_bdp;		/* BDP to purge */
39 	short	ca_cmdint;	/* command queue transition interrupt flag */
40 	short	ca_rspint;	/* response queue transition interrupt flag */
41 	long	ca_rspdsc[NRSP];/* response descriptors */
42 	long	ca_cmddsc[NCMD];/* command descriptors */
43 };
44 
45 #define	ca_ringbase	ca_rspdsc[0]
46 
47 #define	UDA_OWN	0x80000000	/* UDA owns this descriptor */
48 #define	UDA_INT	0x40000000	/* allow interrupt on ring transition */
49 
50 /*
51  * MSCP packet info
52  */
53 struct mscp_header {
54 	short	uda_msglen;	/* length of MSCP packet */
55 	char	uda_credits;	/* low 4 bits: credits, high 4 bits: msgtype */
56 	char	uda_vcid;	/* virtual circuit id */
57 };
58