1 #ifndef A2091_H
2
3
4
5
6
7
8
9
10
11 #include <linux/types.h>
12
13 int a2091_detect(Scsi_Host_Template *);
14 const char *wd33c93_info(void);
15 int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
16 int wd33c93_abort(Scsi_Cmnd *);
17 int wd33c93_reset(Scsi_Cmnd *, unsigned int);
18
19 #ifndef NULL
20 #define NULL 0
21 #endif
22
23 #ifndef CMD_PER_LUN
24 #define CMD_PER_LUN 2
25 #endif
26
27 #ifndef CAN_QUEUE
28 #define CAN_QUEUE 16
29 #endif
30
31 #ifdef HOSTS_C
32
33 extern struct proc_dir_entry proc_scsi_a2091;
34
35 #define A2091_SCSI { NULL, \
36 NULL, \
37 &proc_scsi_a2091, \
38 NULL, \
39 "Commodore A2091/A590 SCSI", \
40 a2091_detect, \
41 NULL, \
42 NULL, \
43 NULL, \
44 wd33c93_queuecommand, \
45 wd33c93_abort, \
46 wd33c93_reset, \
47 NULL, \
48 NULL, \
49 CAN_QUEUE, \
50 7, \
51 SG_ALL, \
52 CMD_PER_LUN, \
53 0, \
54 0, \
55 DISABLE_CLUSTERING }
56 #else
57
58
59
60
61
62 #define A2091_XFER_MASK (0xff000001)
63
64 typedef struct {
65 unsigned char pad1[64];
66 volatile unsigned short ISTR;
67 volatile unsigned short CNTR;
68 unsigned char pad2[60];
69 volatile unsigned int WTC;
70 volatile unsigned long ACR;
71 unsigned char pad3[6];
72 volatile unsigned short DAWR;
73 unsigned char pad4;
74 volatile unsigned char SASR;
75 unsigned char pad5;
76 volatile unsigned char SCMD;
77 unsigned char pad6[76];
78 volatile unsigned short ST_DMA;
79 volatile unsigned short SP_DMA;
80 volatile unsigned short CINT;
81 unsigned char pad7[2];
82 volatile unsigned short FLUSH;
83 } a2091_scsiregs;
84
85 #define DAWR_A2091 (3)
86
87
88 #define CNTR_TCEN (1<<7)
89 #define CNTR_PREST (1<<6)
90 #define CNTR_PDMD (1<<5)
91 #define CNTR_INTEN (1<<4)
92 #define CNTR_DDIR (1<<3)
93
94
95 #define ISTR_INTX (1<<8)
96 #define ISTR_INT_F (1<<7)
97 #define ISTR_INTS (1<<6)
98 #define ISTR_E_INT (1<<5)
99 #define ISTR_INT_P (1<<4)
100 #define ISTR_UE_INT (1<<3)
101 #define ISTR_OE_INT (1<<2)
102 #define ISTR_FF_FLG (1<<1)
103 #define ISTR_FE_FLG (1<<0)
104
105 #endif
106
107 #endif