1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef A2091_H
3 #define A2091_H
4 
5 /* $Id: a2091.h,v 1.4 1997/01/19 23:07:09 davem Exp $
6  *
7  * Header file for the Commodore A2091 Zorro II SCSI controller for Linux
8  *
9  * Written and (C) 1993, Hamish Macdonald, see a2091.c for more info
10  *
11  */
12 
13 #include <linux/types.h>
14 
15 #ifndef CMD_PER_LUN
16 #define CMD_PER_LUN		2
17 #endif
18 
19 #ifndef CAN_QUEUE
20 #define CAN_QUEUE		16
21 #endif
22 
23 /*
24  * if the transfer address ANDed with this results in a non-zero
25  * result, then we can't use DMA.
26  */
27 #define A2091_XFER_MASK		(0xff000001)
28 
29 struct a2091_scsiregs {
30 		 unsigned char	pad1[64];
31 	volatile unsigned short	ISTR;
32 	volatile unsigned short	CNTR;
33 		 unsigned char	pad2[60];
34 	volatile unsigned int	WTC;
35 	volatile unsigned long	ACR;
36 		 unsigned char	pad3[6];
37 	volatile unsigned short	DAWR;
38 		 unsigned char	pad4;
39 	volatile unsigned char	SASR;
40 		 unsigned char	pad5;
41 	volatile unsigned char	SCMD;
42 		 unsigned char	pad6[76];
43 	volatile unsigned short	ST_DMA;
44 	volatile unsigned short	SP_DMA;
45 	volatile unsigned short	CINT;
46 		 unsigned char	pad7[2];
47 	volatile unsigned short	FLUSH;
48 };
49 
50 #define DAWR_A2091		(3)
51 
52 /* CNTR bits. */
53 #define CNTR_TCEN		(1<<7)
54 #define CNTR_PREST		(1<<6)
55 #define CNTR_PDMD		(1<<5)
56 #define CNTR_INTEN		(1<<4)
57 #define CNTR_DDIR		(1<<3)
58 
59 /* ISTR bits. */
60 #define ISTR_INTX		(1<<8)
61 #define ISTR_INT_F		(1<<7)
62 #define ISTR_INTS		(1<<6)
63 #define ISTR_E_INT		(1<<5)
64 #define ISTR_INT_P		(1<<4)
65 #define ISTR_UE_INT		(1<<3)
66 #define ISTR_OE_INT		(1<<2)
67 #define ISTR_FF_FLG		(1<<1)
68 #define ISTR_FE_FLG		(1<<0)
69 
70 #endif /* A2091_H */
71