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