1 1.3 andvar /* $NetBSD: cadmusreg.h,v 1.3 2024/07/05 19:28:35 andvar Exp $ */ 2 1.2 matt /*- 3 1.2 matt * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. 4 1.2 matt * All rights reserved. 5 1.2 matt * 6 1.2 matt * This code is derived from software contributed to The NetBSD Foundation 7 1.2 matt * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects 8 1.2 matt * Agency and which was developed by Matt Thomas of 3am Software Foundry. 9 1.2 matt * 10 1.2 matt * This material is based upon work supported by the Defense Advanced Research 11 1.2 matt * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under 12 1.2 matt * Contract No. N66001-09-C-2073. 13 1.2 matt * Approved for Public Release, Distribution Unlimited 14 1.2 matt * 15 1.2 matt * Redistribution and use in source and binary forms, with or without 16 1.2 matt * modification, are permitted provided that the following conditions 17 1.2 matt * are met: 18 1.2 matt * 1. Redistributions of source code must retain the above copyright 19 1.2 matt * notice, this list of conditions and the following disclaimer. 20 1.2 matt * 2. Redistributions in binary form must reproduce the above copyright 21 1.2 matt * notice, this list of conditions and the following disclaimer in the 22 1.2 matt * documentation and/or other materials provided with the distribution. 23 1.2 matt * 24 1.2 matt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 25 1.2 matt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 26 1.2 matt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27 1.2 matt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 28 1.2 matt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 1.2 matt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 1.2 matt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 1.2 matt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 1.2 matt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 1.2 matt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 1.2 matt * POSSIBILITY OF SUCH DAMAGE. 35 1.2 matt */ 36 1.2 matt 37 1.2 matt #ifndef _MPC85XX_CADMUSREG_H_ 38 1.2 matt #define _MPC85XX_CADMUSREG_H_ 39 1.2 matt 40 1.2 matt #define CM_BASE 0xF8004000 41 1.2 matt 42 1.2 matt #define CM_VER 0x00 /* System version register */ 43 1.2 matt #define CM_VER_ID __BITS(4,7) 44 1.2 matt #define CM_VER_ID_GET(n) __SHIFTOUT((n), CM_VER_ID) 45 1.2 matt #define CM_VER_REV __BITS(0,3) 46 1.2 matt #define CM_VER_REV_GET(n) __SHIFTOUT((n), CM_VER_ID) 47 1.2 matt #define CM_CSR 0x01 /* General control/status register */ 48 1.2 matt #define CM_CSR_USER __BITS(6,7) 49 1.2 matt #define CM_CSR_USER_GET(n) __SHIFTOUT((n), CM_CSR_USER) 50 1.2 matt #define CM_CSR_EPHY __BITS(1,3) 51 1.2 matt #define CM_CSR_EPHY_GET(n) __SHIFTOUT((n), CM_CSR_EPHY) 52 1.2 matt #define CM_CSR_LED __BIT(0) 53 1.2 matt #define CM_RST 0x02 /* Reset control register */ 54 1.3 andvar #define CM_RST_XRSTEN __BIT(7) /* Enable the NVRAM watchdog timer to function as a general reset input */ 55 1.2 matt #define CM_RST_PHYRST __BIT(6) /* Reset the Ethernet PHY */ 56 1.2 matt #define CM_RST_ATM1RST __BIT(5) /* Reset the FCC1/ATM1 PHYS */ 57 1.2 matt #define CM_RST_ATM2RST __BIT(4) /* Reset the FCC2/ATM2 PHY */ 58 1.2 matt #define CM_RST_MEMRST __BIT(3) /* Reset the memory devices on the daughter card */ 59 1.2 matt #define CM_RST_UTRST __BIT(2) /* Reset the TCOM/ECOM boards */ 60 1.2 matt #define CM_RST_HRESET __BIT(1) /* Assert HRESET */ 61 1.2 matt #define CM_RST_SRESET __BIT(0) /* Assert SRESET */ 62 1.2 matt #define CM_LED 0x05 /* LED data register */ 63 1.2 matt #define CM_PCI 0x06 /* PCI control/status register */ 64 1.2 matt #define CM_PCI_M66O __BIT(7) 65 1.2 matt #define CM_PCI_PCIXCO __BIT(6) 66 1.2 matt #define CM_PCI_M66S __BIT(5) /* PCI V2.3 mode or earlier running at 66MHz */ 67 1.2 matt #define CM_PCI_DUAL __BIT(4) /* Daughter card has selected dual PCI-mode */ 68 1.2 matt #define CM_PCI_PSPEED __BITS(2,3) /* detected PCI speed */ 69 1.2 matt #define CM_PCI_PSPEED_33 __SHIFTIN(0, CM_PCI_PSPEED) 70 1.2 matt #define CM_PCI_PSPEED_66 __SHIFTIN(1, CM_PCI_PSPEED) 71 1.2 matt #define CM_PCI_PCIX __BIT(1) /* the PCI edge connector is connected to a PCI-X backplace */ 72 1.2 matt #define CM_PCI_PCIEN __BIT(0) /* if 1, the PCI backplane is not present */ 73 1.2 matt 74 1.2 matt #define CM_DMA 0x07 /* DMA control register */ 75 1.2 matt #define CM_DMA_DMARQ0 __BIT(6) 76 1.2 matt #define CM_DMA_DMACK0 __BIT(5) 77 1.2 matt #define CM_DMA_DMADN0 __BIT(4) 78 1.2 matt #define CM_DMA_DMARQ1 __BIT(2) 79 1.2 matt #define CM_DMA_DMACK1 __BIT(1) 80 1.2 matt #define CM_DMA_DMADN1 __BIT(0) 81 1.2 matt 82 1.2 matt #endif /* !_MPC85XX_CADMUSREG_H_ */ 83