1 1.1 enami /* $NetBSD: vrpciureg.h,v 1.1 2001/06/13 07:32:48 enami Exp $ */ 2 1.1 enami 3 1.1 enami /*- 4 1.1 enami * Copyright (c) 2001 Enami Tsugutomo. 5 1.1 enami * All rights reserved. 6 1.1 enami * 7 1.1 enami * Redistribution and use in source and binary forms, with or without 8 1.1 enami * modification, are permitted provided that the following conditions 9 1.1 enami * are met: 10 1.1 enami * 1. Redistributions of source code must retain the above copyright 11 1.1 enami * notice, this list of conditions and the following disclaimer. 12 1.1 enami * 2. Redistributions in binary form must reproduce the above copyright 13 1.1 enami * notice, this list of conditions and the following disclaimer in the 14 1.1 enami * documentation and/or other materials provided with the distribution. 15 1.1 enami * 16 1.1 enami * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 1.1 enami * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 1.1 enami * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 1.1 enami * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 1.1 enami * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 1.1 enami * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 1.1 enami * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 1.1 enami * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 1.1 enami * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 1.1 enami * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 1.1 enami * SUCH DAMAGE. 27 1.1 enami */ 28 1.1 enami 29 1.1 enami #define VRPCIU_BASE 0x0f000c00 /* vr4122 */ 30 1.1 enami 31 1.1 enami /* 32 1.1 enami * Master Memory/IO Address Window. 33 1.1 enami */ 34 1.1 enami #define VRPCIU_MMAW1REG 0x0000 35 1.1 enami #define VRPCIU_MMAW2REG 0x0004 36 1.1 enami #define VRPCIU_MIOAWREG 0x0010 37 1.1 enami 38 1.1 enami #define VRPCIU_MAW_IBAMASK 0xff000000 /* Internal Bus Base Address */ 39 1.1 enami #define VRPCIU_MAW_ADDRMASK(reg) \ 40 1.1 enami ((((reg) >> 13) & 0x7f) << 24) /* Address Mask */ 41 1.1 enami #define VRPCIU_MAW_ADDR(reg) \ 42 1.1 enami (((reg) & VRPCIU_MAW_IBAMASK) & VRPCIU_MAW_ADDRMASK(reg)) 43 1.1 enami #define VRPCIU_MAW_SIZE(reg) (~(VRPCIU_MAW_ADDRMASK(reg) | 0x80000000)) 44 1.1 enami #define VRPCIU_MAW_WINEN (1 << 12) /* PCI access is enabled */ 45 1.1 enami #define VRPCIU_MAW_PCIADDR(reg) (((reg) & 0xff) << 24) /* PCI Address */ 46 1.1 enami #define VRPCIU_MAW(start, size) /* XXX */ 47 1.1 enami 48 1.1 enami /* 49 1.1 enami * Target Address Window. 50 1.1 enami */ 51 1.1 enami #define VRPCIU_TAW1REG 0x0008 52 1.1 enami #define VRPCIU_TAW2REG 0x000c 53 1.1 enami #define VRPCIU_TAW_ADDRMASK(reg) \ 54 1.1 enami ((((reg) >> 13) & 0x7f) << 21) /* Address Mask */ 55 1.1 enami #define VRPCIU_TAW_WINEN (1 << 12) /* PCI access is enabled */ 56 1.1 enami #define VRPCIU_TAW_IBA(reg) (((reg) & 0x7ff) << 21) /* Internal Bus Address */ 57 1.1 enami 58 1.1 enami #define VRPCIU_CONFDREG 0x0014 59 1.1 enami #define VRPCIU_CONFAREG 0x0018 60 1.1 enami #define VRPCIU_MAILREG 0x001c 61 1.1 enami #define VRPCIU_BUSERRADREG 0x0024 62 1.1 enami #define VRPCIU_INTCNTSTAREG 0x0028 63 1.1 enami #define VRPCIU_EXACCREG 0x002c 64 1.1 enami #define VRPCIU_RECONTREG 0x0030 65 1.1 enami #define VRPCIU_ENREG 0x0034 66 1.1 enami #define VRPCIU_CLKSELREG 0x0038 67 1.1 enami #define VRPCIU_TRDYVREG 0x003c 68 1.1 enami #define VRPCIU_CLKRUNREG 0x0060 69 1.1 enami 70 1.1 enami #define VRPCIU_CONF_TYPE1 0x1 71 1.1 enami #define VRPCIU_CONF_BASE (0x0f000d00 - VRPCIU_BASE) 72 1.1 enami #define VRPCIU_CONF_MAILREG 0x10 73 1.1 enami #define VRPCIU_CONF_MBA1REG 0x14 74 1.1 enami #define VRPCIU_CONF_MBA2REG 0x18 75