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