e500reg.h revision 1.4.2.4 1 1.4.2.2 rmind /* $NetBSD: e500reg.h,v 1.4.2.4 2011/05/31 03:04:14 rmind Exp $ */
2 1.4.2.2 rmind /*-
3 1.4.2.2 rmind * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
4 1.4.2.2 rmind * All rights reserved.
5 1.4.2.2 rmind *
6 1.4.2.2 rmind * This code is derived from software contributed to The NetBSD Foundation
7 1.4.2.2 rmind * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
8 1.4.2.2 rmind * Agency and which was developed by Matt Thomas of 3am Software Foundry.
9 1.4.2.2 rmind *
10 1.4.2.2 rmind * This material is based upon work supported by the Defense Advanced Research
11 1.4.2.2 rmind * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
12 1.4.2.2 rmind * Contract No. N66001-09-C-2073.
13 1.4.2.2 rmind * Approved for Public Release, Distribution Unlimited
14 1.4.2.2 rmind *
15 1.4.2.2 rmind * Redistribution and use in source and binary forms, with or without
16 1.4.2.2 rmind * modification, are permitted provided that the following conditions
17 1.4.2.2 rmind * are met:
18 1.4.2.2 rmind * 1. Redistributions of source code must retain the above copyright
19 1.4.2.2 rmind * notice, this list of conditions and the following disclaimer.
20 1.4.2.2 rmind * 2. Redistributions in binary form must reproduce the above copyright
21 1.4.2.2 rmind * notice, this list of conditions and the following disclaimer in the
22 1.4.2.2 rmind * documentation and/or other materials provided with the distribution.
23 1.4.2.2 rmind *
24 1.4.2.2 rmind * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25 1.4.2.2 rmind * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 1.4.2.2 rmind * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 1.4.2.2 rmind * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28 1.4.2.2 rmind * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 1.4.2.2 rmind * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 1.4.2.2 rmind * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 1.4.2.2 rmind * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 1.4.2.2 rmind * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 1.4.2.2 rmind * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 1.4.2.2 rmind * POSSIBILITY OF SUCH DAMAGE.
35 1.4.2.2 rmind */
36 1.4.2.2 rmind
37 1.4.2.2 rmind #include <sys/cdefs.h>
38 1.4.2.2 rmind
39 1.4.2.2 rmind #ifdef _LOCORE
40 1.4.2.2 rmind #define __PPCBIT(n) (1 << (31 - (n)))
41 1.4.2.2 rmind #define __PPCBITS(m, n) (((1 << ((n) - (m) + 1)) - 1) << (31 - (m)))
42 1.4.2.2 rmind #else
43 1.4.2.2 rmind #define __PPCBIT(n) __BIT(31-(n))
44 1.4.2.2 rmind #define __PPCBITS(m,n) __BITS(31-(n),31-(m))
45 1.4.2.2 rmind #endif
46 1.4.2.2 rmind
47 1.4.2.2 rmind #define GUR_SIZE 0x100000
48 1.4.2.4 rmind #define GUR_BPTR 0x0020 /* Boot Page Translation */
49 1.4.2.4 rmind #define BPTR_EN __PPCBIT(0) /* Boot Page Enabled */
50 1.4.2.4 rmind #define BPTR_BOOT_PAGE __PPCBITS(8,31) /* high 24 bits of phys addr */
51 1.4.2.2 rmind
52 1.4.2.2 rmind #define DDRC1_BASE 0x02000
53 1.4.2.2 rmind #define DDRC2_BASE 0x06000
54 1.4.2.2 rmind #define DDRC_SIZE 0x01000
55 1.4.2.2 rmind
56 1.4.2.2 rmind #ifdef DDRC_PRIVATE
57 1.4.2.2 rmind #define CS_BNDS(n) (0x000 + 0x008 * (n))
58 1.4.2.2 rmind #define BNDS_SA __PPCBITS(4,15)
59 1.4.2.2 rmind #define BNDS_SA_GET(n) (((n) & BNDS_SA) << 8)
60 1.4.2.2 rmind #define BNDS_EA __PPCBITS(20,31)
61 1.4.2.2 rmind #define BNDS_EA_GET(n) (((n) & BNDS_EA) << 24)
62 1.4.2.2 rmind #define BNDS_SIZE_GET(n) \
63 1.4.2.2 rmind ((((((n) & BNDS_EA) + __LOWEST_SET_BIT(BNDS_EA)) << 16) - (((n) & BNDS_SA))) << 8)
64 1.4.2.2 rmind #define CS_CONFIG(n) (0x080 + 0x004 * (n))
65 1.4.2.2 rmind #define CS_CONFIG_EN __PPCBIT(0)
66 1.4.2.2 rmind #endif /* DDRC_PRIVATE */
67 1.4.2.2 rmind
68 1.4.2.2 rmind #define GPIO_BASE 0x0fc00
69 1.4.2.2 rmind #define GPIO_SIZE 0x00020
70 1.4.2.2 rmind
71 1.4.2.2 rmind #ifdef GPIO_PRIVATE
72 1.4.2.2 rmind
73 1.4.2.2 rmind #define GPDIR 0x00 /* GPIO direction register */
74 1.4.2.2 rmind #define GPODR 0x04 /* GPIO open drain register */
75 1.4.2.2 rmind #define GPDAT 0x08 /* GPIO data register */
76 1.4.2.2 rmind #define GPIER 0x0C /* GPIO interrupt event register */
77 1.4.2.2 rmind #define GPIMR 0x10 /* GPIO interrupt mask register */
78 1.4.2.2 rmind #define GPICR 0x14 /* GPIO external interrupt control register */
79 1.4.2.2 rmind
80 1.4.2.2 rmind #endif /* GPIO_PRIVATE */
81 1.4.2.2 rmind
82 1.4.2.2 rmind #define PCIE1_BASE 0x0a000
83 1.4.2.2 rmind #define PCIE2_MPC8572_BASE 0x09000 /* P2020 too */
84 1.4.2.2 rmind #define PCIE3_MPC8572_BASE 0x08000 /* P2020 too */
85 1.4.2.2 rmind #define PCIX1_MPC8548_BASE 0x08000
86 1.4.2.2 rmind #define PCIX2_MPC8548_BASE 0x09000
87 1.4.2.2 rmind #define PCIE2_MPC8544_BASE 0x09000 /* MPC8536 too */
88 1.4.2.2 rmind #define PCIE3_MPC8544_BASE 0x0b000 /* MPC8536 too */
89 1.4.2.2 rmind #define PCIX1_MPC8544_BASE 0x08000 /* MPC8536 too */
90 1.4.2.2 rmind #define PCI_SIZE 0x01000
91 1.4.2.2 rmind
92 1.4.2.2 rmind #ifdef PCI_PRIVATE
93 1.4.2.2 rmind
94 1.4.2.2 rmind /* PCI Express Configuration Access Registers */
95 1.4.2.2 rmind #define PEX_CONFIG_ADDR 0x000 /* PCI Express configuration address register */
96 1.4.2.2 rmind #define PCI_CONFIG_ADDR PEX_CONFIG_ADDR
97 1.4.2.2 rmind #define PEX_CONFIG_ADDR_EN __PPCBIT(0)
98 1.4.2.2 rmind #define PEX_CONFIG_ADDR_TAG(b,d,f,r) (((b) << 16) | ((d) << 11) | ((f) << 8) | (r))
99 1.4.2.2 rmind #define PEX_CONFIG_DATA 0x004 /* PCI Express configuration data register */
100 1.4.2.2 rmind #define PCI_CONFIG_DATA PEX_CONFIG_DATA
101 1.4.2.2 rmind #define PCI_INT_ACK 0x008 /* PCI Interrupt Acknowledge */
102 1.4.2.2 rmind #define PEX_OTB_CPL_TOR 0x00C /* PCI Express outbound completion timeout register */
103 1.4.2.2 rmind #define PEX_CONF_RTY_TOR 0x010 /* PCI Express configuration retry timeout register */
104 1.4.2.2 rmind #define PEX_CONFIG 0x014 /* PCI Express configuration register */
105 1.4.2.2 rmind
106 1.4.2.2 rmind /* PCI Express Power Management Event & Message Registers */
107 1.4.2.2 rmind #define PEX_PME_MES_DR 0x020 /* PCI Express PME & message detect register */
108 1.4.2.2 rmind #define PEX_PME_MES_DISR 0x024 /* PCI Express PME & message disable register */
109 1.4.2.2 rmind #define PEX_PME_MES_IER 0x028 /* PCI Express PME & message interrupt enable register */
110 1.4.2.2 rmind #define PEX_PMCR 0x02C /* PCI Express power management command register */
111 1.4.2.2 rmind
112 1.4.2.2 rmind /* PCI Express IP Block Revision Registers */
113 1.4.2.2 rmind #define PEX_IP_BLK_REV1 0xBF8 /* IP block revision register 1 */
114 1.4.2.2 rmind #define PEX_IP_BLK_REV2 0xBFC /* IP block revision register 2 */
115 1.4.2.2 rmind
116 1.4.2.2 rmind /* PCI Express / PCI-X ATMU Registers */
117 1.4.2.2 rmind #define PEXOWAR_EN __PPCBIT(0) /* enable window */
118 1.4.2.2 rmind #define PEXOWAR_ROE __PPCBIT(3) /* relaxed ordering enable */
119 1.4.2.2 rmind #define PEXOWAR_NS __PPCBIT(4) /* no snoop enable */
120 1.4.2.2 rmind #define PEXOWAR_TC __PPCBITS(8,10) /* traffic class PCIEX only */
121 1.4.2.2 rmind #define PEXOWAR_TC0 __SHIFTIN(0, PEXOWAR_TC)
122 1.4.2.2 rmind #define PEXOWAR_TC1 __SHIFTIN(1, PEXOWAR_TC)
123 1.4.2.2 rmind #define PEXOWAR_TC2 __SHIFTIN(2, PEXOWAR_TC)
124 1.4.2.2 rmind #define PEXOWAR_TC3 __SHIFTIN(3, PEXOWAR_TC)
125 1.4.2.2 rmind #define PEXOWAR_TC4 __SHIFTIN(4, PEXOWAR_TC)
126 1.4.2.2 rmind #define PEXOWAR_TC5 __SHIFTIN(5, PEXOWAR_TC)
127 1.4.2.2 rmind #define PEXOWAR_TC6 __SHIFTIN(6, PEXOWAR_TC)
128 1.4.2.2 rmind #define PEXOWAR_TC7 __SHIFTIN(7, PEXOWAR_TC)
129 1.4.2.2 rmind #define PEXOWAR_RTT __PPCBITS(12,15) /* read transaction type */
130 1.4.2.2 rmind #define PEXOWAR_RTT_CONF __SHIFTIN(2, PEXOWAR_RTT) /* PCIEX only */
131 1.4.2.2 rmind #define PEXOWAR_RTT_MEM __SHIFTIN(4, PEXOWAR_RTT)
132 1.4.2.2 rmind #define PEXOWAR_RTT_IO __SHIFTIN(8, PEXOWAR_RTT)
133 1.4.2.2 rmind #define PEXOWAR_WTT __PPCBITS(16,19) /* write transaction type */
134 1.4.2.2 rmind #define PEXOWAR_WTT_CONF __SHIFTIN(2, PEXOWAR_WTT) /* PCIEX only */
135 1.4.2.2 rmind #define PEXOWAR_WTT_MEM __SHIFTIN(4, PEXOWAR_WTT)
136 1.4.2.2 rmind #define PEXOWAR_WTT_IO __SHIFTIN(8, PEXOWAR_WTT)
137 1.4.2.2 rmind #define PEXOWAR_OWS __PPCBITS(26,31) /* encoded as 2^(N+1) bytes */
138 1.4.2.2 rmind
139 1.4.2.2 rmind /* PCI Express / PCI-X ATMU Registers */
140 1.4.2.2 rmind #define PEXIWAR_EN __PPCBIT(0) /* enable window */
141 1.4.2.2 rmind #define PEXIWAR_PF __PPCBIT(3) /* prefetchable */
142 1.4.2.2 rmind #define PEXIWAR_TRGT __PPCBITS(8,11) /* traffic class PCIEX only */
143 1.4.2.2 rmind #define PEXIWAR_TRGT_PCI1 __SHIFTIN(0, PEXIWAR_TRGT)
144 1.4.2.2 rmind #define PEXIWAR_TRGT_PCI2 __SHIFTIN(1, PEXIWAR_TRGT)
145 1.4.2.2 rmind #define PEXIWAR_TRGT_PCIEX __SHIFTIN(2, PEXIWAR_TRGT)
146 1.4.2.2 rmind #define PEXIWAR_TRGT_SRIO __SHIFTIN(12, PEXIWAR_TRGT)
147 1.4.2.2 rmind #define PEXIWAR_TRGT_LOCALMEM __SHIFTIN(15, PEXIWAR_TRGT)
148 1.4.2.2 rmind #define PEXIWAR_RTT __PPCBITS(12,15) /* read transaction type */
149 1.4.2.2 rmind #define PEXIWAR_RTT_MEM __SHIFTIN(4, PEXIWAR_RTT)
150 1.4.2.2 rmind #define PEXIWAR_RTT_MEM_NOSNOOP __SHIFTIN(4, PEXIWAR_RTT)
151 1.4.2.2 rmind #define PEXIWAR_RTT_MEM_SNOOP __SHIFTIN(5, PEXIWAR_RTT)
152 1.4.2.2 rmind #define PEXIWAR_RTT_MEM_ULCKL2 __SHIFTIN(7, PEXIWAR_RTT)
153 1.4.2.2 rmind #define PEXIWAR_WTT __PPCBITS(16,19) /* write transaction type */
154 1.4.2.2 rmind #define PEXIWAR_WTT_MEM_NOSNOOP __SHIFTIN(4, PEXIWAR_WTT)
155 1.4.2.2 rmind #define PEXIWAR_WTT_MEM_SNOOP __SHIFTIN(5, PEXIWAR_WTT)
156 1.4.2.2 rmind #define PEXIWAR_WTT_MEM_ALLOL2 __SHIFTIN(6, PEXIWAR_WTT)
157 1.4.2.2 rmind #define PEXIWAR_WTT_MEM_ALCKL2 __SHIFTIN(7, PEXIWAR_WTT)
158 1.4.2.2 rmind #define PEXIWAR_IWS __PPCBITS(26,31) /* encoded as 2^(N+1) bytes */
159 1.4.2.2 rmind #define PEXIWAR_IWS_GET(n) __SHIFTOUT((n), PEXIWAR_IWS)
160 1.4.2.2 rmind
161 1.4.2.2 rmind /* Outbound Window 0 (Default) */
162 1.4.2.2 rmind #define PEXOTAR0 0xC00 /* PCI Express outbound translation address register 0 (default) */
163 1.4.2.2 rmind #define PEXOTEAR0 0xC04 /* PCI Express outbound translation extended address register 0 (default) */
164 1.4.2.2 rmind #define PEXOWAR0 0xC10 /* PCI Express outbound window attributes register 0 (default) */
165 1.4.2.2 rmind
166 1.4.2.2 rmind /* Outbound Window 1 */
167 1.4.2.2 rmind #define PEXOTAR1 0xC20 /* PCI Express outbound translation address register 1 */
168 1.4.2.2 rmind #define PEXOTEAR1 0xC24 /* PCI Express outbound translation extended address register 1 */
169 1.4.2.2 rmind #define PEXOWBAR1 0xC28 /* PCI Express outbound window base address register 1 */
170 1.4.2.2 rmind #define PEXOWAR1 0xC30 /* PCI Express outbound window attributes register 1 */
171 1.4.2.2 rmind
172 1.4.2.2 rmind /* Outbound Window 2 */
173 1.4.2.2 rmind #define PEXOTAR2 0xC40 /* PCI Express outbound translation address register 2 */
174 1.4.2.2 rmind #define PEXOTEAR2 0xC44 /* PCI Express outbound translation extended address register 2 */
175 1.4.2.2 rmind #define PEXOWBAR2 0xC48 /* PCI Express outbound window base address register 2 */
176 1.4.2.2 rmind #define PEXOWAR2 0xC50 /* PCI Express outbound window attributes register 2 */
177 1.4.2.2 rmind
178 1.4.2.2 rmind /* Outbound Window 3 */
179 1.4.2.2 rmind #define PEXOTAR3 0xC60 /* PCI Express outbound translation address register 3 */
180 1.4.2.2 rmind #define PEXOTEAR3 0xC64 /* PCI Express outbound translation extended address register 3 */
181 1.4.2.2 rmind #define PEXOWBAR3 0xC68 /* PCI Express outbound window base address register 3 */
182 1.4.2.2 rmind #define PEXOWAR3 0xC70 /* PCI Express outbound window attributes register 3 */
183 1.4.2.2 rmind
184 1.4.2.2 rmind /* Outbound Window 4 */
185 1.4.2.2 rmind #define PEXOTAR4 0xC80 /* PCI Express outbound translation address register 4 */
186 1.4.2.2 rmind #define PEXOTEAR4 0xC84 /* PCI Express outbound translation extended address register 4 */
187 1.4.2.2 rmind #define PEXOWBAR4 0xC88 /* PCI Express outbound window base address register 4 */
188 1.4.2.2 rmind #define PEXOWAR4 0xC90 /* PCI Express outbound window attributes register 4 */
189 1.4.2.2 rmind
190 1.4.2.2 rmind /* Inbound Window 3 */
191 1.4.2.2 rmind #define PEXITAR3 0xDA0 /* PCI Express inbound translation address register 3 */
192 1.4.2.2 rmind #define PEXIWBAR3 0xDA8 /* PCI Express inbound window base address register 3 */
193 1.4.2.2 rmind #define PEXIWBEAR3 0xDAC /* PCI Express inbound window base extended address register 3 */
194 1.4.2.2 rmind #define PEXIWAR3 0xDB0 /* PCI Express inbound window attributes register 3 */
195 1.4.2.2 rmind
196 1.4.2.2 rmind /* Inbound Window 2 */
197 1.4.2.2 rmind #define PEXITAR2 0xDC0 /* PCI Express inbound translation address register 2 */
198 1.4.2.2 rmind #define PEXIWBAR2 0xDC8 /* PCI Express inbound window base address register 2 */
199 1.4.2.2 rmind #define PEXIWBEAR2 0xDCC /* PCI Express inbound window base extended address register 2 */
200 1.4.2.2 rmind #define PEXIWAR2 0xDD0 /* PCI Express inbound window attributes register 2 */
201 1.4.2.2 rmind
202 1.4.2.2 rmind /* Inbound Window 1 */
203 1.4.2.2 rmind #define PEXITAR1 0xDE0 /* PCI Express inbound translation address register 1 */
204 1.4.2.2 rmind #define PEXIWBAR1 0xDE8 /* PCI Express inbound window base address register 1 */
205 1.4.2.2 rmind #define PEXIWAR1 0xDF0 /* PCI Express inbound window attributes register 1 */
206 1.4.2.2 rmind
207 1.4.2.2 rmind /* PCI Express Error Management Registers */
208 1.4.2.2 rmind #define PEX_ERR_DR 0xE00 /* PCI Express error detect register */
209 1.4.2.2 rmind #define PEXERRDR_ICCA __PPCBIT(14)
210 1.4.2.2 rmind #define PEX_ERR_EN 0xE08 /* PCI Express error interrupt enable register */
211 1.4.2.2 rmind #define PEX_ERR_DISR 0xE10 /* PCI Express error disable register */
212 1.4.2.2 rmind #define PEX_ERR_CAP_STAT 0xE20 /* PCI Express error capture status register */
213 1.4.2.2 rmind #define PEX_ERR_CAP_R0 0xE28 /* PCI Express error capture register 0 */
214 1.4.2.2 rmind #define PEX_ERR_CAP_R1 0xE2C /* PCI Express error capture register 1 */
215 1.4.2.2 rmind #define PEX_ERR_CAP_R2 0xE30 /* PCI Express error capture register 2 */
216 1.4.2.2 rmind #define PEX_ERR_CAP_R3 0xE34 /* PCI Express error capture register 3 */
217 1.4.2.2 rmind
218 1.4.2.2 rmind /* PCI Express Private Configuration Space */
219 1.4.2.2 rmind
220 1.4.2.2 rmind #define PEX_LTSSM 0x404
221 1.4.2.2 rmind #define LTSSM_L0 16
222 1.4.2.2 rmind
223 1.4.2.2 rmind #define PCI_PBFR 0x44 /* Bus Function Register */
224 1.4.2.2 rmind #define PBFR_PAH __BIT(0)
225 1.4.2.2 rmind
226 1.4.2.2 rmind #endif /* PCI_PRIVATE */
227 1.4.2.2 rmind
228 1.4.2.2 rmind #define OPENPIC_BASE 0x40000
229 1.4.2.2 rmind #define OPENPIC_SIZE 0x40000
230 1.4.2.2 rmind
231 1.4.2.2 rmind #define L2CACHE_BASE 0x20000
232 1.4.2.2 rmind #define L2CACHE_SIZE 0x01000
233 1.4.2.2 rmind
234 1.4.2.2 rmind #ifdef L2CACHE_PRIVATE
235 1.4.2.2 rmind #define L2CTL 0x000
236 1.4.2.2 rmind #define L2CTL_L2E __PPCBIT(0)
237 1.4.2.2 rmind #define L2CTL_L2I __PPCBIT(1)
238 1.4.2.2 rmind #define L2CTL_L2SIZ __PPCBITS(2,3)
239 1.4.2.2 rmind #define L2CTL_L2SIZ_GET(x) (1 << (17 + __SHIFTOUT((x), L2CTL_L2SIZ)))
240 1.4.2.2 rmind #define L2CTL_L2DO __PPCBIT(9)
241 1.4.2.2 rmind #define L2CTL_L2IO __PPCBIT(10)
242 1.4.2.2 rmind #define L2CTL_L2INTDIS __PPCBIT(12)
243 1.4.2.2 rmind #define L2CTL_L2SRAM __PPCBITS(13,15)
244 1.4.2.2 rmind #define L2CTL_L2LO __PPCBIT(18)
245 1.4.2.2 rmind #define L2CTL_L2SLC __PPCBIT(19)
246 1.4.2.2 rmind #define L2CTL_L2LFR __PPCBIT(21)
247 1.4.2.2 rmind #define L2CTL_L2LFRID __PPCBITS(22,23)
248 1.4.2.2 rmind #define L2CTL_L2STASHDIS __PPCBIT(28)
249 1.4.2.2 rmind #define L2CTL_L2STASH __PPCBITS(30,31)
250 1.4.2.2 rmind
251 1.4.2.2 rmind #endif /* L2CACHE_PRIVATE */
252 1.4.2.2 rmind
253 1.4.2.2 rmind #define I2C1_BASE 0x3000
254 1.4.2.2 rmind #define I2C2_BASE 0x3100
255 1.4.2.2 rmind #define I2C_SIZE 0x0100
256 1.4.2.2 rmind
257 1.4.2.2 rmind #ifdef I2C_PRIVATE
258 1.4.2.2 rmind #define I2CADR 0x000 /* i2c address register */
259 1.4.2.2 rmind #define I2CFDR 0x004 /* i2c frequency divider register */
260 1.4.2.2 rmind #define I2CCR 0x008 /* i2c control register */
261 1.4.2.2 rmind #define I2CSR 0x00c /* i2c status register */
262 1.4.2.2 rmind #define I2CDR 0x010 /* i2c data register */
263 1.4.2.2 rmind #define I2CDFSSR 0x014 /* i2c address register */
264 1.4.2.2 rmind #endif /* I2C_PRIVATE */
265 1.4.2.2 rmind
266 1.4.2.2 rmind #define DUART1_BASE 0x4500
267 1.4.2.2 rmind #define DUART2_BASE 0x4600
268 1.4.2.2 rmind #define DUART_SIZE 0x0100
269 1.4.2.2 rmind
270 1.4.2.2 rmind #define SPI_BASE 0x7000 /* MPC8536 */
271 1.4.2.2 rmind #define SPI_SIZE 0x1000
272 1.4.2.2 rmind
273 1.4.2.2 rmind #define SATA1_BASE 0x18000 /* MPC8536 */
274 1.4.2.2 rmind #define SATA2_BASE 0x19000 /* MPC8536 */
275 1.4.2.2 rmind #define SATA_SIZE 0x01000
276 1.4.2.2 rmind
277 1.4.2.2 rmind #define USB1_BASE 0x22100 /* MPC8536 */
278 1.4.2.2 rmind #define USB2_BASE 0x23100 /* MPC8536 */
279 1.4.2.2 rmind #define USB3_BASE 0x2b100 /* MPC8536 */
280 1.4.2.2 rmind #define USB_SIZE 0x00f00
281 1.4.2.2 rmind
282 1.4.2.2 rmind #define USB_SNOOP1 0x400
283 1.4.2.2 rmind #define USB_SNOOP2 0x404
284 1.4.2.2 rmind
285 1.4.2.2 rmind #define SNOOP_2GB 0x1e
286 1.4.2.2 rmind
287 1.4.2.2 rmind #define ETSEC1_BASE 0x24000
288 1.4.2.2 rmind #define ETSEC2_BASE 0x25000
289 1.4.2.2 rmind #define ETSEC3_BASE 0x26000
290 1.4.2.2 rmind #define ETSEC4_BASE 0x27000
291 1.4.2.2 rmind #define ETSEC_SIZE 0x01000
292 1.4.2.2 rmind
293 1.4.2.2 rmind #define ESDHC_BASE 0x2e000
294 1.4.2.2 rmind #define ESDHC_SIZE 0x01000
295 1.4.2.2 rmind
296 1.4.2.2 rmind #define GLOBAL_BASE 0xe0000
297 1.4.2.2 rmind #define GLOBAL_SIZE 0x01000
298 1.4.2.2 rmind
299 1.4.2.2 rmind #ifdef GLOBAL_PRIVATE
300 1.4.2.2 rmind
301 1.4.2.2 rmind /* Power-On Reset Configuration Values */
302 1.4.2.2 rmind #define PORPLLSR 0x000 /* POR PLL ratio status register */
303 1.4.2.2 rmind #define E500_RATIO2 __PPCBITS(2,7)
304 1.4.2.2 rmind #define E500_RATIO2_GET(n) __SHIFTOUT(n, E500_RATIO2)
305 1.4.2.2 rmind #define E500_RATIO __PPCBITS(10,15)
306 1.4.2.2 rmind #define E500_RATIO_GET(n) __SHIFTOUT(n, E500_RATIO)
307 1.4.2.2 rmind #define PCI1_CLK_SEL __PPCBIT(16)
308 1.4.2.2 rmind #define PCI2_CLK_SEL __PPCBIT(17)
309 1.4.2.2 rmind #define PLAT_RATIO __PPCBITS(26,30)
310 1.4.2.2 rmind #define PLAT_RATIO_GET(n) __SHIFTOUT(n, PLAT_RATIO)
311 1.4.2.2 rmind #define PORBMSR 0x004 /* POR boot mode status register */
312 1.4.2.2 rmind #define PORBMSR_BCFG __PPCBITS(0,1)
313 1.4.2.2 rmind #define PORBMSR_HA __PPCBITS(13,15)
314 1.4.2.2 rmind #define PORBMSR_HA_GET(n) __SHIFTOUT(m, PORBMSR_HA)
315 1.4.2.2 rmind #define PORBMSR_HA_PEXSRIO_AGENT 0 /* PCI Express & SRIO agent mode */
316 1.4.2.2 rmind #define PORBMSR_HA_SRIO_AGENT 1 /* SRIO agent mode */
317 1.4.2.2 rmind #define PORBMSR_HA_PEX_AGENT 2 /* PCI Express agent mode */
318 1.4.2.2 rmind #define PORBMSR_HA_PEXPCI_AGENT2 3 /* PCI[-X] & PCI Express agent mode */
319 1.4.2.2 rmind #define PORBMSR_HA_PCISRIO_AGENT2 4 /* PCI[-X] & SRIO mode */
320 1.4.2.2 rmind #define PORBMSR_HA_SRIO_AGENT2 5 /* SRIO agent mode */
321 1.4.2.2 rmind #define PORBMSR_HA_PCI_AGENT2 6 /* PCI[-X] agent mode */
322 1.4.2.2 rmind #define PORBMSR_HA_HOST 7 /* Host mode */
323 1.4.2.2 rmind #define PORIMPSCR 0x008 /* POR I/O impedance status and control register */
324 1.4.2.2 rmind #define PORDEVSR 0x00C /* POR I/O device status register */
325 1.4.2.2 rmind #define PORDEVSR_ECW1 __PPCBIT(0)
326 1.4.2.2 rmind #define PORDEVSR_ECW2 __PPCBIT(1)
327 1.4.2.2 rmind #define PORDEVSR_SGMII1_DIS1 __PPCBIT(2)
328 1.4.2.2 rmind #define PORDEVSR_SGMII1_DIS2 __PPCBIT(3)
329 1.4.2.2 rmind #define PORDEVSR_SGMII1_DIS3 __PPCBIT(4)
330 1.4.2.2 rmind #define PORDEVSR_SGMII1_DIS4 __PPCBIT(5)
331 1.4.2.2 rmind #define PORDEVSR_ECP1 __PPCBITS(6,7)
332 1.4.2.2 rmind #define PORDEVSR_PCI1 __PPCBIT(8)
333 1.4.2.2 rmind #define PCI1_PCIX 0
334 1.4.2.2 rmind #define PCI1_PCI1 1
335 1.4.2.2 rmind #define PORDEVSR_IOSEL __PPCBITS(9,12)
336 1.4.2.2 rmind #define IOSEL_MPC8536_OFF 0x01
337 1.4.2.2 rmind #define IOSEL_MPC8536_PCIE1_X4 0x02
338 1.4.2.2 rmind #define IOSEL_MPC8536_PCIE1_X8 0x03
339 1.4.2.2 rmind #define IOSEL_MPC8536_PCIE12_X4 0x05
340 1.4.2.2 rmind #define IOSEL_MPC8536_PCIE1_X4_PCI23_X2 0x07
341 1.4.2.2 rmind #define IOSEL_MPC8544_OFF 0x00
342 1.4.2.2 rmind #define IOSEL_MPC8544_SGMII_ON 0x01
343 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE1_ON 0x02
344 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE1_SGMII_ON 0x03
345 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE12_ON 0x04
346 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE12_SGMII_ON 0x05
347 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE123_ON 0x06
348 1.4.2.2 rmind #define IOSEL_MPC8544_PCIE123_SGMII_ON 0x07
349 1.4.2.2 rmind #define IOSEL_MPC8548_SRIO2500_PCIE1_X4 3
350 1.4.2.2 rmind #define IOSEL_MPC8548_SRIO1250_PCIE1_X4 4
351 1.4.2.2 rmind #define IOSEL_MPC8548_SRIO3125 5
352 1.4.2.2 rmind #define IOSEL_MPC8548_SRIO1250 6
353 1.4.2.2 rmind #define IOSEL_MPC8548_PCIE1_X8 7
354 1.4.2.2 rmind #define IOSEL_MPC8572_PCIE1_X4 2
355 1.4.2.2 rmind #define IOSEL_MPC8572_PCIE12_X4 3
356 1.4.2.2 rmind #define IOSEL_MPC8572_SRIO2500 6
357 1.4.2.2 rmind #define IOSEL_MPC8572_PCIE1_X4_23_X2 7
358 1.4.2.2 rmind #define IOSEL_MPC8572_SRIO2500_PCIE1_X4 11
359 1.4.2.2 rmind #define IOSEL_MPC8572_SRIO1250_PCIE1_X4 12
360 1.4.2.2 rmind #define IOSEL_MPC8572_SRIO3125 13
361 1.4.2.2 rmind #define IOSEL_MPC8572_SRIO1250 14
362 1.4.2.2 rmind #define IOSEL_MPC8572_PCIE1_X8 15
363 1.4.2.2 rmind #define IOSEL_P20x0_PCIE1_X1 0
364 1.4.2.2 rmind #define IOSEL_P20x0_PCIE12_X1_3_X2 2
365 1.4.2.2 rmind #define IOSEL_P20x0_PCIE13_X2 4
366 1.4.2.2 rmind #define IOSEL_P20x0_PCIE1_X4 6
367 1.4.2.3 rmind #define IOSEL_P20x0_PCIE1_X1_SRIO2500_1X 13
368 1.4.2.2 rmind #define IOSEL_P20x0_PCIE12_X1_SGMII23 14
369 1.4.2.2 rmind #define IOSEL_P20x0_PCIE1_X2_SGMII23 15
370 1.4.2.2 rmind #define PORDEVSR_PCI2_ARB __PPCBIT(13)
371 1.4.2.2 rmind #define PORDEVSR_PCI1_ARB __PPCBIT(14)
372 1.4.2.2 rmind #define PORDEVSR_PCI32 __PPCBIT(15)
373 1.4.2.2 rmind #define PCI32_FALSE 0
374 1.4.2.2 rmind #define PCI32_TRUE 1
375 1.4.2.2 rmind #define PORDEVSR_PCI1_SPD __PPCBIT(16)
376 1.4.2.2 rmind #define PORDEVSR_PCI2_SPD __PPCBIT(17)
377 1.4.2.2 rmind #define PORDEVSR_SYS_SPD __PPCBIT(17) /* MPC8536 */
378 1.4.2.2 rmind #define PORDEVSR_CORE_SPD __PPCBIT(18) /* MPC8536 */
379 1.4.2.2 rmind #define PORDEVSR_ECP2 __PPCBITS(18,19)
380 1.4.2.2 rmind #define PORDEVSR_ECP3 __PPCBITS(20,21)
381 1.4.2.2 rmind #define PORDEVSR_ECP4 __PPCBITS(22,23)
382 1.4.2.2 rmind #define PORDEVSR_FEC_DIS __PPCBIT(24)
383 1.4.2.2 rmind #define PORDEVSR_RTPE __PPCBIT(25)
384 1.4.2.2 rmind #define PORDEVSR_RIO_CTLS __PPCBIT(28)
385 1.4.2.2 rmind #define PORDEVSR_DEV_ID __PPCBITs(29,31)
386 1.4.2.2 rmind #define PORDBGMSR 0x010 /* POR debug mode status register */
387 1.4.2.2 rmind #define PORDEVSR2 0x014 /* POR I/O device status register 2 */
388 1.4.2.2 rmind #define GPPORCR 0x020 /* General-purpose POR configuration register */
389 1.4.2.2 rmind
390 1.4.2.2 rmind /* Signal Multiplexing and GPIO Controls */
391 1.4.2.2 rmind #define GPIOCR 0x030 /* GPIO control register */
392 1.4.2.2 rmind #define GPIOCR_TX2 __PPCBIT(6) /* Enable TSEC2_TX[7:0] as GP output */
393 1.4.2.2 rmind #define GPIOCR_RX2 __PPCBIT(7) /* Enable TSEC2_RX[7:0] as GP input */
394 1.4.2.2 rmind #define GPIOCR_PCIOUT __PPCBIT(14) /* Enable PCI2_AD[15:8] as GP output */
395 1.4.2.2 rmind #define GPIOCR_PCIIN __PPCBIT(15) /* Enable PCI2_AD[7:0] as GP input */
396 1.4.2.2 rmind #define GPIOCR_GPOUT __PPCBIT(22) /* Enable GPOUT[24:31] as GP output */
397 1.4.2.2 rmind #define GPOUTDR 0x040 /* General-purpose output data register */
398 1.4.2.2 rmind #define GPOUTDR_TX2 0x040 /* General-purpose output data register */
399 1.4.2.2 rmind #define GPOUTDR_PCI 0x041 /* General-purpose output data register */
400 1.4.2.2 rmind #define GPOUTDR_GPOUT 0x043 /* General-purpose output data register */
401 1.4.2.2 rmind #define GPINDR 0x050 /* General-purpose input data register */
402 1.4.2.2 rmind #define GPINDR_RX2 0x059
403 1.4.2.2 rmind #define GPINDR_PCI 0x051
404 1.4.2.2 rmind
405 1.4.2.2 rmind #define PMUXCR 0x060 /* Alternate function signal multiplex control */
406 1.4.2.2 rmind #define PMUXCR_SD_DATA __PPCBIT(0)
407 1.4.2.2 rmind #define PMUXCR_SDHC_CD __PPCBIT(1)
408 1.4.2.2 rmind #define PMUXCR_SDHC_WP __PPCBIT(2)
409 1.4.2.2 rmind #define PMUXCR_PCI_REQGNT3 __PPCBIT(3)
410 1.4.2.3 rmind #define PMUXCR_TSEC1_TS __PPCBIT(3)
411 1.4.2.2 rmind #define PMUXCR_PCI_REQGNT4 __PPCBIT(4)
412 1.4.2.3 rmind #define PMUXCR_TSEC2_TS __PPCBIT(4)
413 1.4.2.2 rmind #define PMUXCR_USB1 __PPCBIT(5)
414 1.4.2.3 rmind #define PMUXCR_TSEC3_TS __PPCBIT(5)
415 1.4.2.2 rmind #define PMUXCR_USB2 __PPCBIT(6)
416 1.4.2.3 rmind #define PMUXCR_USB __PPCBIT(6)
417 1.4.2.2 rmind #define PMUXCR_DMA0 __PPCBIT(14)
418 1.4.2.2 rmind #define PMUXCR_DMA2 __PPCBIT(15)
419 1.4.2.2 rmind #define PMUXCR_DMA1 __PPCBIT(30)
420 1.4.2.2 rmind #define PMUXCR_DMA3 __PPCBIT(31)
421 1.4.2.2 rmind
422 1.4.2.2 rmind /* Device Disables */
423 1.4.2.2 rmind #define DEVDISR 0x070 /* Device disable control */
424 1.4.2.2 rmind #define DEVDISR_PCI1 __PPCBIT(0)
425 1.4.2.2 rmind #define DEVDISR_PCI2 __PPCBIT(1)
426 1.4.2.2 rmind #define DEVDISR_PCIE __PPCBIT(2)
427 1.4.2.2 rmind #define DEVDISR_LBC __PPCBIT(4)
428 1.4.2.2 rmind #define DEVDISR_PCIE2 __PPCBIT(5)
429 1.4.2.2 rmind #define DEVDISR_PCIE3 __PPCBIT(6)
430 1.4.2.2 rmind #define DEVDISR_SEC __PPCBIT(7)
431 1.4.2.2 rmind #define DEVDISR_PME __PPCBIT(8)
432 1.4.2.2 rmind #define DEVDISR_USB1 __PPCBIT(8) /* MPC8536 */
433 1.4.2.2 rmind #define DEVDISR_TLU1 __PPCBIT(9)
434 1.4.2.2 rmind #define DEVDISR_USB2 __PPCBIT(9) /* MPC8536 */
435 1.4.2.2 rmind #define DEVDISR_TLU2 __PPCBIT(10)
436 1.4.2.2 rmind #define DEVDISR_ESDHC_10 __PPCBIT(10)
437 1.4.2.2 rmind #define DEVDISR_USB3 __PPCBIT(10) /* MPC8536 */
438 1.4.2.2 rmind #define DEVDISR_L2 __PPCBIT(11) /* MPC8536 */
439 1.4.2.2 rmind #define DEVDISR_SRIO __PPCBIT(12)
440 1.4.2.2 rmind #define DEVDISR_ESDHC_12 __PPCBIT(12) /* MPC8536 */
441 1.4.2.2 rmind #define DEVDISR_RMSG __PPCBIT(13)
442 1.4.2.2 rmind #define DEVDISR_SATA1 __PPCBIT(13) /* MPC8536 */
443 1.4.2.2 rmind #define DEVDISR_DDR2_14 __PPCBIT(14)
444 1.4.2.2 rmind #define DEVDISR_DDR_15 __PPCBIT(15)
445 1.4.2.2 rmind #define DEVDISR_SPI_15 __PPCBIT(15) /* MPC8536 */
446 1.4.2.2 rmind #define DEVDISR_E500 __PPCBIT(16)
447 1.4.2.2 rmind #define DEVDISR_DDR_16 __PPCBIT(16) /* MPC8536 */
448 1.4.2.2 rmind #define DEVDISR_TB __PPCBIT(17)
449 1.4.2.2 rmind #define DEVDISR_E500_1 __PPCBIT(18)
450 1.4.2.2 rmind #define DEVDISR_TB_1 __PPCBIT(19)
451 1.4.2.2 rmind #define DEVDISR_SATA2 __PPCBIT(20) /* MPC8536 */
452 1.4.2.2 rmind #define DEVDISR_DMA __PPCBIT(21)
453 1.4.2.2 rmind #define DEVDISR_DMA2 __PPCBIT(22)
454 1.4.2.2 rmind #define DEVDISR_SRDS2 __PPCBIT(22) /* MPC8536 */
455 1.4.2.2 rmind #define DEVDISR_TSEC1 __PPCBIT(24)
456 1.4.2.2 rmind #define DEVDISR_TSEC2 __PPCBIT(25)
457 1.4.2.2 rmind #define DEVDISR_TSEC3 __PPCBIT(26)
458 1.4.2.2 rmind #define DEVDISR_TSEC4 __PPCBIT(27)
459 1.4.2.2 rmind #define DEVDISR_FEC __PPCBIT(28)
460 1.4.2.2 rmind #define DEVDISR_SPI_28 __PPCBIT(28) /* P2020 */
461 1.4.2.2 rmind #define DEVDISR_I2C __PPCBIT(29)
462 1.4.2.2 rmind #define DEVDISR_DUART __PPCBIT(30)
463 1.4.2.2 rmind #define DEVDISR_SRDS1 __PPCBIT(31) /* MPC8536 */
464 1.4.2.2 rmind
465 1.4.2.2 rmind /* Power Management Registers */
466 1.4.2.2 rmind #define POWMGTCSR 0x080 /* Power management status and control register */
467 1.4.2.2 rmind
468 1.4.2.2 rmind /* Interrupt and Reset Status and Control */
469 1.4.2.2 rmind #define MCPSUMR 0x090 /* Machine check summary register */
470 1.4.2.2 rmind #define RSTRSCR 0x094 /* Reset request status and control register */
471 1.4.2.2 rmind
472 1.4.2.2 rmind /* Version Registers */
473 1.4.2.2 rmind #define PVR 0x0A0 /* Processor version register */
474 1.4.2.2 rmind #define SVR 0x0A4 /* System version register */
475 1.4.2.2 rmind
476 1.4.2.2 rmind /* Status Registers */
477 1.4.2.2 rmind #define RSTCR 0x0B0 /* Reset control register */
478 1.4.2.2 rmind #define HRESET_REQ __PPCBIT(30) /* hardware reset request */
479 1.4.2.2 rmind #define LBCVSELCR 0x0C0 /* LBC voltage select control register */
480 1.4.2.2 rmind #define DDRCSR 0xB20 /* DDR calibration status register */
481 1.4.2.2 rmind #define DDRCDR 0xB24 /* DDR control driver register */
482 1.4.2.2 rmind #define DDRCLKDR 0xB28 /* DDR clock disable register */
483 1.4.2.2 rmind
484 1.4.2.2 rmind /* Debug Control */
485 1.4.2.2 rmind #define CLKOCR 0xE00 /* Clock out control register */
486 1.4.2.2 rmind #define SRDSCR0 0xF04 /* LSerDes control register 0 */
487 1.4.2.2 rmind #define SRDSCR1 0xF08 /* LSerDes control register 1 */
488 1.4.2.2 rmind #define TSEC12IOOVCR 0xF28 /* eTSEC 1 & 2 overdrive control register */
489 1.4.2.2 rmind #define TSEC34IOOVCR 0xF2C /* eTSEC 3 & 4 overdrive control register */
490 1.4.2.2 rmind #endif /* GLOBAL_PRIVATE */
491 1.4.2.2 rmind
492 1.4.2.2 rmind #define LBC_BASE 0x5000
493 1.4.2.2 rmind #define LBC_SIZE 0x0fff
494 1.4.2.2 rmind
495 1.4.2.2 rmind #ifdef LBC_PRIVATE
496 1.4.2.2 rmind
497 1.4.2.2 rmind #define BR_BA __PPCBITS(0,16)
498 1.4.2.2 rmind #define BR_XBA __PPCBITS(17,18)
499 1.4.2.2 rmind #define BR_PS __PPCBITS(19,20)
500 1.4.2.2 rmind #define BR_PS_8BIT __SHIFTIN(1,BR_PS)
501 1.4.2.2 rmind #define BR_PS_16BIT __SHIFTIN(2,BR_PS)
502 1.4.2.2 rmind #define BR_PS_32BIT __SHIFTIN(3,BR_PS)
503 1.4.2.2 rmind #define BR_DECC __PPCBITS(21,22)
504 1.4.2.2 rmind #define BR_DECC_NONE __SHIFTIN(0,BR_DECC)
505 1.4.2.2 rmind #define BR_DECC_PARITY __SHIFTIN(1,BR_DECC)
506 1.4.2.2 rmind #define BR_DECC_RMWPAR __SHIFTIN(2,BR_DECC)
507 1.4.2.2 rmind #define BR_WP __PPCBIT(23)
508 1.4.2.2 rmind #define BR_MSEL __PPCBITS(24,26)
509 1.4.2.2 rmind #define BR_MSEL_GPCM __SHIFTIN(0,BR_MSEL)
510 1.4.2.2 rmind #define BR_MSEL_FCM __SHIFTIN(1,BR_MSEL)
511 1.4.2.2 rmind #define BR_MSEL_SDRAM __SHIFTIN(3,BR_MSEL)
512 1.4.2.2 rmind #define BR_MSEL_UPMA __SHIFTIN(4,BR_MSEL)
513 1.4.2.2 rmind #define BR_MSEL_UPMB __SHIFTIN(5,BR_MSEL)
514 1.4.2.2 rmind #define BR_MSEL_UPMC __SHIFTIN(6,BR_MSEL)
515 1.4.2.2 rmind #define BR_ATOM __PPCBITS(28,29)
516 1.4.2.2 rmind #define BR_ATOM_NONE __SHIFTIN(0,BR_ATOM)
517 1.4.2.2 rmind #define BR_ATOM_RAWA __SHIFTIN(1,BR_ATOM)
518 1.4.2.2 rmind #define BR_ATOM_WARA __SHIFTIN(2,BR_ATOM)
519 1.4.2.2 rmind #define BR_V __PPCBIT(31)
520 1.4.2.2 rmind
521 1.4.2.2 rmind #define OR_AM __PPCBITS(0,16)
522 1.4.2.2 rmind #define OR_XAM __PPCBITS(17,18)
523 1.4.2.2 rmind #define OR_BCTLD __PPCBIT(19)
524 1.4.2.2 rmind #define OR_CSNT __PPCBIT(20)
525 1.4.2.2 rmind #define OR_ACS __PPCBITS(21,22)
526 1.4.2.2 rmind #define OR_XACS __PPCBIT(23)
527 1.4.2.2 rmind #define OR_SCY __PPCBITS(24,27)
528 1.4.2.2 rmind #define OR_SETA __PPCBIT(28)
529 1.4.2.2 rmind #define OR_TRLX __PPCBIT(29)
530 1.4.2.2 rmind #define OR_EHTR __PPCBIT(30)
531 1.4.2.2 rmind #define OR_EAD __PPCBIT(31)
532 1.4.2.2 rmind
533 1.4.2.2 rmind #define BRn(n) (BR0 + 8*(n))
534 1.4.2.2 rmind #define ORn(n) (OR0 + 8*(n))
535 1.4.2.2 rmind #define BR0 0x000 /* Base register 0 */
536 1.4.2.2 rmind #define OR0 0x004 /* Options register 0 */
537 1.4.2.2 rmind #define BR1 0x008 /* Base register 1 */
538 1.4.2.2 rmind #define OR1 0x00C /* Options register 1 */
539 1.4.2.2 rmind #define BR2 0x010 /* Base register 2 */
540 1.4.2.2 rmind #define OR2 0x014 /* Options register 2 */
541 1.4.2.2 rmind #define BR3 0x018 /* Base register 3 */
542 1.4.2.2 rmind #define OR3 0x01C /* Options register 3 */
543 1.4.2.2 rmind #define BR4 0x020 /* Base register 4 */
544 1.4.2.2 rmind #define OR4 0x024 /* Options register 4 */
545 1.4.2.2 rmind #define BR5 0x028 /* Base register 5 */
546 1.4.2.2 rmind #define OR5 0x02C /* Options register 5 */
547 1.4.2.2 rmind #define BR6 0x030 /* Base register 6 */
548 1.4.2.2 rmind #define OR6 0x034 /* Options register 6 */
549 1.4.2.2 rmind #define BR7 0x038 /* Base register 7 */
550 1.4.2.2 rmind #define OR7 0x03C /* Options register 7 */
551 1.4.2.2 rmind #define MAR 0x068 /* UPM address register */
552 1.4.2.2 rmind #define MAMR 0x070 /* UPMA mode register */
553 1.4.2.2 rmind #define MBMR 0x074 /* UPMB mode register */
554 1.4.2.2 rmind #define MCMR 0x078 /* UPMC mode register */
555 1.4.2.2 rmind #define MRTPR 0x084 /* Memory refresh timer prescaler register */
556 1.4.2.4 rmind #define MDR 0x088 /* UPM/FCM data register */
557 1.4.2.4 rmind #define MDR_AS3 __PPCBITS(0,7)
558 1.4.2.4 rmind #define MDR_AS2 __PPCBITS(8,15)
559 1.4.2.4 rmind #define MDR_AS1 __PPCBITS(16,23)
560 1.4.2.4 rmind #define MDR_AS0 __PPCBITS(24,31)
561 1.4.2.2 rmind #define LSDMR 0x094 /* SDRAM mode register */
562 1.4.2.2 rmind #define LURT 0x0A0 /* UPM refresh timer */
563 1.4.2.2 rmind #define LSRT 0x0A4 /* SDRAM refresh timer */
564 1.4.2.2 rmind #define LTESR 0x0B0 /* Transfer error status register */
565 1.4.2.4 rmind #define LTESR_BM __PPCBIT(0)
566 1.4.2.4 rmind #define LTESR_FCT __PPCBIT(1)
567 1.4.2.4 rmind #define LTESR_PAR __PPCBIT(2)
568 1.4.2.4 rmind #define LTESR_WP __PPCBIT(5)
569 1.4.2.4 rmind #define LTESR_ATMW __PPCBIT(8)
570 1.4.2.4 rmind #define LTESR_ATMR __PPCBIT(9)
571 1.4.2.4 rmind #define LTESR_CS __PPCBIT(12)
572 1.4.2.4 rmind #define LTESR_UCC __PPCBIT(30)
573 1.4.2.4 rmind #define LTESR_CC __PPCBIT(31)
574 1.4.2.2 rmind #define LTEDR 0x0B4 /* Transfer error disable register */
575 1.4.2.4 rmind #define LTEDR_BMD __PPCBIT(0)
576 1.4.2.4 rmind #define LTEDR_FCTD __PPCBIT(1)
577 1.4.2.4 rmind #define LTEDR_PARD __PPCBIT(2)
578 1.4.2.4 rmind #define LTEDR_WPD __PPCBIT(5)
579 1.4.2.4 rmind #define LTEDR_WARA __PPCBIT(8)
580 1.4.2.4 rmind #define LTEDR_RAWA __PPCBIT(9)
581 1.4.2.4 rmind #define LTEDR_CSD __PPCBIT(12)
582 1.4.2.4 rmind #define LTEDR_UCCD __PPCBIT(30)
583 1.4.2.4 rmind #define LTEDR_CCD __PPCBIT(31)
584 1.4.2.2 rmind #define LTEIR 0x0B8 /* Transfer error interrupt register */
585 1.4.2.4 rmind #define LTEIR_BMI __PPCBIT(0)
586 1.4.2.4 rmind #define LTEIR_FCTI __PPCBIT(1)
587 1.4.2.4 rmind #define LTEIR_PARI __PPCBIT(2)
588 1.4.2.4 rmind #define LTEIR_WPI __PPCBIT(5)
589 1.4.2.4 rmind #define LTEIR_WARA __PPCBIT(8)
590 1.4.2.4 rmind #define LTEIR_RAWA __PPCBIT(9)
591 1.4.2.4 rmind #define LTEIR_CSI __PPCBIT(12)
592 1.4.2.4 rmind #define LTEIR_UCCI __PPCBIT(30)
593 1.4.2.4 rmind #define LTEIR_CCI __PPCBIT(31)
594 1.4.2.2 rmind #define LTEATR 0x0BC /* Transfer error attributes register */
595 1.4.2.4 rmind #define LTEATR_RWB __PPCBIT(3)
596 1.4.2.4 rmind #define LTEATR_SRCID __PPCBITS(11,15)
597 1.4.2.4 rmind #define LTEATR_PB __PPCBITS(16,19)
598 1.4.2.4 rmind #define LTEATR_BNK __PPCBITS(20,27)
599 1.4.2.4 rmind #define LTEATR_V __PPCBIT(31)
600 1.4.2.2 rmind #define LTEAR 0x0C0 /* Transfer error address register */
601 1.4.2.4 rmind #define LTECCR 0x0C4 /* Transfer error ECC register */
602 1.4.2.4 rmind #define LTECCR_SBCE __PPCBITS(12,15)
603 1.4.2.4 rmind #define LTECCR_MBUE __PPCBITS(28,31)
604 1.4.2.2 rmind #define LBCR 0x0D0 /* Configuration register */
605 1.4.2.2 rmind #define LCRR 0x0D4 /* Clock ratio register */
606 1.4.2.2 rmind
607 1.4.2.4 rmind #define FMR 0x0E0 /* Flash Mode Register */
608 1.4.2.4 rmind #define FMR_CWTO __PPCBITS(16,19)
609 1.4.2.4 rmind #define FMR_BOOT __PPCBIT(20)
610 1.4.2.4 rmind #define FMR_ECCM __PPCBIT(23)
611 1.4.2.4 rmind #define FMR_AL __PPCBITS(26,27)
612 1.4.2.4 rmind #define FMR_OP __PPCBITS(30,31)
613 1.4.2.4 rmind #define FIR 0x0E4 /* Flash Instruction Register */
614 1.4.2.4 rmind #define FIR_OP0 __PPCBITS(0,3)
615 1.4.2.4 rmind #define FIR_OP1 __PPCBITS(4,7)
616 1.4.2.4 rmind #define FIR_OP2 __PPCBITS(8,11)
617 1.4.2.4 rmind #define FIR_OP3 __PPCBITS(12,15)
618 1.4.2.4 rmind #define FIR_OP4 __PPCBITS(16,19)
619 1.4.2.4 rmind #define FIR_OP5 __PPCBITS(20,23)
620 1.4.2.4 rmind #define FIR_OP6 __PPCBITS(24,27)
621 1.4.2.4 rmind #define FIR_OP7 __PPCBITS(28,31)
622 1.4.2.4 rmind #define FIR_OP_NOP 0
623 1.4.2.4 rmind #define FIR_OP_CA 1 /* Issue current column address */
624 1.4.2.4 rmind #define FIR_OP_PA 2 /* Issue current block+page address */
625 1.4.2.4 rmind #define FIR_OP_UA 3 /* Issue user-defined address byte */
626 1.4.2.4 rmind #define FIR_OP_CM0 4 /* Issue command from FCR[CMD0] */
627 1.4.2.4 rmind #define FIR_OP_CM1 5 /* Issue command from FCR[CMD1] */
628 1.4.2.4 rmind #define FIR_OP_CM2 6 /* Issue command from FCR[CMD2] */
629 1.4.2.4 rmind #define FIR_OP_CM3 7 /* Issue command from FCR[CMD3] */
630 1.4.2.4 rmind #define FIR_OP_WB 8 /* Write FBCR bytes of data */
631 1.4.2.4 rmind #define FIR_OP_WS 9 /* Write one byte of data from MDR */
632 1.4.2.4 rmind #define FIR_OP_RB 10 /* Read FBCR bytes of data */
633 1.4.2.4 rmind #define FIR_OP_RS 11 /* Read one byte of data into MDR */
634 1.4.2.4 rmind #define FIR_OP_CW0 12 /* Wait for LFRB then FCR[CMD0] */
635 1.4.2.4 rmind #define FIR_OP_CW1 13 /* Wait for LFRB then FCR[CMD1] */
636 1.4.2.4 rmind #define FIR_OP_RBW 14 /* Wait for LFRB then read FBCR bytes */
637 1.4.2.4 rmind #define FIR_OP_RSW 15 /* Wait for LFRB then byte into MDR */
638 1.4.2.4 rmind #define FCR 0xE8 /* Flash Command Register */
639 1.4.2.4 rmind #define FCR_CMD0 __PPCBITS(0,7)
640 1.4.2.4 rmind #define FCR_CMD1 __PPCBITS(8,15)
641 1.4.2.4 rmind #define FCR_CMD2 __PPCBITS(16,23)
642 1.4.2.4 rmind #define FCR_CMD3 __PPCBITS(24,31)
643 1.4.2.4 rmind #define FBAR 0xEC /* Flash Block Address Register */
644 1.4.2.4 rmind #define FBAR_BLK __PPCBITS(8,31)
645 1.4.2.4 rmind #define FPAR 0xF0 /* Flash Page Address Register */
646 1.4.2.4 rmind #define FPAR_S_PI __PPCBITS(17,21) /* Page Index */
647 1.4.2.4 rmind #define FPAR_S_MS __PPCBIT(22) /* Main(0)/Spare(1) */
648 1.4.2.4 rmind #define FPAR_S_CI __PPCBITS(23,31) /* Column Index */
649 1.4.2.4 rmind #define FPAR_L_PI __PPCBITS(14,19) /* Page Index */
650 1.4.2.4 rmind #define FPAR_L_MS __PPCBIT(20) /* Main(0)/Spare(1) */
651 1.4.2.4 rmind #define FPAR_L_CI __PPCBITS(21,31) /* Column Index */
652 1.4.2.4 rmind #define FBCR 0xF4 /* Flash Byte Count Register */
653 1.4.2.4 rmind #define FBCR_BC __PPCBITS(20,31)
654 1.4.2.4 rmind #define FECC0 0x100
655 1.4.2.4 rmind #define FECC_V __PPCBIT(0)
656 1.4.2.4 rmind #define FECC_ECC __PPCBIT(8,31)
657 1.4.2.4 rmind #define FECC1 0x104
658 1.4.2.4 rmind #define FECC2 0x108
659 1.4.2.4 rmind #define FECC3 0x10C
660 1.4.2.4 rmind
661 1.4.2.2 rmind #define MXMR_RFEN __PPCBIT(1) /* Refresh enable */
662 1.4.2.2 rmind #define MXMR_OP __PPCBITS(2,3) /* Command opcode */
663 1.4.2.2 rmind #define MXMR_OP_NORMAL __SHIFTIN(0, MXMR_OP) /* Normal Operation */
664 1.4.2.2 rmind #define MXMR_OP_WRITE __SHIFTIN(1, MXMR_OP) /* Write to UPM memory */
665 1.4.2.2 rmind #define MXMR_OP_READ __SHIFTIN(2, MXMR_OP) /* Read from UPM memory */
666 1.4.2.2 rmind #define MXMR_OP_RUN __SHIFTIN(3, MXMR_OP) /* Run Pattern */
667 1.4.2.2 rmind #define MXMR_UWPL __PPCBIT(3) /* LUPWAIT is active low */
668 1.4.2.2 rmind #define MXMR_AM __PPCBITS(5,7) /* Address multiplex size */
669 1.4.2.2 rmind #define MXMR_DS __PPCBITS(8,9) /* Disable timer period */
670 1.4.2.2 rmind #define MXMR_DS_1CYCLE __SHIFTIN(0,MXMR_DS)
671 1.4.2.2 rmind #define MXMR_DS_2CYCLE __SHIFTIN(1,MXMR_DS)
672 1.4.2.2 rmind #define MXMR_DS_3CYCLE __SHIFTIN(2,MXMR_DS)
673 1.4.2.2 rmind #define MXMR_DS_4CYCLE __SHIFTIN(3,MXMR_DS)
674 1.4.2.2 rmind #define MXMR_G0CL __PPCBITS(10,12) /* General line 0 control */
675 1.4.2.2 rmind #define MXMR_G0CL_A12 __SHIFTIN(0,MXMR_G0CL)
676 1.4.2.2 rmind #define MXMR_G0CL_A11 __SHIFTIN(1,MXMR_G0CL)
677 1.4.2.2 rmind #define MXMR_G0CL_A10 __SHIFTIN(2,MXMR_G0CL)
678 1.4.2.2 rmind #define MXMR_G0CL_A9 __SHIFTIN(3,MXMR_G0CL)
679 1.4.2.2 rmind #define MXMR_G0CL_A8 __SHIFTIN(4,MXMR_G0CL)
680 1.4.2.2 rmind #define MXMR_G0CL_A7 __SHIFTIN(5,MXMR_G0CL)
681 1.4.2.2 rmind #define MXMR_G0CL_A6 __SHIFTIN(6,MXMR_G0CL)
682 1.4.2.2 rmind #define MXMR_G0CL_A5 __SHIFTIN(7,MXMR_G0CL)
683 1.4.2.2 rmind #define MXMR_GPL4 __PPCBIT(13) /* LGPL4 output line disable */
684 1.4.2.2 rmind #define MXMR_RLF __PPCBITS(14,17) /* Read loop field */
685 1.4.2.2 rmind #define MXMR_WLF __PPCBITS(18,21) /* Write loop field */
686 1.4.2.2 rmind #define MXMR_TLF __PPCBITS(22,25) /* Refresh loop field */
687 1.4.2.2 rmind #define MXMR_MAS __PPCBITS(26,31) /* Machine Address */
688 1.4.2.2 rmind
689 1.4.2.2 rmind #define MRTPR_PTP __PPCBITS(0,7) /* Refresh timers prescaler */
690 1.4.2.2 rmind
691 1.4.2.2 rmind #endif /* LBC_PRIVATE */
692