Home | History | Annotate | Line # | Download | only in ic
ncr53c400reg.h revision 1.1
      1  1.1  mycroft /*	$NetBSD: ncr53c400reg.h,v 1.1 2000/03/18 13:05:21 mycroft Exp $	*/
      2  1.1  mycroft 
      3  1.1  mycroft /*-
      4  1.1  mycroft  * Copyright (c)  1998 The NetBSD Foundation, Inc.
      5  1.1  mycroft  * All rights reserved.
      6  1.1  mycroft  *
      7  1.1  mycroft  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1  mycroft  * by John M. Ruschmeyer.
      9  1.1  mycroft  *
     10  1.1  mycroft  * Redistribution and use in source and binary forms, with or without
     11  1.1  mycroft  * modification, are permitted provided that the following conditions
     12  1.1  mycroft  * are met:
     13  1.1  mycroft  * 1. Redistributions of source code must retain the above copyright
     14  1.1  mycroft  *    notice, this list of conditions and the following disclaimer.
     15  1.1  mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  mycroft  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  mycroft  *    documentation and/or other materials provided with the distribution.
     18  1.1  mycroft  * 3. All advertising materials mentioning features or use of this software
     19  1.1  mycroft  *    must display the following acknowledgement:
     20  1.1  mycroft  *        This product includes software developed by the NetBSD
     21  1.1  mycroft  *        Foundation, Inc. and its contributors.
     22  1.1  mycroft  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.1  mycroft  *    contributors may be used to endorse or promote products derived
     24  1.1  mycroft  *    from this software without specific prior written permission.
     25  1.1  mycroft  *
     26  1.1  mycroft  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.1  mycroft  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.1  mycroft  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1  mycroft  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1  mycroft  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.1  mycroft  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.1  mycroft  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.1  mycroft  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.1  mycroft  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.1  mycroft  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.1  mycroft  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1  mycroft  */
     38  1.1  mycroft 
     39  1.1  mycroft /*
     40  1.1  mycroft  * Definitions for 53C400 SCSI-controller chip.
     41  1.1  mycroft  *
     42  1.1  mycroft  * Derived from Linux NCR-5380 generic driver sources (by Drew Eckhardt).
     43  1.1  mycroft  *
     44  1.1  mycroft  * Copyright (C) 1994 Serge Vakulenko (vak (at) cronyx.ru)
     45  1.1  mycroft  *
     46  1.1  mycroft  * Redistribution and use in source and binary forms, with or without
     47  1.1  mycroft  * modification, are permitted provided that the following conditions
     48  1.1  mycroft  * are met:
     49  1.1  mycroft  * 1. Redistributions of source code must retain the above copyright
     50  1.1  mycroft  *    notice, this list of conditions and the following disclaimer.
     51  1.1  mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     52  1.1  mycroft  *    notice, this list of conditions and the following disclaimer in the
     53  1.1  mycroft  *    documentation and/or other materials provided with the distribution.
     54  1.1  mycroft  *
     55  1.1  mycroft  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND
     56  1.1  mycroft  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     57  1.1  mycroft  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     58  1.1  mycroft  * ARE DISCLAIMED.  IN NO EVENT SHALL THE DEVELOPERS BE LIABLE
     59  1.1  mycroft  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     60  1.1  mycroft  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     61  1.1  mycroft  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     62  1.1  mycroft  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     63  1.1  mycroft  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     64  1.1  mycroft  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     65  1.1  mycroft  * SUCH DAMAGE.
     66  1.1  mycroft  */
     67  1.1  mycroft 
     68  1.1  mycroft /*
     69  1.1  mycroft  * NCR5380 registers
     70  1.1  mycroft  */
     71  1.1  mycroft #define C80_CSDR	0	/* ro - Current SCSI Data Reg. */
     72  1.1  mycroft #define C80_ODR		0	/* wo - Output Data Reg. */
     73  1.1  mycroft #define C80_ICR		1	/* rw - Initiator Command Reg. */
     74  1.1  mycroft #define C80_MR		2	/* rw - Mode Reg. */
     75  1.1  mycroft #define C80_TCR		3	/* rw - Target Command Reg. */
     76  1.1  mycroft #define C80_CSBR	4	/* ro - Current SCSI Bus Status Reg. */
     77  1.1  mycroft #define C80_SER		4	/* wo - Select Enable Reg. */
     78  1.1  mycroft #define C80_BSR		5	/* ro - Bus and Status Reg. */
     79  1.1  mycroft #define C80_SDSR	5	/* wo - Start DMA Send Reg. */
     80  1.1  mycroft #define C80_IDR		6	/* ro - Input Data Reg. */
     81  1.1  mycroft #define C80_SDTR	6	/* wo - Start DMA Target Receive Reg. */
     82  1.1  mycroft #define C80_RPIR	7	/* ro - Reset Parity/Interrupt Reg. */
     83  1.1  mycroft #define C80_SDIR	7	/* wo - Start DMA Initiator Receive Reg. */
     84  1.1  mycroft 
     85  1.1  mycroft 
     86  1.1  mycroft #define C400_CSR		0	/* rw - Control and Status Reg. */
     87  1.1  mycroft # define C400_CSR_5380_ENABLE		0x80
     88  1.1  mycroft # define C400_CSR_TRANSFER_DIRECTION	0x40
     89  1.1  mycroft # define C400_CSR_TRANSFER_READY_INTR	0x20
     90  1.1  mycroft # define C400_CSR_5380_INTR		0x10
     91  1.1  mycroft # define C400_CSR_SHARED_INTR		0x08
     92  1.1  mycroft # define C400_CSR_HOST_BUF_NOT_READY	0x04 /* read only */
     93  1.1  mycroft # define C400_CSR_SCSI_BUF_READY	0x02 /* read only */
     94  1.1  mycroft # define C400_CSR_5380_GATED_IRQ	0x01 /* read only */
     95  1.1  mycroft # define C400_CSR_BITS "\20\1irq\2sbrdy\3hbrdy\4shintr\5intr\6tintr\7tdir\10enable"
     96  1.1  mycroft 
     97  1.1  mycroft #define C400_CCR		1	/* rw - Clock Counter Reg. */
     98  1.1  mycroft 
     99  1.1  mycroft #define C400_HBR		4	/* rw - Host Buffer Reg. */
    100  1.1  mycroft 
    101  1.1  mycroft #define C400_5380_REG_OFFSET	8	/* Offset of 5380 registers. */
    102