Import 2.2.8pre2
[davej-history.git] / drivers / scsi / a2091.h
blobb04ef6c2585208d194913263975b5f9c9c64a20c
1 #ifndef A2091_H
3 /* $Id: a2091.h,v 1.4 1997/01/19 23:07:09 davem Exp $
5 * Header file for the Commodore A2091 Zorro II SCSI controller for Linux
7 * Written and (C) 1993, Hamish Macdonald, see a2091.c for more info
9 */
11 #include <linux/types.h>
13 int a2091_detect(Scsi_Host_Template *);
14 int a2091_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_a2091;
36 #define A2091_SCSI { proc_dir: &proc_scsi_a2091, \
37 name: "Commodore A2091/A590 SCSI", \
38 detect: a2091_detect, \
39 release: a2091_release, \
40 queuecommand: wd33c93_queuecommand, \
41 abort: wd33c93_abort, \
42 reset: wd33c93_reset, \
43 can_queue: CAN_QUEUE, \
44 this_id: 7, \
45 sg_tablesize: SG_ALL, \
46 cmd_per_lun: CMD_PER_LUN, \
47 use_clustering: DISABLE_CLUSTERING }
48 #else
51 * if the transfer address ANDed with this results in a non-zero
52 * result, then we can't use DMA.
54 #define A2091_XFER_MASK (0xff000001)
56 typedef struct {
57 unsigned char pad1[64];
58 volatile unsigned short ISTR;
59 volatile unsigned short CNTR;
60 unsigned char pad2[60];
61 volatile unsigned int WTC;
62 volatile unsigned long ACR;
63 unsigned char pad3[6];
64 volatile unsigned short DAWR;
65 unsigned char pad4;
66 volatile unsigned char SASR;
67 unsigned char pad5;
68 volatile unsigned char SCMD;
69 unsigned char pad6[76];
70 volatile unsigned short ST_DMA;
71 volatile unsigned short SP_DMA;
72 volatile unsigned short CINT;
73 unsigned char pad7[2];
74 volatile unsigned short FLUSH;
75 } a2091_scsiregs;
77 #define DAWR_A2091 (3)
79 /* CNTR bits. */
80 #define CNTR_TCEN (1<<7)
81 #define CNTR_PREST (1<<6)
82 #define CNTR_PDMD (1<<5)
83 #define CNTR_INTEN (1<<4)
84 #define CNTR_DDIR (1<<3)
86 /* ISTR bits. */
87 #define ISTR_INTX (1<<8)
88 #define ISTR_INT_F (1<<7)
89 #define ISTR_INTS (1<<6)
90 #define ISTR_E_INT (1<<5)
91 #define ISTR_INT_P (1<<4)
92 #define ISTR_UE_INT (1<<3)
93 #define ISTR_OE_INT (1<<2)
94 #define ISTR_FF_FLG (1<<1)
95 #define ISTR_FE_FLG (1<<0)
97 #endif /* else def HOSTS_C */
99 #endif /* A2091_H */