Home | History | Annotate | Line # | Download | only in ic
ncr53c9xreg.h revision 1.1
      1  1.1  thorpej /*	$NetBSD: ncr53c9xreg.h,v 1.1 1997/02/27 01:12:08 thorpej Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.1  thorpej  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
      5  1.1  thorpej  *
      6  1.1  thorpej  * Redistribution and use in source and binary forms, with or without
      7  1.1  thorpej  * modification, are permitted provided that the following conditions
      8  1.1  thorpej  * are met:
      9  1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     10  1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     11  1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     13  1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     14  1.1  thorpej  * 3. All advertising materials mentioning features or use of this software
     15  1.1  thorpej  *    must display the following acknowledgement:
     16  1.1  thorpej  *	This product includes software developed by Peter Galbavy.
     17  1.1  thorpej  * 4. The name of the author may not be used to endorse or promote products
     18  1.1  thorpej  *    derived from this software without specific prior written permission.
     19  1.1  thorpej  *
     20  1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     21  1.1  thorpej  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     22  1.1  thorpej  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     23  1.1  thorpej  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     24  1.1  thorpej  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     25  1.1  thorpej  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     26  1.1  thorpej  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     27  1.1  thorpej  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     28  1.1  thorpej  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     29  1.1  thorpej  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     30  1.1  thorpej  */
     31  1.1  thorpej 
     32  1.1  thorpej /*
     33  1.1  thorpej  * Register addresses, relative to some base address
     34  1.1  thorpej  */
     35  1.1  thorpej 
     36  1.1  thorpej #define	NCR_TCL		0x00		/* RW - Transfer Count Low	*/
     37  1.1  thorpej #define	NCR_TCM		0x01		/* RW - Transfer Count Mid	*/
     38  1.1  thorpej #define	NCR_TCH		0x0e		/* RW - Transfer Count High	*/
     39  1.1  thorpej 					/*	NOT on 53C90		*/
     40  1.1  thorpej 
     41  1.1  thorpej #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
     42  1.1  thorpej 
     43  1.1  thorpej #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
     44  1.1  thorpej #define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
     45  1.1  thorpej #define  NCRCMD_NOP	0x00		/*	No Operation		*/
     46  1.1  thorpej #define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
     47  1.1  thorpej #define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
     48  1.1  thorpej #define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
     49  1.1  thorpej #define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
     50  1.1  thorpej #define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
     51  1.1  thorpej #define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
     52  1.1  thorpej #define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
     53  1.1  thorpej #define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
     54  1.1  thorpej #define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
     55  1.1  thorpej #define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
     56  1.1  thorpej #define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
     57  1.1  thorpej #define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
     58  1.1  thorpej #define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
     59  1.1  thorpej #define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
     60  1.1  thorpej #define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
     61  1.1  thorpej #define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
     62  1.1  thorpej #define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
     63  1.1  thorpej #define  NCRCMD_DISC	0x27		/*	Disconnect		*/
     64  1.1  thorpej #define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
     65  1.1  thorpej #define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
     66  1.1  thorpej #define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
     67  1.1  thorpej #define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
     68  1.1  thorpej #define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
     69  1.1  thorpej #define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
     70  1.1  thorpej #define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
     71  1.1  thorpej #define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
     72  1.1  thorpej #define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
     73  1.1  thorpej #define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
     74  1.1  thorpej #define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
     75  1.1  thorpej 
     76  1.1  thorpej #define	NCR_STAT	0x04		/* RO - Status			*/
     77  1.1  thorpej #define  NCRSTAT_INT	0x80		/*	Interrupt		*/
     78  1.1  thorpej #define  NCRSTAT_GE	0x40		/*	Gross Error		*/
     79  1.1  thorpej #define  NCRSTAT_PE	0x20		/*	Parity Error		*/
     80  1.1  thorpej #define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
     81  1.1  thorpej #define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
     82  1.1  thorpej #define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
     83  1.1  thorpej 
     84  1.1  thorpej #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
     85  1.1  thorpej 
     86  1.1  thorpej #define	NCR_INTR	0x05		/* RO - Interrupt		*/
     87  1.1  thorpej #define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
     88  1.1  thorpej #define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
     89  1.1  thorpej #define  NCRINTR_DIS	0x20		/*	Disconnect		*/
     90  1.1  thorpej #define  NCRINTR_BS	0x10		/*	Bus Service		*/
     91  1.1  thorpej #define  NCRINTR_FC	0x08		/*	Function Complete	*/
     92  1.1  thorpej #define  NCRINTR_RESEL	0x04		/*	Reselected		*/
     93  1.1  thorpej #define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
     94  1.1  thorpej #define  NCRINTR_SEL	0x01		/*	Selected		*/
     95  1.1  thorpej 
     96  1.1  thorpej #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
     97  1.1  thorpej 
     98  1.1  thorpej #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
     99  1.1  thorpej #define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
    100  1.1  thorpej #define  NCRSTEP_DONE	0x04		/*	command went out	*/
    101  1.1  thorpej 
    102  1.1  thorpej #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
    103  1.1  thorpej 					/*	Default 5 (53C9X)	*/
    104  1.1  thorpej 
    105  1.1  thorpej #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
    106  1.1  thorpej #define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
    107  1.1  thorpej #define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
    108  1.1  thorpej 
    109  1.1  thorpej #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
    110  1.1  thorpej 					/*	0 = ASYNC		*/
    111  1.1  thorpej 					/*	1 - 15 = SYNC bytes	*/
    112  1.1  thorpej 
    113  1.1  thorpej #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
    114  1.1  thorpej #define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
    115  1.1  thorpej #define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
    116  1.1  thorpej #define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
    117  1.1  thorpej #define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
    118  1.1  thorpej #define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
    119  1.1  thorpej #define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
    120  1.1  thorpej 
    121  1.1  thorpej #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
    122  1.1  thorpej 					/*	0 = 35.01 - 40Mhz	*/
    123  1.1  thorpej 					/*	NEVER SET TO 1		*/
    124  1.1  thorpej 					/*	2 = 10Mhz		*/
    125  1.1  thorpej 					/*	3 = 10.01 - 15Mhz	*/
    126  1.1  thorpej 					/*	4 = 15.01 - 20Mhz	*/
    127  1.1  thorpej 					/*	5 = 20.01 - 25Mhz	*/
    128  1.1  thorpej 					/*	6 = 25.01 - 30Mhz	*/
    129  1.1  thorpej 					/*	7 = 30.01 - 35Mhz	*/
    130  1.1  thorpej 
    131  1.1  thorpej #define	NCR_TEST	0x0a		/* WO - Test (Chip Test Only)	*/
    132  1.1  thorpej 
    133  1.1  thorpej #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
    134  1.1  thorpej #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
    135  1.1  thorpej #define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
    136  1.1  thorpej #define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
    137  1.1  thorpej #define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
    138  1.1  thorpej #define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
    139  1.1  thorpej #define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
    140  1.1  thorpej #define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
    141  1.1  thorpej 
    142  1.1  thorpej /* Config #3 only on 53C9X */
    143  1.1  thorpej #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
    144  1.1  thorpej #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
    145  1.1  thorpej #define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
    146  1.1  thorpej #define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
    147  1.1  thorpej #define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
    148  1.1  thorpej #define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
    149  1.1  thorpej #define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25Mhz)	*/
    150