Home | History | Annotate | Line # | Download | only in dev
vme_pccreg.h revision 1.1.12.1
      1  1.1.12.1  thorpej /*	$NetBSD: vme_pccreg.h,v 1.1.12.1 1997/10/14 10:17:32 thorpej Exp $	*/
      2       1.1    chuck 
      3       1.1    chuck /*-
      4       1.1    chuck  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5       1.1    chuck  * All rights reserved.
      6       1.1    chuck  *
      7       1.1    chuck  * This code is derived from software contributed to The NetBSD Foundation
      8       1.1    chuck  * by Jason R. Thorpe.
      9       1.1    chuck  *
     10       1.1    chuck  * Redistribution and use in source and binary forms, with or without
     11       1.1    chuck  * modification, are permitted provided that the following conditions
     12       1.1    chuck  * are met:
     13       1.1    chuck  * 1. Redistributions of source code must retain the above copyright
     14       1.1    chuck  *    notice, this list of conditions and the following disclaimer.
     15       1.1    chuck  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.1    chuck  *    notice, this list of conditions and the following disclaimer in the
     17       1.1    chuck  *    documentation and/or other materials provided with the distribution.
     18       1.1    chuck  * 3. All advertising materials mentioning features or use of this software
     19       1.1    chuck  *    must display the following acknowledgement:
     20       1.1    chuck  *        This product includes software developed by the NetBSD
     21       1.1    chuck  *        Foundation, Inc. and its contributors.
     22       1.1    chuck  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23       1.1    chuck  *    contributors may be used to endorse or promote products derived
     24       1.1    chuck  *    from this software without specific prior written permission.
     25       1.1    chuck  *
     26       1.1    chuck  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27       1.1    chuck  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28       1.1    chuck  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1.12.1  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1.12.1  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31       1.1    chuck  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32       1.1    chuck  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33       1.1    chuck  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34       1.1    chuck  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35       1.1    chuck  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36       1.1    chuck  * POSSIBILITY OF SUCH DAMAGE.
     37       1.1    chuck  */
     38       1.1    chuck 
     39       1.1    chuck /*
     40       1.1    chuck  * Based IN PART on a 147 VME driver by Theo de Raadt.
     41       1.1    chuck  */
     42       1.1    chuck 
     43       1.1    chuck /*
     44       1.1    chuck  * Register map of the Type 1 VMEchip found on the MVME-147
     45       1.1    chuck  * Peripheral Channel Controller.
     46       1.1    chuck  */
     47       1.1    chuck 
     48       1.1    chuck struct vme_pcc {
     49       1.1    chuck 
     50       1.1    chuck 	/*
     51       1.1    chuck 	 * Local VME control registers.
     52       1.1    chuck 	 */
     53       1.1    chuck 
     54       1.1    chuck 	int8_t			pad0;
     55       1.1    chuck 	volatile u_int8_t	vme_scon;
     56       1.1    chuck 
     57       1.1    chuck #define VME1_SCON_SWITCH	0x01	/* SCON jumper is set */
     58       1.1    chuck #define VME1_SCON_SRESET	0x02	/* assert SRESET on bus */
     59       1.1    chuck #define VME1_SCON_SYSFAIL	0x04	/* assert SYSFAIL on bus */
     60       1.1    chuck #define VME1_SCON_ROBIN		0x08	/* round robin bus requests */
     61       1.1    chuck 
     62       1.1    chuck 	int8_t			pad1;
     63       1.1    chuck 	volatile u_int8_t	vme_reqconf;
     64       1.1    chuck 
     65       1.1    chuck #define VME1_REQ_IPLMASK	0x03	/* interrupt level for requester */
     66       1.1    chuck #define VME1_REQ_RNEVER		0x08
     67       1.1    chuck #define VME1_REQ_RWD		0x10
     68       1.1    chuck #define VME1_REQ_DHB		0x40
     69       1.1    chuck #define VME1_REQ_DWB		0x80
     70       1.1    chuck 
     71       1.1    chuck 	int8_t			pad2;
     72       1.1    chuck 	volatile u_int8_t	vme_masconf;
     73       1.1    chuck 
     74       1.1    chuck #define VME1_MAS_D16		0x01	/* force d8/16 accesses only */
     75       1.1    chuck #define VME1_MAS_MASA24		0x02	/* send address mod for A24 access */
     76       1.1    chuck #define VME1_MAS_MASA16		0x04	/* send address mod for A16 access */
     77       1.1    chuck #define VME1_MAS_MASUAT		0x08	/* handle unaligned VME cycles */
     78       1.1    chuck #define VME1_MAS_CFILL		0x10	/* DO NOT USE */
     79       1.1    chuck #define VME1_MAS_MASWP		0x20	/* VME fast mode (DO NOT USE) */
     80       1.1    chuck 
     81       1.1    chuck 	int8_t			pad3;
     82       1.1    chuck 	volatile u_int8_t	vme_slconf;
     83       1.1    chuck 
     84       1.1    chuck #define VME1_SLAVE_SLVD16	0x01	/* DO NOT USE */
     85       1.1    chuck #define VME1_SLAVE_SLVWP	0x20	/* DO NOT USE */
     86       1.1    chuck #define VME1_SLAVE_SLVEN	0x80	/* allow access to onboard DRAM */
     87       1.1    chuck 
     88       1.1    chuck 	int8_t			pad4;
     89       1.1    chuck 	volatile u_int8_t	vme_timerconf;
     90       1.1    chuck 
     91       1.1    chuck #define VME1_TIMER_LOCAL_MASK	0x03
     92       1.1    chuck #define VME1_TIMER_LOCAL_T0	0x00	/* local timeout 102 microsec */
     93       1.1    chuck #define VME1_TIMER_LOCAL_T1	0x01	/* local timeout 205 microsec */
     94       1.1    chuck #define VME1_TIMER_LOCAL_T2	0x02	/* local timeout 410 microsec */
     95       1.1    chuck #define VME1_TIMER_LOCAL_T3	0x03	/* local timeout disabled */
     96       1.1    chuck #define VME1_TIMER_VMEACC_MASK	0x0c
     97       1.1    chuck #define VME1_TIMER_VMEACC_T0	0x00	/* VME access timeout 102 microsec */
     98       1.1    chuck #define VME1_TIMER_VMEACC_T1	0x04	/* VME access timeout 1.6 millisec */
     99       1.1    chuck #define VME1_TIMER_VMEACC_T2	0x08	/* VME access timeout 51 millisec */
    100       1.1    chuck #define VME1_TIMER_VMEACC_T3	0x0c	/* VME access timeout disabled */
    101       1.1    chuck #define VME1_TIMER_VMEGLO_MASK	0x30
    102       1.1    chuck #define VME1_TIMER_VMEGLO_T0	0x00	/* VME glob timeout 102 microsec */
    103       1.1    chuck #define VME1_TIMER_VMEGLO_T1	0x10	/* VME glob timeout 205 microsec */
    104       1.1    chuck #define VME1_TIMER_VMEGLO_T2	0x20	/* VME glob timeout 410 microsec */
    105       1.1    chuck #define VME1_TIMER_VMEGLO_T3	0x30	/* VME glob timeout disabled */
    106       1.1    chuck #define VME1_TIMER_ARBTO	0x40	/* enable VME arbitration timer */
    107       1.1    chuck 
    108       1.1    chuck 	int8_t			pad5;
    109       1.1    chuck 	volatile u_int8_t	vme_sladdrmod;
    110       1.1    chuck 
    111       1.1    chuck #define VME1_SLMOD_DATA		0x01
    112       1.1    chuck #define VME1_SLMOD_PRGRM	0x02
    113       1.1    chuck #define VME1_SLMOD_BLOCK	0x04
    114       1.1    chuck #define VME1_SLMOD_SHORT	0x08
    115       1.1    chuck #define VME1_SLMOD_STND		0x10
    116       1.1    chuck #define VME1_SLMOD_EXTED	0x20
    117       1.1    chuck #define VME1_SLMOD_USER		0x40
    118       1.1    chuck #define VME1_SLMOD_SUPER	0x80
    119       1.1    chuck 
    120       1.1    chuck 	int8_t			pad6;
    121       1.1    chuck 	volatile u_int8_t	vme_msaddrmod;
    122       1.1    chuck 
    123       1.1    chuck #define VME1_MSMOD_AM_MASK	0x3f
    124       1.1    chuck #define VME1_MSMOD_AMSEL	0x80
    125       1.1    chuck 
    126       1.1    chuck 	int8_t			pad7;
    127       1.1    chuck 	volatile u_int8_t	vme_irqen;
    128       1.1    chuck 
    129       1.1    chuck #define VME1_IRQ_VME(x)		(1 << (x))
    130       1.1    chuck 
    131       1.1    chuck 	int8_t			pad8;
    132       1.1    chuck 	volatile u_int8_t	vme_uireqen;
    133       1.1    chuck 
    134       1.1    chuck 	int8_t			pad9;
    135       1.1    chuck 	volatile u_int8_t	vme_uirq;
    136       1.1    chuck 
    137       1.1    chuck 	int8_t			pad10;
    138       1.1    chuck 	volatile u_int8_t	vme_irq;
    139       1.1    chuck 
    140       1.1    chuck 	int8_t			pad11;
    141       1.1    chuck 	volatile u_int8_t	vme_vmeid;
    142       1.1    chuck 
    143       1.1    chuck 	int8_t			pad12;
    144       1.1    chuck 	volatile u_int8_t	vme_buserr;
    145       1.1    chuck 
    146       1.1    chuck 	int8_t			pad13;
    147       1.1    chuck 	volatile u_int8_t	vme_gcsr;
    148       1.1    chuck 
    149       1.1    chuck 	int8_t			pad14[4];
    150       1.1    chuck 
    151       1.1    chuck 	/*
    152       1.1    chuck 	 * Global Status and Control registers.
    153       1.1    chuck 	 */
    154       1.1    chuck 
    155       1.1    chuck 	int8_t			pad15;
    156       1.1    chuck 	volatile u_int8_t	vme_gcsr_gr0;
    157       1.1    chuck 
    158       1.1    chuck 	int8_t			pad16;
    159       1.1    chuck 	volatile u_int8_t	vme_gcsr_gr1;
    160       1.1    chuck 
    161       1.1    chuck 	int8_t			pad17;
    162       1.1    chuck 	volatile u_int8_t	vme_gcsr_boardid;
    163       1.1    chuck 
    164       1.1    chuck 	int8_t			pad18;
    165       1.1    chuck 	volatile u_int8_t	vme_gcsr_gpr0;
    166       1.1    chuck 
    167       1.1    chuck 	int8_t			pad19;
    168       1.1    chuck 	volatile u_int8_t	vme_gcsr_gpr1;
    169       1.1    chuck 
    170       1.1    chuck 	int8_t			pad20;
    171       1.1    chuck 	volatile u_int8_t	vme_gcsr_gpr2;
    172       1.1    chuck 
    173       1.1    chuck 	int8_t			pad21;
    174       1.1    chuck 	volatile u_int8_t	vme_gcsr_gpr3;
    175       1.1    chuck 
    176       1.1    chuck 	int8_t			pad22;
    177       1.1    chuck 	volatile u_int8_t	vme_gcsr_gpr4;
    178       1.1    chuck };
    179       1.1    chuck 
    180       1.1    chuck /*
    181       1.1    chuck  * The Type 1 VMEchip decoder maps VME address space to system addresses
    182       1.1    chuck  * like this:
    183       1.1    chuck  *
    184       1.1    chuck  * A24/32D32:	end of RAM - 0xefffffff
    185       1.1    chuck  * A32D16:	0xf0000000 - 0xff7fffff
    186       1.1    chuck  * A16D16:	0xffff0000 - 0xffffffff
    187       1.1    chuck  *
    188       1.1    chuck  * Note that an A24D32 access on a machine with 16MB of RAM will lose,
    189       1.1    chuck  * since you'll be out of address bits.
    190       1.1    chuck  */
    191       1.1    chuck #define VME1_A32D32_START	(0x00000000)
    192       1.1    chuck #define VME1_A32D32_END		(0xefffffff)
    193       1.1    chuck #define VME1_A32D32_LEN		((VME1_A32D32_END - VME1_A32D32_START) + 1)
    194       1.1    chuck 
    195       1.1    chuck #define VME1_A32D16_START	(0xf0000000)
    196       1.1    chuck #define VME1_A32D16_END		(0xff7fffff)
    197       1.1    chuck #define VME1_A32D16_LEN		((VME1_A32D16_END - VME1_A32D16_START) + 1)
    198       1.1    chuck 
    199       1.1    chuck #define VME1_A16D16_START	(0xffff0000)
    200       1.1    chuck #define VME1_A16D16_END		(0xffffffff)
    201       1.1    chuck #define VME1_A16D16_LEN		((VME1_A16D16_END - VME1_A16D16_START) + 1)
    202