/[gxemul]/trunk/src/include/mpc10xreg.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/src/include/mpc10xreg.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (hide annotations)
Thu Oct 11 18:57:32 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/plain
File size: 6628 byte(s)
more cleanups, debugging and first try to implement mpc401 config register
1 dpavlin 20 /* GXemul: $Id: cpc700reg.h,v 1.2 2005/11/23 23:31:37 debug Exp $ */
2     /* $NetBSD: cpc700reg.h,v 1.3 2003/11/07 17:03:42 augustss Exp $ */
3    
4 dpavlin 53 #ifndef MPC10XREG_H
5     #define MPC10XREG_H
6 dpavlin 20
7     /*
8     * Copyright (c) 2002 The NetBSD Foundation, Inc.
9     * All rights reserved.
10     *
11     * This code is derived from software contributed to The NetBSD Foundation
12     * by Lennart Augustsson (lennart@augustsson.net) at Sandburst Corp.
13     *
14     * Redistribution and use in source and binary forms, with or without
15     * modification, are permitted provided that the following conditions
16     * are met:
17     * 1. Redistributions of source code must retain the above copyright
18     * notice, this list of conditions and the following disclaimer.
19     * 2. Redistributions in binary form must reproduce the above copyright
20     * notice, this list of conditions and the following disclaimer in the
21     * documentation and/or other materials provided with the distribution.
22     * 3. All advertising materials mentioning features or use of this software
23     * must display the following acknowledgement:
24     * This product includes software developed by the NetBSD
25     * Foundation, Inc. and its contributors.
26     * 4. Neither the name of The NetBSD Foundation nor the names of its
27     * contributors may be used to endorse or promote products derived
28     * from this software without specific prior written permission.
29     *
30     * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
31     * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
32     * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
34     * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37     * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38     * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39     * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40     * POSSIBILITY OF SUCH DAMAGE.
41     */
42    
43 dpavlin 57 #if 0
44 dpavlin 20 /* PCI memory space */
45 dpavlin 49 #define MPC_PCI_MEM_BASE 0x80000000
46     #define MPC_PCI_MEM_END 0xf7ffffff
47 dpavlin 55 #endif
48 dpavlin 20
49 dpavlin 57 #if 0
50 dpavlin 20 /* PCI IO space */
51 dpavlin 49 #define MPC_PCI_IO_BASE 0xfec00000
52     #define MPC_PCI_IO_START 0xf8800000 /* for allocation */
53     #define MPC_PCI_IO_END 0xfeffffff
54 dpavlin 52 #endif
55 dpavlin 20
56     /* PCI config space */
57 dpavlin 57 #define MPC10X_MAPB_CNFG_DATA 0xfec00000
58 dpavlin 20
59 dpavlin 52 #if 0
60 dpavlin 20 /* Config space regs */
61 dpavlin 49 #define MPC_PCI_BRDGERR 0x48
62     #define MPC_PCI_CLEARERR 0x0000ff00
63 dpavlin 20
64 dpavlin 49 #define MPC_BRIDGE_OPTIONS2 0x60
65     #define MPC_BRIDGE_O2_ILAT_MASK 0x00f8
66     #define MPC_BRIDGE_O2_ILAT_SHIFT 3
67     #define MPC_BRIDGE_O2_ILAT_PRIM_ASYNC 18
68     #define MPC_BRIDGE_O2_SLAT_MASK 0x0f00
69     #define MPC_BRIDGE_O2_SLAT_SHIFT 8
70     #define MPC_BRIDGE_O2_2LAT_PRIM_ASYNC 2
71 dpavlin 20
72     /* PCI interrupt acknowledge & special cycle */
73 dpavlin 49 #define MPC_INTR_ACK 0xfed00000
74 dpavlin 20
75 dpavlin 49 #define MPC_PMM0_LOCAL 0xff400000
76     #define MPC_PMM0_MASK_ATTR 0xff400004
77     #define MPC_PMM0_PCI_LOW 0xff400008
78     #define MPC_PMM0_PCI_HIGH 0xff40000c
79     #define MPC_PMM1_LOCAL 0xff400010
80     #define MPC_PMM1_MASK_ATTR 0xff400014
81     #define MPC_PMM1_PCI_LOW 0xff400018
82     #define MPC_PMM1_PCI_HIGH 0xff40001c
83     #define MPC_PMM2_LOCAL 0xff400020
84     #define MPC_PMM2_MASK_ATTR 0xff400024
85     #define MPC_PMM2_PCI_LOW 0xff400028
86     #define MPC_PMM2_PCI_HIGH 0xff40002c
87     #define MPC_PTM1_LOCAL 0xff400030
88     #define MPC_PTM1_MEMSIZE 0xff400034
89     #define MPC_PTM2_LOCAL 0xff400038
90     #define MPC_PTM2_MEMSIZE 0xff40003c
91 dpavlin 52 #endif
92 dpavlin 20
93     /* serial ports */
94 dpavlin 49 #define MPC_COM0 0xfc004500ULL
95     #define MPC_COM1 0xfc004600ULL
96     #define MPC_COM_SPEED(bus) ((bus) / (2 * 4))
97 dpavlin 20
98 dpavlin 52 #if 0
99 dpavlin 20 /* processor interface registers */
100 dpavlin 49 #define MPC_PIF_CFGADR 0xff500000
101     #define MPC_PIF_CFG_PRIFOPT1 0x00
102     #define MPC_PIF_CFG_ERRDET1 0x04
103     #define MPC_PIF_CFG_ERREN1 0x08
104     #define MPC_PIF_CFG_CPUERAD 0x0c
105     #define MPC_PIF_CFG_CPUERAT 0x10
106     #define MPC_PIF_CFG_PLBMIFOPT 0x18
107     #define MPC_PIF_CFG_PLBMTLSA1 0x20
108     #define MPC_PIF_CFG_PLBMTLEA1 0x24
109     #define MPC_PIF_CFG_PLBMTLSA2 0x28
110     #define MPC_PIF_CFG_PLBMTLEA2 0x2c
111     #define MPC_PIF_CFG_PLBMTLSA3 0x30
112     #define MPC_PIF_CFG_PLBMTLEA3 0x34
113     #define MPC_PIF_CFG_PLBSNSSA0 0x38
114     #define MPC_PIF_CFG_PLBSNSEA0 0x3c
115     #define MPC_PIF_CFG_BESR 0x40
116     #define MPC_PIF_CFG_BESRSET 0x44
117     #define MPC_PIF_CFG_BEAR 0x4c
118     #define MPC_PIF_CFG_PLBSWRINT 0x80
119     #define MPC_PIF_CFGDATA 0xff500004
120 dpavlin 52 #endif
121 dpavlin 20
122     /* interrupt controller */
123 dpavlin 57 #define MPC_UIC_BASE 0xfc040000
124 dpavlin 49 #define MPC_UIC_SIZE 0x00000024
125     #define MPC_UIC_SR 0x00000000 /* UIC status (read/clear) */
126     #define MPC_UIC_SRS 0x00000004 /* UIC status (set) */
127     #define MPC_UIC_ER 0x00000008 /* UIC enable */
128     #define MPC_UIC_CR 0x0000000c /* UIC critical */
129     #define MPC_UIC_PR 0x00000010 /* UIC polarity 0=low, 1=high*/
130     #define MPC_UIC_TR 0x00000014 /* UIC trigger 0=level; 1=edge */
131     #define MPC_UIC_MSR 0x00000018 /* UIC masked status */
132     #define MPC_UIC_VR 0x0000001c /* UIC vector */
133     #define MPC_UIC_VCR 0x00000020 /* UIC vector configuration */
134     #define MPC_UIC_CVR_PRI 0x00000001 /* 0=intr31 high, 1=intr0 high */
135 dpavlin 20 /*
136     * if intr0 high then interrupt vector at (vcr&~3) + N*512
137     * if intr31 high then interrupt vector at (vcr&~3) + (31-N)*512
138     */
139    
140     /* UIC interrupt bits. Note, MSB is bit 0 */
141     /* Internal */
142 dpavlin 49 #define MPC_IB_ECC 0
143     #define MPC_IB_PCI_WR_RANGE 1
144     #define MPC_IB_PCI_WR_CMD 2
145     #define MPC_IB_UART_0 3
146     #define MPC_IB_UART_1 4
147     #define MPC_IB_IIC_0 5
148     #define MPC_IB_IIC_1 6
149 dpavlin 20 /* 6-16 GPT compare&capture */
150     /* 20-31 external */
151 dpavlin 49 #define MPC_IB_EXT0 20
152     #define MPC_IB_EXT1 21
153     #define MPC_IB_EXT2 22
154     #define MPC_IB_EXT3 23
155     #define MPC_IB_EXT4 24
156     #define MPC_IB_EXT5 25
157     #define MPC_IB_EXT6 26
158     #define MPC_IB_EXT7 27
159     #define MPC_IB_EXT8 28
160     #define MPC_IB_EXT9 29
161     #define MPC_IB_EXT10 30
162     #define MPC_IB_EXT11 31
163 dpavlin 20
164 dpavlin 49 #define MPC_INTR_MASK(irq) (0x80000000 >> (irq))
165 dpavlin 20
166 dpavlin 49 #if 0
167 dpavlin 20 /* IIC */
168 dpavlin 49 #define MPC_IIC0 0xfc020000
169     #define MPC_IIC1 0xfc030000
170     #define MPC_IIC_SIZE 0x00000014
171 dpavlin 20 /* offsets from base */
172 dpavlin 49 #define MPC_IIC_MDBUF 0x00000000
173     #define MPC_IIC_SDBUF 0x00000002
174     #define MPC_IIC_LMADR 0x00000004
175     #define MPC_IIC_HNADR 0x00000005
176     #define MPC_IIC_CNTL 0x00000006
177     #define MPC_IIC_MDCNTL 0x00000007
178     #define MPC_IIC_STS 0x00000008
179     #define MPC_IIC_EXTSTS 0x00000009
180     #define MPC_IIC_LSADR 0x0000000a
181     #define MPC_IIC_HSADR 0x0000000b
182     #define MPC_IIC_CLKDIV 0x0000000c
183     #define MPC_IIC_INTRMSK 0x0000000d
184     #define MPC_IIC_FRCNT 0x0000000e
185     #define MPC_IIC_TCNTLSS 0x0000000f
186     #define MPC_IIC_DIRECTCNTL 0x00000010
187 dpavlin 20
188     /* timer */
189 dpavlin 49 #define MPC_TIMER 0xfc050000
190     #define MPC_GPTTBC 0x00000000
191 dpavlin 20
192 dpavlin 49 #endif
193    
194 dpavlin 53 #endif /* MPC10XREG_H */

  ViewVC Help
Powered by ViewVC 1.1.26