blob: 1c3daa1fd754000b9a7d2d0a0ccb06c50d76b939 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#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
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#ifndef CMD_PER_LUN
Geert Uytterhoeven09bc85b2010-04-04 11:00:32 +020015#define CMD_PER_LUN 2
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#endif
17
18#ifndef CAN_QUEUE
Geert Uytterhoeven09bc85b2010-04-04 11:00:32 +020019#define CAN_QUEUE 16
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#endif
21
22/*
23 * if the transfer address ANDed with this results in a non-zero
24 * result, then we can't use DMA.
25 */
Geert Uytterhoeven09bc85b2010-04-04 11:00:32 +020026#define A2091_XFER_MASK (0xff000001)
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
28typedef struct {
Geert Uytterhoeven09bc85b2010-04-04 11:00:32 +020029 unsigned char pad1[64];
30 volatile unsigned short ISTR;
31 volatile unsigned short CNTR;
32 unsigned char pad2[60];
33 volatile unsigned int WTC;
34 volatile unsigned long ACR;
35 unsigned char pad3[6];
36 volatile unsigned short DAWR;
37 unsigned char pad4;
38 volatile unsigned char SASR;
39 unsigned char pad5;
40 volatile unsigned char SCMD;
41 unsigned char pad6[76];
42 volatile unsigned short ST_DMA;
43 volatile unsigned short SP_DMA;
44 volatile unsigned short CINT;
45 unsigned char pad7[2];
46 volatile unsigned short FLUSH;
Linus Torvalds1da177e2005-04-16 15:20:36 -070047} a2091_scsiregs;
48
49#define DAWR_A2091 (3)
50
51/* CNTR bits. */
52#define CNTR_TCEN (1<<7)
53#define CNTR_PREST (1<<6)
54#define CNTR_PDMD (1<<5)
55#define CNTR_INTEN (1<<4)
56#define CNTR_DDIR (1<<3)
57
58/* ISTR bits. */
59#define ISTR_INTX (1<<8)
60#define ISTR_INT_F (1<<7)
61#define ISTR_INTS (1<<6)
62#define ISTR_E_INT (1<<5)
63#define ISTR_INT_P (1<<4)
64#define ISTR_UE_INT (1<<3)
65#define ISTR_OE_INT (1<<2)
66#define ISTR_FF_FLG (1<<1)
67#define ISTR_FE_FLG (1<<0)
68
69#endif /* A2091_H */