Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef A2091_H
0003 #define A2091_H
0004 
0005 /* $Id: a2091.h,v 1.4 1997/01/19 23:07:09 davem Exp $
0006  *
0007  * Header file for the Commodore A2091 Zorro II SCSI controller for Linux
0008  *
0009  * Written and (C) 1993, Hamish Macdonald, see a2091.c for more info
0010  *
0011  */
0012 
0013 #include <linux/types.h>
0014 
0015 #ifndef CMD_PER_LUN
0016 #define CMD_PER_LUN     2
0017 #endif
0018 
0019 #ifndef CAN_QUEUE
0020 #define CAN_QUEUE       16
0021 #endif
0022 
0023 /*
0024  * if the transfer address ANDed with this results in a non-zero
0025  * result, then we can't use DMA.
0026  */
0027 #define A2091_XFER_MASK     (0xff000001)
0028 
0029 struct a2091_scsiregs {
0030          unsigned char  pad1[64];
0031     volatile unsigned short ISTR;
0032     volatile unsigned short CNTR;
0033          unsigned char  pad2[60];
0034     volatile unsigned int   WTC;
0035     volatile unsigned long  ACR;
0036          unsigned char  pad3[6];
0037     volatile unsigned short DAWR;
0038          unsigned char  pad4;
0039     volatile unsigned char  SASR;
0040          unsigned char  pad5;
0041     volatile unsigned char  SCMD;
0042          unsigned char  pad6[76];
0043     volatile unsigned short ST_DMA;
0044     volatile unsigned short SP_DMA;
0045     volatile unsigned short CINT;
0046          unsigned char  pad7[2];
0047     volatile unsigned short FLUSH;
0048 };
0049 
0050 #define DAWR_A2091      (3)
0051 
0052 /* CNTR bits. */
0053 #define CNTR_TCEN       (1<<7)
0054 #define CNTR_PREST      (1<<6)
0055 #define CNTR_PDMD       (1<<5)
0056 #define CNTR_INTEN      (1<<4)
0057 #define CNTR_DDIR       (1<<3)
0058 
0059 /* ISTR bits. */
0060 #define ISTR_INTX       (1<<8)
0061 #define ISTR_INT_F      (1<<7)
0062 #define ISTR_INTS       (1<<6)
0063 #define ISTR_E_INT      (1<<5)
0064 #define ISTR_INT_P      (1<<4)
0065 #define ISTR_UE_INT     (1<<3)
0066 #define ISTR_OE_INT     (1<<2)
0067 #define ISTR_FF_FLG     (1<<1)
0068 #define ISTR_FE_FLG     (1<<0)
0069 
0070 #endif /* A2091_H */