1 #ifndef A3000_H
2
3
4
5
6
7
8
9
10
11 #include <linux/types.h>
12
13 int a3000_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_a3000;
34
35 #define A3000_SCSI { NULL, \
36 NULL, \
37 &proc_scsi_a3000, \
38 NULL, \
39 "Amiga 3000 built-in SCSI", \
40 a3000_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 A3000_XFER_MASK (0x00000003)
63
64 typedef struct {
65 unsigned char pad1[2];
66 volatile unsigned short DAWR;
67 volatile unsigned int WTC;
68 unsigned char pad2[2];
69 volatile unsigned short CNTR;
70 volatile unsigned long ACR;
71 unsigned char pad3[2];
72 volatile unsigned short ST_DMA;
73 unsigned char pad4[2];
74 volatile unsigned short FLUSH;
75 unsigned char pad5[2];
76 volatile unsigned short CINT;
77 unsigned char pad6[2];
78 volatile unsigned short ISTR;
79 unsigned char pad7[30];
80 volatile unsigned short SP_DMA;
81 unsigned char pad8;
82 volatile unsigned char SASR;
83 unsigned char pad9;
84 volatile unsigned char SCMD;
85 } a3000_scsiregs;
86
87 #define DAWR_A3000 (3)
88
89
90 #define CNTR_TCEN (1<<5)
91 #define CNTR_PREST (1<<4)
92 #define CNTR_PDMD (1<<3)
93 #define CNTR_INTEN (1<<2)
94 #define CNTR_DDIR (1<<1)
95 #define CNTR_IO_DX (1<<0)
96
97
98 #define ISTR_INTX (1<<8)
99 #define ISTR_INT_F (1<<7)
100 #define ISTR_INTS (1<<6)
101 #define ISTR_E_INT (1<<5)
102 #define ISTR_INT_P (1<<4)
103 #define ISTR_UE_INT (1<<3)
104 #define ISTR_OE_INT (1<<2)
105 #define ISTR_FF_FLG (1<<1)
106 #define ISTR_FE_FLG (1<<0)
107
108 #endif
109
110 #endif