* better
[mascara-docs.git] / i386 / linux-2.3.21 / drivers / scsi / a3000.h
blobc088f1d9890ac941aa06fb341e0eb06cb8795fbe
1 #ifndef A3000_H
3 /* $Id: a3000.h,v 1.4 1997/01/19 23:07:10 davem Exp $
5 * Header file for the Amiga 3000 built-in SCSI controller for Linux
7 * Written and (C) 1993, Hamish Macdonald, see a3000.c for more info
9 */
11 #include <linux/types.h>
13 int a3000_detect(Scsi_Host_Template *);
14 int a3000_release(struct Scsi_Host *);
15 const char *wd33c93_info(void);
16 int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
17 int wd33c93_abort(Scsi_Cmnd *);
18 int wd33c93_reset(Scsi_Cmnd *, unsigned int);
20 #ifndef NULL
21 #define NULL 0
22 #endif
24 #ifndef CMD_PER_LUN
25 #define CMD_PER_LUN 2
26 #endif
28 #ifndef CAN_QUEUE
29 #define CAN_QUEUE 16
30 #endif
32 #ifdef HOSTS_C
34 extern struct proc_dir_entry proc_scsi_a3000;
36 #define A3000_SCSI { proc_dir: &proc_scsi_a3000, \
37 proc_info: NULL, \
38 name: "Amiga 3000 built-in SCSI", \
39 detect: a3000_detect, \
40 release: a3000_release, \
41 queuecommand: wd33c93_queuecommand, \
42 abort: wd33c93_abort, \
43 reset: wd33c93_reset, \
44 can_queue: CAN_QUEUE, \
45 this_id: 7, \
46 sg_tablesize: SG_ALL, \
47 cmd_per_lun: CMD_PER_LUN, \
48 use_clustering: ENABLE_CLUSTERING }
49 #else
52 * if the transfer address ANDed with this results in a non-zero
53 * result, then we can't use DMA.
55 #define A3000_XFER_MASK (0x00000003)
57 typedef struct {
58 unsigned char pad1[2];
59 volatile unsigned short DAWR;
60 volatile unsigned int WTC;
61 unsigned char pad2[2];
62 volatile unsigned short CNTR;
63 volatile unsigned long ACR;
64 unsigned char pad3[2];
65 volatile unsigned short ST_DMA;
66 unsigned char pad4[2];
67 volatile unsigned short FLUSH;
68 unsigned char pad5[2];
69 volatile unsigned short CINT;
70 unsigned char pad6[2];
71 volatile unsigned short ISTR;
72 unsigned char pad7[30];
73 volatile unsigned short SP_DMA;
74 unsigned char pad8;
75 volatile unsigned char SASR;
76 unsigned char pad9;
77 volatile unsigned char SCMD;
78 } a3000_scsiregs;
80 #define DAWR_A3000 (3)
82 /* CNTR bits. */
83 #define CNTR_TCEN (1<<5)
84 #define CNTR_PREST (1<<4)
85 #define CNTR_PDMD (1<<3)
86 #define CNTR_INTEN (1<<2)
87 #define CNTR_DDIR (1<<1)
88 #define CNTR_IO_DX (1<<0)
90 /* ISTR bits. */
91 #define ISTR_INTX (1<<8)
92 #define ISTR_INT_F (1<<7)
93 #define ISTR_INTS (1<<6)
94 #define ISTR_E_INT (1<<5)
95 #define ISTR_INT_P (1<<4)
96 #define ISTR_UE_INT (1<<3)
97 #define ISTR_OE_INT (1<<2)
98 #define ISTR_FF_FLG (1<<1)
99 #define ISTR_FE_FLG (1<<0)
101 #endif /* else def HOSTS_C */
103 #endif /* A3000_H */