rmixlreg.h revision 1.3 1 /* $NetBSD: rmixlreg.h,v 1.3 2011/02/20 07:48:37 matt Exp $ */
2
3 /*-
4 * Copyright (c) 2009 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Cliff Neighbors
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 */
31
32
33 #ifndef _MIPS_RMI_RMIXLREGS_H_
34 #define _MIPS_RMI_RMIXLREGS_H_
35
36 #include <sys/endian.h>
37
38 /*
39 * on chip I/O register byte order is
40 * BIG ENDIAN regardless of code model
41 */
42 #define RMIXL_IOREG_VADDR(o) \
43 (volatile uint32_t *)MIPS_PHYS_TO_KSEG1( \
44 rmixl_configuration.rc_io_pbase + (o))
45 #define RMIXL_IOREG_READ(o) be32toh(*RMIXL_IOREG_VADDR(o))
46 #define RMIXL_IOREG_WRITE(o,v) *RMIXL_IOREG_VADDR(o) = htobe32(v)
47
48
49 /*
50 * RMIXL Coprocessor 2 registers:
51 */
52 #ifdef _LOCORE
53 #define _(n) __CONCAT($,n)
54 #else
55 #define _(n) n
56 #endif
57 /*
58 * Note CP2 FMN register scope or "context"
59 * L : Local : per thread register
60 * G : Global : per FMN Station (per core) register
61 * L/G : "partly global" : ???
62 * Global regs should be managed by a single thread
63 * (see XLS PRM "Coprocessor 2 Register Summary")
64 */
65 /* context ---------------+ */
66 /* #sels --------------+ | */
67 /* #regs -----------+ | | */
68 /* What: #bits --+ | | | */
69 /* v v v v */
70 #define RMIXL_COP_2_TXBUF _(0) /* Transmit Buffers 64 [1][4] L */
71 #define RMIXL_COP_2_RXBUF _(1) /* Receive Buffers 64 [1][4] L */
72 #define RMIXL_COP_2_MSG_STS _(2) /* Mesage Status 32 [1][2] L/G */
73 #define RMIXL_COP_2_MSG_CFG _(3) /* MEssage Config 32 [1][2] G */
74 #define RMIXL_COP_2_MSG_BSZ _(4) /* Message Bucket Size 32 [1][8] G */
75 #define RMIXL_COP_2_CREDITS _(16) /* Credit Counters 8 [16][8] G */
76
77 /*
78 * MsgStatus: RMIXL_COP_2_MSG_STS (CP2 Reg 2, Select 0) bits
79 */
80 #define RMIXL_MSG_STS0_RFBE __BITS(31,24) /* RX FIFO Buckets bit mask
81 * 0=not empty
82 * 1=empty
83 */
84 #define RMIXL_MSG_STS0_RFBE_SHIFT 24
85 #define RMIXL_MSG_STS0_RESV __BIT(23)
86 #define RMIXL_MSG_STS0_RMSID __BITS(22,16) /* Source ID */
87 #define RMIXL_MSG_STS0_RMSID_SHIFT 16
88 #define RMIXL_MSG_STS0_RMSC __BITS(15,8) /* RX Message Software Code */
89 #define RMIXL_MSG_STS0_RMSC_SHIFT 8
90 #define RMIXL_MSG_STS0_RMS __BITS(7,6) /* RX Message Size (minus 1) */
91 #define RMIXL_MSG_STS0_RMS_SHIFT 6
92 #define RMIXL_MSG_STS0_LEF __BIT(5) /* Load Empty Fail */
93 #define RMIXL_MSG_STS0_LPF __BIT(4) /* Load Pending Fail */
94 #define RMIXL_MSG_STS0_LMP __BIT(3) /* Load Message Pending */
95 #define RMIXL_MSG_STS0_SCF __BIT(2) /* Send Credit Fail */
96 #define RMIXL_MSG_STS0_SPF __BIT(1) /* Send Pending Fail */
97 #define RMIXL_MSG_STS0_SMP __BIT(0) /* Send Message Pending */
98 #define RMIXL_MSG_STS0_ERRS \
99 (RMIXL_MSG_STS0_LEF|RMIXL_MSG_STS0_LPF|RMIXL_MSG_STS0_LMP \
100 |RMIXL_MSG_STS0_SCF|RMIXL_MSG_STS0_SPF|RMIXL_MSG_STS0_SMP)
101
102 /*
103 * MsgStatus1: RMIXL_COP_2_MSG_STS (CP2 Reg 2, Select 1) bits
104 */
105 #define RMIXL_MSG_STS1_RESV __BIT(31)
106 #define RMIXL_MSG_STS1_C __BIT(30) /* Credit Overrun Error */
107 #define RMIXL_MSG_STS1_CCFCME __BITS(29,23) /* Credit Counter of Free Credit Message with Error */
108 #define RMIXL_MSG_STS1_CCFCME_SHIFT 23
109 #define RMIXL_MSG_STS1_SIDFCME __BITS(22,16) /* Source ID of Free Credit Message with Error */
110 #define RMIXL_MSG_STS1_SIDFCME_SHIFT 16
111 #define RMIXL_MSG_STS1_T __BIT(15) /* Invalid Target Error */
112 #define RMIXL_MSG_STS1_F __BIT(14) /* Receive Queue "Write When Full" Error */
113 #define RMIXL_MSG_STS1_SIDE __BITS(13,7) /* Source ID of incoming msg with Error */
114 #define RMIXL_MSG_STS1_SIDE_SHIFT 7
115 #define RMIXL_MSG_STS1_DIDE __BITS(6,0) /* Destination ID of the incoming message Message with Error */
116 #define RMIXL_MSG_STS1_DIDE_SHIFT 0
117 #define RMIXL_MSG_STS1_ERRS \
118 (RMIXL_MSG_STS1_C|RMIXL_MSG_STS1_T|RMIXL_MSG_STS1_F)
119
120 /*
121 * MsgConfig: RMIXL_COP_2_MSG_CFG (CP2 Reg 3, Select 0) bits
122 */
123 #define RMIXL_MSG_CFG0_WM __BITS(31,24) /* Watermark level */
124 #define RMIXL_MSG_CFG0_WMSHIFT 24
125 #define RMIXL_MSG_CFG0_RESa __BITS(23,22)
126 #define RMIXL_MSG_CFG0_IV __BITS(21,16) /* Interrupt Vector */
127 #define RMIXL_MSG_CFG0_IV_SHIFT 16
128 #define RMIXL_MSG_CFG0_RESb __BITS(15,12)
129 #define RMIXL_MSG_CFG0_ITM __BITS(11,8) /* Interrupt Thread Mask */
130 #define RMIXL_MSG_CFG0_ITM_SHIFT 8
131 #define RMIXL_MSG_CFG0_RESc __BITS(7,2)
132 #define RMIXL_MSG_CFG0_WIE __BIT(1) /* Watermark Interrupt Enable */
133 #define RMIXL_MSG_CFG0_EIE __BIT(0) /* Receive Queue Not Empty Enable */
134 #define RMIXL_MSG_CFG0_RESV \
135 (RMIXL_MSG_CFG0_RESa|RMIXL_MSG_CFG0_RESb|RMIXL_MSG_CFG0_RESc)
136
137 /*
138 * MsgConfig1: RMIXL_COP_2_MSG_CFG (CP2 Reg 3, Select 1) bits
139 * Note: reg width is 64 bits in PRM reg description, but 32 bits in reg summary
140 */
141 #define RMIXL_MSG_CFG1_RESV __BITS(63,3)
142 #define RMIXL_MSG_CFG1_T __BIT(2) /* Trace Mode Enable */
143 #define RMIXL_MSG_CFG1_C __BIT(1) /* Credit Over-run Interrupt Enable */
144 #define RMIXL_MSG_CFG1_M __BIT(0) /* Messaging Errors Interrupt Enable */
145
146
147 /*
148 * MsgBucketSize: RMIXL_COP_2_MSG_BSZ (CP2 Reg 4, Select [0..7]) bits
149 * Note: reg width is 64 bits in PRM reg description, but 32 bits in reg summary
150 * Size:
151 * - 0 means bucket disabled, else
152 * - must be power of 2
153 * - must be >=4
154 */
155 #define RMIXL_MSG_BSZ_RESV __BITS(63,8)
156 #define RMIXL_MSG_BSZ_SIZE __BITS(7,0)
157
158
159
160
161 /*
162 * RMIXL Processor Control Register addresses
163 * - Offset in bits 7..0
164 * - BlockID in bits 15..8
165 */
166 #define RMIXL_PCR_THREADEN 0x0000
167 #define RMIXL_PCR_SOFTWARE_SLEEP 0x0001
168 #define RMIXL_PCR_SCHEDULING 0x0002
169 #define RMIXL_PCR_SCHEDULING_COUNTERS 0x0003
170 #define RMIXL_PCR_BHRPM 0x0004
171 #define RMIXL_PCR_IFU_DEFEATURE 0x0006
172 #define RMIXL_PCR_ICU_DEFEATURE 0x0100
173 #define RMIXL_PCR_ICU_ERROR_LOGGING 0x0101
174 #define RMIXL_PCR_ICU_DEBUG_ACCESS_ADDR 0x0102
175 #define RMIXL_PCR_ICU_DEBUG_ACCESS_DATALO 0x0103
176 #define RMIXL_PCR_ICU_DEBUG_ACCESS_DATAHI 0x0104
177 #define RMIXL_PCR_ICU_SAMPLING_LFSR 0x0105
178 #define RMIXL_PCR_ICU_SAMPLING_PC 0x0106
179 #define RMIXL_PCR_ICU_SAMPLING_SETUP 0x0107
180 #define RMIXL_PCR_ICU_SAMPLING_TIMER 0x0108
181 #define RMIXL_PCR_ICU_SAMPLING_PC_UPPER 0x0109
182 #define RMIXL_PCR_IEU_DEFEATURE 0x0200
183 #define RMIXL_PCR_TARGET_PC_REGISTER 0x0207
184 #define RMIXL_PCR_L1D_CONFIG0 0x0300
185 #define RMIXL_PCR_L1D_CONFIG1 0x0301
186 #define RMIXL_PCR_L1D_CONFIG2 0x0302
187 #define RMIXL_PCR_L1D_CONFIG3 0x0303
188 #define RMIXL_PCR_L1D_CONFIG4 0x0304
189 #define RMIXL_PCR_L1D_STATUS 0x0305
190 #define RMIXL_PCR_L1D_DEFEATURE 0x0306
191 #define RMIXL_PCR_L1D_DEBUG0 0x0307
192 #define RMIXL_PCR_L1D_DEBUG1 0x0308
193 #define RMIXL_PCR_L1D_CACHE_ERROR_LOG 0x0309
194 #define RMIXL_PCR_L1D_CACHE_ERROR_OVF_LO 0x030A
195 #define RMIXL_PCR_L1D_CACHE_INTERRUPT 0x030B
196 #define RMIXL_PCR_MMU_SETUP 0x0400
197 #define RMIXL_PCR_PRF_SMP_EVENT 0x0500
198 #define RMIXL_PCR_RF_SMP_RPLY_BUF 0x0501
199
200 /* PCR bit defines TBD */
201
202
203 /*
204 * Memory Distributed Interconnect (MDI) System Memory Map
205 */
206 #define RMIXL_PHYSADDR_MAX 0xffffffffffLL /* 1TB Physical Address space */
207 #define RMIXL_IO_DEV_PBASE 0x1ef00000 /* default phys. from XL[RS]_IO_BAR */
208 #define RMIXL_IO_DEV_VBASE MIPS_PHYS_TO_KSEG1(RMIXL_IO_DEV_PBASE)
209 /* default virtual base address */
210 #define RMIXL_IO_DEV_SIZE 0x100000 /* I/O Conf. space is 1MB region */
211
212
213
214 /*
215 * Peripheral and I/O Configuration Region of Memory
216 *
217 * These are relocatable; we run using the reset value defaults,
218 * and we expect to inherit those intact from the boot firmware.
219 *
220 * Many of these overlap between XLR and XLS, exceptions are ifdef'ed.
221 *
222 * Device region offsets are relative to RMIXL_IO_DEV_PBASE.
223 */
224 #define RMIXL_IO_DEV_BRIDGE 0x00000 /* System Bridge Controller (SBC) */
225 #define RMIXL_IO_DEV_DDR_CHNA 0x01000 /* DDR1/DDR2 DRAM_A Channel, Port MA */
226 #define RMIXL_IO_DEV_DDR_CHNB 0x02000 /* DDR1/DDR2 DRAM_B Channel, Port MB */
227 #define RMIXL_IO_DEV_DDR_CHNC 0x03000 /* DDR1/DDR2 DRAM_C Channel, Port MC */
228 #define RMIXL_IO_DEV_DDR_CHND 0x04000 /* DDR1/DDR2 DRAM_D Channel, Port MD */
229 #if defined(MIPS64_XLR)
230 #define RMIXL_IO_DEV_SRAM 0x07000 /* SRAM Controller, Port SA */
231 #endif /* MIPS64_XLR */
232 #define RMIXL_IO_DEV_PIC 0x08000 /* Programmable Interrupt Controller */
233 #if defined(MIPS64_XLR)
234 #define RMIXL_IO_DEV_PCIX 0x09000 /* PCI-X */
235 #define RMIXL_IO_DEV_PCIX_EL \
236 RMIXL_IO_DEV_PCIX /* PXI-X little endian */
237 #define RMIXL_IO_DEV_PCIX_EB \
238 (RMIXL_IO_DEV_PCIX | __BIT(11)) /* PXI-X big endian */
239 #define RMIXL_IO_DEV_HT 0x0a000 /* HyperTransport */
240 #endif /* MIPS64_XLR */
241 #define RMIXL_IO_DEV_SAE 0x0b000 /* Security Acceleration Engine */
242 #if defined(MIPS64_XLS)
243 #define XAUI_INTERFACE_0 0x0c000 /* XAUI Interface_0 */
244 /* when SGMII Interface_[0-3] are not used */
245 #define RMIXL_IO_DEV_GMAC_0 0x0c000 /* SGMII-Interface_0, Port SGMII0 */
246 #define RMIXL_IO_DEV_GMAC_1 0x0d000 /* SGMII-Interface_1, Port SGMII1 */
247 #define RMIXL_IO_DEV_GMAC_2 0x0e000 /* SGMII-Interface_2, Port SGMII2 */
248 #define RMIXL_IO_DEV_GMAC_3 0x0f000 /* SGMII-Interface_3, Port SGMII3 */
249 #endif /* MIPS64_XLS */
250 #if defined(MIPS64_XLR)
251 #define RMIXL_IO_DEV_GMAC_A 0x0c000 /* RGMII-Interface_0, Port RA */
252 #define RMIXL_IO_DEV_GMAC_B 0x0d000 /* RGMII-Interface_1, Port RB */
253 #define RMIXL_IO_DEV_GMAC_C 0x0e000 /* RGMII-Interface_2, Port RC */
254 #define RMIXL_IO_DEV_GMAC_D 0x0f000 /* RGMII-Interface_3, Port RD */
255 #define RMIXL_IO_DEV_SPI4_A 0x10000 /* SPI-4.2-Interface_A, Port XA */
256 #define RMIXL_IO_DEV_XGMAC_A 0x11000 /* XGMII-Interface_A, Port XA */
257 #define RMIXL_IO_DEV_SPI4_B 0x12000 /* SPI-4.2-Interface_B, Port XB */
258 #define RMIXL_IO_DEV_XGMAC_B 0x13000 /* XGMII-Interface_B, Port XB */
259 #endif /* MIPS64_XLR */
260 #define RMIXL_IO_DEV_UART_1 0x14000 /* UART_1 (16550 w/ ax4 addrs) */
261 #define RMIXL_IO_DEV_UART_2 0x15000 /* UART_2 (16550 w/ ax4 addrs) */
262 #define RMIXL_IO_DEV_I2C_1 0x16000 /* I2C_1 */
263 #define RMIXL_IO_DEV_I2C_2 0x17000 /* I2C_2 */
264 #define RMIXL_IO_DEV_GPIO 0x18000 /* GPIO */
265 #define RMIXL_IO_DEV_FLASH 0x19000 /* Flash ROM */
266 #define RMIXL_IO_DEV_DMA 0x1a000 /* DMA */
267 #define RMIXL_IO_DEV_L2 0x1b000 /* L2 Cache */
268 #define RMIXL_IO_DEV_TB 0x1c000 /* Trace Buffer */
269 #if defined(MIPS64_XLS)
270 #define RMIXL_IO_DEV_CDE 0x1d000 /* Compression/Decompression Engine */
271 #define RMIXL_IO_DEV_PCIE_BE 0x1e000 /* PCI-Express_BE */
272 #define RMIXL_IO_DEV_PCIE_LE 0x1f000 /* PCI-Express_LE */
273 #define RMIXL_IO_DEV_SRIO_BE 0x1e000 /* SRIO_BE */
274 #define RMIXL_IO_DEV_SRIO_LE 0x1f000 /* SRIO_LE */
275 #define RMIXL_IO_DEV_XAUI_1 0x20000 /* XAUI Interface_1 */
276 /* when SGMII Interface_[4-7] are not used */
277 #define RMIXL_IO_DEV_GMAC_4 0x20000 /* SGMII-Interface_4, Port SGMII4 */
278 #define RMIXL_IO_DEV_GMAC_5 0x21000 /* SGMII-Interface_5, Port SGMII5 */
279 #define RMIXL_IO_DEV_GMAC_6 0x22000 /* SGMII-Interface_6, Port SGMII6 */
280 #define RMIXL_IO_DEV_GMAC_7 0x23000 /* SGMII-Interface_7, Port SGMII7 */
281 #define RMIXL_IO_DEV_USB_A 0x24000 /* USB Interface Low Address Space */
282 #define RMIXL_IO_DEV_USB_B 0x25000 /* USB Interface High Address Space */
283 #endif /* MIPS64_XLS */
284
285
286 /*
287 * the Programming Reference Manual
288 * lists "Reg ID" values not offsets;
289 * offset = id * 4
290 */
291 #define _RMIXL_OFFSET(id) ((id) * 4)
292
293
294 /*
295 * System Bridge Controller registers
296 * offsets are relative to RMIXL_IO_DEV_BRIDGE
297 */
298 #define RMIXL_SBC_DRAM_NBARS 8
299 #define RMIXL_SBC_DRAM_BAR(n) _RMIXL_OFFSET(0x000 + (n))
300 /* DRAM Region Base Address Regs[0-7] */
301 #define RMIXL_SBC_DRAM_CHNAC_DTR(n) _RMIXL_OFFSET(0x008 + (n))
302 /* DRAM Region Channels A,C Address Translation Regs[0-7] */
303 #define RMIXL_SBC_DRAM_CHNBD_DTR(n) _RMIXL_OFFSET(0x010 + (n))
304 /* DRAM Region Channels B,D Address Translation Regs[0-7] */
305 #define RMIXL_SBC_DRAM_BRIDGE_CFG _RMIXL_OFFSET(0x18) /* SBC DRAM config reg */
306 #if defined(MIPS64_XLR)
307 #define RMIXLR_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */
308 #define RMIXLR_SBC_FLASH_BAR _RMIXL_OFFSET(0x1a) /* Flash Memory Base Addr reg */
309 #define RMIXLR_SBC_SRAM_BAR _RMIXL_OFFSET(0x1b) /* SRAM Base Addr reg */
310 #define RMIXLR_SBC_HTMEM_BAR _RMIXL_OFFSET(0x1c) /* HyperTransport Mem Base Addr reg */
311 #define RMIXLR_SBC_HTINT_BAR _RMIXL_OFFSET(0x1d) /* HyperTransport Interrupt Base Addr reg */
312 #define RMIXLR_SBC_HTPIC_BAR _RMIXL_OFFSET(0x1e) /* HyperTransport Legacy PIC Base Addr reg */
313 #define RMIXLR_SBC_HTSM_BAR _RMIXL_OFFSET(0x1f) /* HyperTransport System Management Base Addr reg */
314 #define RMIXLR_SBC_HTIO_BAR _RMIXL_OFFSET(0x20) /* HyperTransport IO Base Addr reg */
315 #define RMIXLR_SBC_HTCFG_BAR _RMIXL_OFFSET(0x21) /* HyperTransport Configuration Base Addr reg */
316 #define RMIXLR_SBC_PCIX_CFG_BAR _RMIXL_OFFSET(0x22) /* PCI-X Configuration Base Addr reg */
317 #define RMIXLR_SBC_PCIX_MEM_BAR _RMIXL_OFFSET(0x23) /* PCI-X Mem Base Addr reg */
318 #define RMIXLR_SBC_PCIX_IO_BAR _RMIXL_OFFSET(0x24) /* PCI-X IO Base Addr reg */
319 #define RMIXLR_SBC_SYS2IO_CREDITS _RMIXL_OFFSET(0x35) /* System Bridge I/O Transaction Credits register */
320 #endif /* MIPS64_XLR */
321 #if defined(MIPS64_XLS)
322 #define RMIXLS_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */
323 #define RMIXLS_SBC_FLASH_BAR _RMIXL_OFFSET(0x20) /* Flash Memory Base Addr reg */
324 #define RMIXLS_SBC_PCIE_CFG_BAR _RMIXL_OFFSET(0x40) /* PCI Configuration BAR */
325 #define RMIXLS_SBC_PCIE_ECFG_BAR _RMIXL_OFFSET(0x41) /* PCI Extended Configuration BAR */
326 #define RMIXLS_SBC_PCIE_MEM_BAR _RMIXL_OFFSET(0x42) /* PCI Memory region BAR */
327 #define RMIXLS_SBC_PCIE_IO_BAR _RMIXL_OFFSET(0x43) /* PCI IO region BAR */
328 #endif /* MIPS64_XLS */
329
330 /*
331 * Address Error registers
332 * offsets are relative to RMIXL_IO_DEV_BRIDGE
333 */
334 #define RMIXL_ADDR_ERR_DEVICE_MASK _RMIXL_OFFSET(0x25) /* Address Error Device Mask */
335 #define RMIXL_ADDR_ERR_DEVICE_MASK_2 _RMIXL_OFFSET(0x44) /* extension of Device Mask */
336 #define RMIXL_ADDR_ERR_AERR0_LOG1 _RMIXL_OFFSET(0x26) /* Address Error Set 0 Log 1 */
337 #define RMIXL_ADDR_ERR_AERR0_LOG2 _RMIXL_OFFSET(0x27) /* Address Error Set 0 Log 2 */
338 #define RMIXL_ADDR_ERR_AERR0_LOG3 _RMIXL_OFFSET(0x28) /* Address Error Set 0 Log 3 */
339 #define RMIXL_ADDR_ERR_AERR0_DEVSTAT _RMIXL_OFFSET(0x29) /* Address Error Set 0 irpt status */
340 #define RMIXL_ADDR_ERR_AERR1_LOG1 _RMIXL_OFFSET(0x2a) /* Address Error Set 1 Log 1 */
341 #define RMIXL_ADDR_ERR_AERR1_LOG2 _RMIXL_OFFSET(0x2b) /* Address Error Set 1 Log 2 */
342 #define RMIXL_ADDR_ERR_AERR1_LOG3 _RMIXL_OFFSET(0x2c) /* Address Error Set 1 Log 3 */
343 #define RMIXL_ADDR_ERR_AERR1_DEVSTAT _RMIXL_OFFSET(0x2d) /* Address Error Set 1 irpt status */
344 #define RMIXL_ADDR_ERR_AERR0_EN _RMIXL_OFFSET(0x2e) /* Address Error Set 0 irpt enable */
345 #define RMIXL_ADDR_ERR_AERR0_UPG _RMIXL_OFFSET(0x2f) /* Address Error Set 0 Upgrade */
346 #define RMIXL_ADDR_ERR_AERR0_CLEAR _RMIXL_OFFSET(0x30) /* Address Error Set 0 irpt clear */
347 #define RMIXL_ADDR_ERR_AERR1_CLEAR _RMIXL_OFFSET(0x31) /* Address Error Set 1 irpt clear */
348 #define RMIXL_ADDR_ERR_SBE_COUNTS _RMIXL_OFFSET(0x32) /* Single Bit Error Counts */
349 #define RMIXL_ADDR_ERR_DBE_COUNTS _RMIXL_OFFSET(0x33) /* Double Bit Error Counts */
350 #define RMIXL_ADDR_ERR_BITERR_INT_EN _RMIXL_OFFSET(0x33) /* Bit Error intr enable */
351
352 /*
353 * RMIXL_SBC_DRAM_BAR bit defines
354 */
355 #define RMIXL_DRAM_BAR_BASE_ADDR __BITS(31,16) /* bits 39:24 of Base Address */
356 #define DRAM_BAR_TO_BASE(r) \
357 (((r) & RMIXL_DRAM_BAR_BASE_ADDR) << (24 - 16))
358 #define RMIXL_DRAM_BAR_ADDR_MASK __BITS(15,4) /* bits 35:24 of Address Mask */
359 #define DRAM_BAR_TO_SIZE(r) \
360 ((((r) & RMIXL_DRAM_BAR_ADDR_MASK) + __BIT(4)) << (24 - 4))
361 #define RMIXL_DRAM_BAR_INTERLEAVE __BITS(3,1) /* Interleave Mode */
362 #define RMIXL_DRAM_BAR_STATUS __BIT(0) /* 1='region enabled' */
363
364 /*
365 * RMIXL_SBC_DRAM_CHNAC_DTR and
366 * RMIXL_SBC_DRAM_CHNBD_DTR bit defines
367 * insert 'divisions' (0, 1 or 2) bits
368 * of value 'partition'
369 * at 'position' bit location.
370 */
371 #define RMIXL_DRAM_DTR_RESa __BITS(31,14)
372 #define RMIXL_DRAM_DTR_PARTITION __BITS(13,12)
373 #define RMIXL_DRAM_DTR_RESb __BITS(11,10)
374 #define RMIXL_DRAM_DTR_DIVISIONS __BITS(9,8)
375 #define RMIXL_DRAM_DTR_RESc __BITS(7,6)
376 #define RMIXL_DRAM_DTR_POSITION __BITS(5,0)
377 #define RMIXL_DRAM_DTR_RESV \
378 (RMIXL_DRAM_DTR_RESa|RMIXL_DRAM_DTR_RESb|RMIXL_DRAM_DTR_RESc)
379
380 /*
381 * RMIXL_SBC_DRAM_BRIDGE_CFG bit defines
382 */
383 #define RMIXL_DRAM_CFG_RESa __BITS(31,13)
384 #define RMIXL_DRAM_CFG_CHANNEL_MODE __BIT(12)
385 #define RMIXL_DRAM_CFG_RESb __BIT(11)
386 #define RMIXL_DRAM_CFG_INTERLEAVE_MODE __BITS(10,8)
387 #define RMIXL_DRAM_CFG_RESc __BITS(7,5)
388 #define RMIXL_DRAM_CFG_BUS_MODE __BIT(4)
389 #define RMIXL_DRAM_CFG_RESd __BITS(3,2)
390 #define RMIXL_DRAM_CFG_DRAM_MODE __BITS(1,0) /* 1=DDR2 */
391
392 /*
393 * RMIXL_SBC_XLR_PCIX_CFG_BAR bit defines
394 */
395 #define RMIXL_PCIX_CFG_BAR_BASE __BITS(31,17) /* phys address bits 39:25 */
396 #define RMIXL_PCIX_CFG_BAR_BA_SHIFT (25 - 17)
397 #define RMIXL_PCIX_CFG_BAR_TO_BA(r) \
398 (((r) & RMIXL_PCIX_CFG_BAR_BASE) << RMIXL_PCIX_CFG_BAR_BA_SHIFT)
399 #define RMIXL_PCIX_CFG_BAR_RESV __BITS(16,1) /* (reserved) */
400 #define RMIXL_PCIX_CFG_BAR_ENB __BIT(0) /* 1=Enable */
401 #define RMIXL_PCIX_CFG_SIZE __BIT(25)
402 #define RMIXL_PCIX_CFG_BAR(ba, en) \
403 ((uint32_t)(((ba) >> (25 - 17)) | ((en) ? RMIXL_PCIX_CFG_BAR_ENB : 0)))
404
405 /*
406 * RMIXLR_SBC_PCIX_MEM_BAR bit defines
407 */
408 #define RMIXL_PCIX_MEM_BAR_BASE __BITS(31,16) /* phys address bits 39:24 */
409 #define RMIXL_PCIX_MEM_BAR_TO_BA(r) \
410 (((r) & RMIXL_PCIX_MEM_BAR_BASE) << (24 - 16))
411 #define RMIXL_PCIX_MEM_BAR_MASK __BITS(15,1) /* phys address mask bits 38:24 */
412 #define RMIXL_PCIX_MEM_BAR_TO_SIZE(r) \
413 ((((r) & RMIXL_PCIX_MEM_BAR_MASK) + 2) << (24 - 1))
414 #define RMIXL_PCIX_MEM_BAR_ENB __BIT(0) /* 1=Enable */
415 #define RMIXL_PCIX_MEM_BAR(ba, en) \
416 ((uint32_t)(((ba) >> (24 - 16)) | ((en) ? RMIXL_PCIX_MEM_BAR_ENB : 0)))
417
418 /*
419 * RMIXLR_SBC_PCIX_IO_BAR bit defines
420 */
421 #define RMIXL_PCIX_IO_BAR_BASE __BITS(31,18) /* phys address bits 39:26 */
422 #define RMIXL_PCIX_IO_BAR_TO_BA(r) \
423 (((r) & RMIXL_PCIX_IO_BAR_BASE) << (26 - 18))
424 #define RMIXL_PCIX_IO_BAR_RESV __BITS(17,7) /* (reserve) */
425 #define RMIXL_PCIX_IO_BAR_MASK __BITS(6,1) /* phys address mask bits 31:26 */
426 #define RMIXL_PCIX_IO_BAR_TO_SIZE(r) \
427 ((((r) & RMIXL_PCIX_IO_BAR_MASK) + 2) << (26 - 1))
428 #define RMIXL_PCIX_IO_BAR_ENB __BIT(0) /* 1=Enable */
429 #define RMIXL_PCIX_IO_BAR(ba, en) \
430 ((uint32_t)(((ba) >> (26 - 18)) | ((en) ? RMIXL_PCIX_IO_BAR_ENB : 0)))
431
432
433 /*
434 * RMIXLS_SBC_PCIE_CFG_BAR bit defines
435 */
436 #define RMIXL_PCIE_CFG_BAR_BASE __BITS(31,17) /* phys address bits 39:25 */
437 #define RMIXL_PCIE_CFG_BAR_BA_SHIFT (25 - 17)
438 #define RMIXL_PCIE_CFG_BAR_TO_BA(r) \
439 (((r) & RMIXL_PCIE_CFG_BAR_BASE) << RMIXL_PCIE_CFG_BAR_BA_SHIFT)
440 #define RMIXL_PCIE_CFG_BAR_RESV __BITS(16,1) /* (reserved) */
441 #define RMIXL_PCIE_CFG_BAR_ENB __BIT(0) /* 1=Enable */
442 #define RMIXL_PCIE_CFG_SIZE __BIT(25)
443 #define RMIXL_PCIE_CFG_BAR(ba, en) \
444 ((uint32_t)(((ba) >> (25 - 17)) | ((en) ? RMIXL_PCIE_CFG_BAR_ENB : 0)))
445
446 /*
447 * RMIXLS_SBC_PCIE_ECFG_BAR bit defines
448 * (PCIe extended config space)
449 */
450 #define RMIXL_PCIE_ECFG_BAR_BASE __BITS(31,21) /* phys address bits 39:29 */
451 #define RMIXL_PCIE_ECFG_BAR_BA_SHIFT (29 - 21)
452 #define RMIXL_PCIE_ECFG_BAR_TO_BA(r) \
453 (((r) & RMIXL_PCIE_ECFG_BAR_BASE) << RMIXL_PCIE_ECFG_BAR_BA_SHIFT)
454 #define RMIXL_PCIE_ECFG_BAR_RESV __BITS(20,1) /* (reserved) */
455 #define RMIXL_PCIE_ECFG_BAR_ENB __BIT(0) /* 1=Enable */
456 #define RMIXL_PCIE_ECFG_SIZE __BIT(29)
457 #define RMIXL_PCIE_ECFG_BAR(ba, en) \
458 ((uint32_t)(((ba) >> (29 - 21)) | ((en) ? RMIXL_PCIE_ECFG_BAR_ENB : 0)))
459
460 /*
461 * RMIXLS_SBC_PCIE_MEM_BAR bit defines
462 */
463 #define RMIXL_PCIE_MEM_BAR_BASE __BITS(31,16) /* phys address bits 39:24 */
464 #define RMIXL_PCIE_MEM_BAR_TO_BA(r) \
465 (((r) & RMIXL_PCIE_MEM_BAR_BASE) << (24 - 16))
466 #define RMIXL_PCIE_MEM_BAR_MASK __BITS(15,1) /* phys address mask bits 38:24 */
467 #define RMIXL_PCIE_MEM_BAR_TO_SIZE(r) \
468 ((((r) & RMIXL_PCIE_MEM_BAR_MASK) + 2) << (24 - 1))
469 #define RMIXL_PCIE_MEM_BAR_ENB __BIT(0) /* 1=Enable */
470 #define RMIXL_PCIE_MEM_BAR(ba, en) \
471 ((uint32_t)(((ba) >> (24 - 16)) | ((en) ? RMIXL_PCIE_MEM_BAR_ENB : 0)))
472
473 /*
474 * RMIXLS_SBC_PCIE_IO_BAR bit defines
475 */
476 #define RMIXL_PCIE_IO_BAR_BASE __BITS(31,18) /* phys address bits 39:26 */
477 #define RMIXL_PCIE_IO_BAR_TO_BA(r) \
478 (((r) & RMIXL_PCIE_IO_BAR_BASE) << (26 - 18))
479 #define RMIXL_PCIE_IO_BAR_RESV __BITS(17,7) /* (reserve) */
480 #define RMIXL_PCIE_IO_BAR_MASK __BITS(6,1) /* phys address mask bits 31:26 */
481 #define RMIXL_PCIE_IO_BAR_TO_SIZE(r) \
482 ((((r) & RMIXL_PCIE_IO_BAR_MASK) + 2) << (26 - 1))
483 #define RMIXL_PCIE_IO_BAR_ENB __BIT(0) /* 1=Enable */
484 #define RMIXL_PCIE_IO_BAR(ba, en) \
485 ((uint32_t)(((ba) >> (26 - 18)) | ((en) ? RMIXL_PCIE_IO_BAR_ENB : 0)))
486
487
488 /*
489 * Programmable Interrupt Controller registers
490 * the Programming Reference Manual table 10.4
491 * lists "Reg ID" values not offsets
492 * Offsets are relative to RMIXL_IO_DEV_BRIDGE
493 */
494 #define RMIXL_PIC_CONTROL _RMIXL_OFFSET(0x0)
495 #define RMIXL_PIC_IPIBASE _RMIXL_OFFSET(0x4)
496 #define RMIXL_PIC_INTRACK _RMIXL_OFFSET(0x6)
497 #define RMIXL_PIC_WATCHdOGMAXVALUE0 _RMIXL_OFFSET(0x8)
498 #define RMIXL_PIC_WATCHDOGMAXVALUE1 _RMIXL_OFFSET(0x9)
499 #define RMIXL_PIC_WATCHDOGMASK0 _RMIXL_OFFSET(0xa)
500 #define RMIXL_PIC_WATCHDOGMASK1 _RMIXL_OFFSET(0xb)
501 #define RMIXL_PIC_WATCHDOGHEARTBEAT0 _RMIXL_OFFSET(0xc)
502 #define RMIXL_PIC_WATCHDOGHEARTBEAT1 _RMIXL_OFFSET(0xd)
503 #define RMIXL_PIC_IRTENTRYC0(n) _RMIXL_OFFSET(0x40 + (n)) /* 0<=n<=31 */
504 #define RMIXL_PIC_IRTENTRYC1(n) _RMIXL_OFFSET(0x80 + (n)) /* 0<=n<=31 */
505 #define RMIXL_PIC_SYSTMRMAXVALC0(n) _RMIXL_OFFSET(0x100 + (n)) /* 0<=n<=7 */
506 #define RMIXL_PIC_SYSTMRMAXVALC1(n) _RMIXL_OFFSET(0x110 + (n)) /* 0<=n<=7 */
507 #define RMIXL_PIC_SYSTMRC0(n) _RMIXL_OFFSET(0x120 + (n)) /* 0<=n<=7 */
508 #define RMIXL_PIC_SYSTMRC1(n) _RMIXL_OFFSET(0x130 + (n)) /* 0<=n<=7 */
509
510 /*
511 * RMIXL_PIC_CONTROL bits
512 */
513 #define RMIXL_PIC_CONTROL_WATCHDOG_ENB __BIT(0)
514 #define RMIXL_PIC_CONTROL_GEN_NMI __BITS(2,1) /* do NMI after n WDog irpts */
515 #define RMIXL_PIC_CONTROL_GEN_NMIn(n) (((n) << 1) & RMIXL_PIC_CONTROL_GEN_NMI)
516 #define RMIXL_PIC_CONTROL_RESa __BITS(7,3)
517 #define RMIXL_PIC_CONTROL_TIMER_ENB __BITS(15,8) /* per-Timer enable bits */
518 #define RMIXL_PIC_CONTROL_TIMER_ENBn(n) ((1 << (8 + (n))) & RMIXL_PIC_CONTROL_TIMER_ENB)
519 #define RMIXL_PIC_CONTROL_RESb __BITS(31,16)
520 #define RMIXL_PIC_CONTROL_RESV \
521 (RMIXL_PIC_CONTROL_RESa|RMIXL_PIC_CONTROL_RESb)
522
523 /*
524 * RMIXL_PIC_IPIBASE bits
525 */
526 #define RMIXL_PIC_IPIBASE_VECTORNUM __BITS(5,0)
527 #define RMIXL_PIC_IPIBASE_RESa __BIT(6) /* undocumented bit */
528 #define RMIXL_PIC_IPIBASE_BCAST __BIT(7)
529 #define RMIXL_PIC_IPIBASE_NMI __BIT(8)
530 #define RMIXL_PIC_IPIBASE_ID __BITS(31,16)
531 #define RMIXL_PIC_IPIBASE_ID_RESb __BITS(31,23)
532 #define RMIXL_PIC_IPIBASE_ID_CORE __BITS(22,20) /* Physical CPU ID */
533 #define RMIXL_PIC_IPIBASE_ID_CORE_SHIFT 20
534 #define RMIXL_PIC_IPIBASE_ID_RESc __BITS(19,18)
535 #define RMIXL_PIC_IPIBASE_ID_THREAD __BITS(17,16) /* Thread ID */
536 #define RMIXL_PIC_IPIBASE_ID_THREAD_SHIFT 16
537 #define RMIXL_PIC_IPIBASE_ID_RESV \
538 (RMIXL_PIC_IPIBASE_ID_RESa|RMIXL_PIC_IPIBASE_ID_RESb \
539 |RMIXL_PIC_IPIBASE_ID_RESc)
540
541 /*
542 * RMIXL_PIC_IRTENTRYC0 bits
543 * IRT Entry low word
544 */
545 #define RMIXL_PIC_IRTENTRYC0_TMASK __BITS(7,0) /* Thread Mask */
546 #define RMIXL_PIC_IRTENTRYC0_RESa __BITS(3,2) /* write as 0 */
547 #define RMIXL_PIC_IRTENTRYC0_RESb __BITS(31,8) /* write as 0 */
548 #define RMIXL_PIC_IRTENTRYC0_RESV \
549 (RMIXL_PIC_IRTENTRYC0_RESa | RMIXL_PIC_IRTENTRYC0_RESb)
550
551 /*
552 * RMIXL_PIC_IRTENTRYC1 bits
553 * IRT Entry high word
554 */
555 #define RMIXL_PIC_IRTENTRYC1_INTVEC __BITS(5,0) /* maps to bit# in CPU's EIRR */
556 #define RMIXL_PIC_IRTENTRYC1_GL __BIT(6) /* 0=Global; 1=Local */
557 #define RMIXL_PIC_IRTENTRYC1_NMI __BIT(7) /* 0=Maskable; 1=NMI */
558 #define RMIXL_PIC_IRTENTRYC1_RESV __BITS(28,8)
559 #define RMIXL_PIC_IRTENTRYC1_P __BIT(29) /* 0=Rising/High; 1=Falling/Low */
560 #define RMIXL_PIC_IRTENTRYC1_TRG __BIT(30) /* 0=Edge; 1=Level */
561 #define RMIXL_PIC_IRTENTRYC1_VALID __BIT(31) /* 0=Invalid; 1=Valid IRT Entry */
562
563
564 /*
565 * GPIO Controller registers
566 */
567
568 /* GPIO Signal Registers */
569 #define RMIXL_GPIO_INT_ENB _RMIXL_OFFSET(0x0) /* Interrupt Enable register */
570 #define RMIXL_GPIO_INT_INV _RMIXL_OFFSET(0x1) /* Interrupt Inversion register */
571 #define RMIXL_GPIO_IO_DIR _RMIXL_OFFSET(0x2) /* I/O Direction register */
572 #define RMIXL_GPIO_OUTPUT _RMIXL_OFFSET(0x3) /* Output Write register */
573 #define RMIXL_GPIO_INPUT _RMIXL_OFFSET(0x4) /* Intput Read register */
574 #define RMIXL_GPIO_INT_CLR _RMIXL_OFFSET(0x5) /* Interrupt Inversion register */
575 #define RMIXL_GPIO_INT_STS _RMIXL_OFFSET(0x6) /* Interrupt Status register */
576 #define RMIXL_GPIO_INT_TYP _RMIXL_OFFSET(0x7) /* Interrupt Type register */
577 #define RMIXL_GPIO_RESET _RMIXL_OFFSET(0x8) /* XLS Soft Reset register */
578
579 /*
580 * RMIXL_GPIO_RESET bits
581 */
582 #define RMIXL_GPIO_RESET_RESV __BITS(31,1)
583 #define RMIXL_GPIO_RESET_RESET __BIT(0)
584
585
586 /* GPIO System Control Registers */
587 #define RMIXL_GPIO_RESET_CFG _RMIXL_OFFSET(0x15) /* Reset Configuration register */
588 #define RMIXL_GPIO_THERMAL_CSR _RMIXL_OFFSET(0x16) /* Thermal Control/Status register */
589 #define RMIXL_GPIO_THERMAL_SHFT _RMIXL_OFFSET(0x17) /* Thermal Shift register */
590 #define RMIXL_GPIO_BIST_ALL_STS _RMIXL_OFFSET(0x18) /* BIST All Status register */
591 #define RMIXL_GPIO_BIST_EACH_STS _RMIXL_OFFSET(0x19) /* BIST Each Status register */
592 #define RMIXL_GPIO_SGMII_0_3_PHY_CTL _RMIXL_OFFSET(0x20) /* SGMII #0..3 PHY Control register */
593 #define RMIXL_GPIO_AUI_0_PHY_CTL _RMIXL_OFFSET(0x20) /* AUI port#0 PHY Control register */
594 #define RMIXL_GPIO_SGMII_4_7_PLL_CTL _RMIXL_OFFSET(0x21) /* SGMII #4..7 PLL Control register */
595 #define RMIXL_GPIO_AUI_1_PLL_CTL _RMIXL_OFFSET(0x21) /* AUI port#1 PLL Control register */
596 #define RMIXL_GPIO_SGMII_4_7_PHY_CTL _RMIXL_OFFSET(0x22) /* SGMII #4..7 PHY Control register */
597 #define RMIXL_GPIO_AUI_1_PHY_CTL _RMIXL_OFFSET(0x22) /* AUI port#1 PHY Control register */
598 #define RMIXL_GPIO_INT_MAP _RMIXL_OFFSET(0x25) /* Interrupt Map to PIC, 0=int14, 1=int30 */
599 #define RMIXL_GPIO_EXT_INT _RMIXL_OFFSET(0x26) /* External Interrupt control register */
600 #define RMIXL_GPIO_CPU_RST _RMIXL_OFFSET(0x28) /* CPU Reset control register */
601 #define RMIXL_GPIO_LOW_PWR_DIS _RMIXL_OFFSET(0x29) /* Low Power Dissipation register */
602 #define RMIXL_GPIO_RANDOM _RMIXL_OFFSET(0x2b) /* Low Power Dissipation register */
603 #define RMIXL_GPIO_CPU_CLK_DIS _RMIXL_OFFSET(0x2d) /* CPU Clock Disable register */
604
605 /*
606 * RMIXL_GPIO_RESET_CFG bits
607 */
608 #define RMIXL_GPIO_RESET_CFG_RESa __BITS(31,28)
609 #define RMIXL_GPIO_RESET_CFG_PCIE_SRIO_SEL __BITS(27,26) /* PCIe or SRIO Select:
610 * 00 = PCIe selected, SRIO not available
611 * 01 = SRIO selected, 1.25 Gbaud (1.0 Gbps)
612 * 10 = SRIO selected, 2.25 Gbaud (2.0 Gbps)
613 * 11 = SRIO selected, 3.125 Gbaud (2.5 Gbps)
614 */
615 #define RMIXL_GPIO_RESET_CFG_XAUI_PORT1_SEL __BIT(25) /* XAUI Port 1 Select:
616 * 0 = Disabled - Port is SGMII ports 4-7
617 * 1 = Enabled - Port is 4-lane XAUI Port 1
618 */
619 #define RMIXL_GPIO_RESET_CFG_XAUI_PORT0_SEL __BIT(24) /* XAUI Port 0 Select:
620 * 0 = Disabled - Port is SGMII ports 0-3
621 * 1 = Enabled - Port is 4-lane XAUI Port 0
622 */
623 #define RMIXL_GPIO_RESET_CFG_RESb __BIT(23)
624 #define RMIXL_GPIO_RESET_CFG_USB_DEV __BIT(22) /* USB Device:
625 * 0 = Device Mode
626 * 1 = Host Mode
627 */
628 #define RMIXL_GPIO_RESET_CFG_PCIE_CFG __BITS(21,20) /* PCIe or SRIO configuration */
629 #define RMIXL_GPIO_RESET_CFG_FLASH33_EN __BIT(19) /* Flash 33 MHZ Enable:
630 * 0 = 66.67 MHz
631 * 1 = 33.33 MHz
632 */
633 #define RMIXL_GPIO_RESET_CFG_BIST_DIAG_EN __BIT(18) /* BIST Diagnostics enable */
634 #define RMIXL_GPIO_RESET_CFG_BIST_RUN_EN __BIT(18) /* BIST Run enable */
635 #define RMIXL_GPIO_RESET_CFG_NOOT_NAND __BIT(16) /* Enable boot from NAND Flash */
636 #define RMIXL_GPIO_RESET_CFG_BOOT_PCMCIA __BIT(15) /* Enable boot from PCMCIA */
637 #define RMIXL_GPIO_RESET_CFG_FLASH_CFG __BIT(14) /* Flash 32-bit Data Configuration:
638 * 0 = 32-bit address / 16-bit data
639 * 1 = 32-bit address / 32-bit data
640 */
641 #define RMIXL_GPIO_RESET_CFG_PCMCIA_EN __BIT(13) /* PCMCIA Enable Status */
642 #define RMIXL_GPIO_RESET_CFG_PARITY_EN __BIT(12) /* Parity Enable Status */
643 #define RMIXL_GPIO_RESET_CFG_BIGEND __BIT(11) /* Big Endian Mode Enable Status */
644 #define RMIXL_GPIO_RESET_CFG_PLL1_OUT_DIV __BITS(10,8) /* PLL1 (Core PLL) Output Divider */
645 #define RMIXL_GPIO_RESET_CFG_PLL1_FB_DIV __BITS(7,0) /* PLL1 Feedback Divider */
646
647 /*
648 * RMIXL_GPIO_LOW_PWR_DIS bits
649 * except as noted, all bits are:
650 * 0 = feature enable (default)
651 * 1 = feature disable
652 */
653 /* XXX defines are for XLS6xx, XLS4xx-Lite and XLS4xx Devices */
654 #define RMIXL_GPIO_LOW_PWR_DIS_LP __BIT(0) /* Low Power disable */
655 #define RMIXL_GPIO_LOW_PWR_DIS_GMAC_QD_0 __BIT(1) /* GMAC Quad 0 (GMAC 0..3) disable */
656 #define RMIXL_GPIO_LOW_PWR_DIS_GMAC_QD_1 __BIT(2) /* GMAC Quad 1 (GMAC 4..7) disable */
657 #define RMIXL_GPIO_LOW_PWR_DIS_USB __BIT(3) /* USB disable */
658 #define RMIXL_GPIO_LOW_PWR_DIS_PCIE __BIT(4) /* PCIE disable */
659 #define RMIXL_GPIO_LOW_PWR_DIS_CDE __BIT(5) /* Compression/Decompression Engine disable */
660 #define RMIXL_GPIO_LOW_PWR_DIS_DMA __BIT(6) /* DMA Engine disable */
661 #define RMIXL_GPIO_LOW_PWR_DIS_SAE __BITS(8,7) /* Security Acceleration Engine disable:
662 * 00 = enable (default)
663 * 01 = reserved
664 * 10 = reserved
665 * 11 = disable
666 */
667 #define RMIXL_GPIO_LOW_PWR_DIS_RESV __BITS(31,9)
668
669
670 /*
671 * PCIE Interface Controller registers
672 */
673 #define RMIXL_PCIE_CTRL1 _RMIXL_OFFSET(0x0)
674 #define RMIXL_PCIE_CTRL2 _RMIXL_OFFSET(0x1)
675 #define RMIXL_PCIE_CTRL3 _RMIXL_OFFSET(0x2)
676 #define RMIXL_PCIE_CTRL4 _RMIXL_OFFSET(0x3)
677 #define RMIXL_PCIE_CTRL _RMIXL_OFFSET(0x4)
678 #define RMIXL_PCIE_IOBM_TIMER _RMIXL_OFFSET(0x5)
679 #define RMIXL_PCIE_MSI_CMD _RMIXL_OFFSET(0x6)
680 #define RMIXL_PCIE_MSI_RESP _RMIXL_OFFSET(0x7)
681 #define RMIXL_PCIE_DWC_CRTL5 _RMIXL_OFFSET(0x8) /* not on XLS408Lite, XLS404Lite */
682 #define RMIXL_PCIE_DWC_CRTL6 _RMIXL_OFFSET(0x9) /* not on XLS408Lite, XLS404Lite */
683 #define RMIXL_PCIE_IOBM_SWAP_MEM_BASE _RMIXL_OFFSET(0x10)
684 #define RMIXL_PCIE_IOBM_SWAP_MEM_LIMIT _RMIXL_OFFSET(0x11)
685 #define RMIXL_PCIE_IOBM_SWAP_IO_BASE _RMIXL_OFFSET(0x12)
686 #define RMIXL_PCIE_IOBM_SWAP_IO_LIMIT _RMIXL_OFFSET(0x13)
687 #define RMIXL_PCIE_TRGT_CHRNT_MEM_BASE _RMIXL_OFFSET(0x14)
688 #define RMIXL_PCIE_TRGT_CHRNT_MEM_LIMIT _RMIXL_OFFSET(0x15)
689 #define RMIXL_PCIE_TRGT_L2ALC_MEM_BASE _RMIXL_OFFSET(0x16)
690 #define RMIXL_PCIE_TRGT_L2ALC_MEM_LIMIT _RMIXL_OFFSET(0x17)
691 #define RMIXL_PCIE_TRGT_REX_MEM_BASE _RMIXL_OFFSET(0x18)
692 #define RMIXL_PCIE_TRGT_REX_MEM_LIMIT _RMIXL_OFFSET(0x19)
693 #define RMIXL_PCIE_EP_MEM_BASE _RMIXL_OFFSET(0x1a)
694 #define RMIXL_PCIE_EP_MEM_LIMIT _RMIXL_OFFSET(0x1b)
695 #define RMIXL_PCIE_EP_ADDR_MAP_ENTRY0 _RMIXL_OFFSET(0x1c)
696 #define RMIXL_PCIE_EP_ADDR_MAP_ENTRY1 _RMIXL_OFFSET(0x1d)
697 #define RMIXL_PCIE_EP_ADDR_MAP_ENTRY2 _RMIXL_OFFSET(0x1e)
698 #define RMIXL_PCIE_EP_ADDR_MAP_ENTRY3 _RMIXL_OFFSET(0x1f)
699 #define RMIXL_PCIE_LINK0_STATE _RMIXL_OFFSET(0x20)
700 #define RMIXL_PCIE_LINK1_STATE _RMIXL_OFFSET(0x21)
701 #define RMIXL_PCIE_IOBM_INT_STATUS _RMIXL_OFFSET(0x22)
702 #define RMIXL_PCIE_IOBM_INT_ENABLE _RMIXL_OFFSET(0x23)
703 #define RMIXL_PCIE_LINK0_MSI_STATUS _RMIXL_OFFSET(0x24)
704 #define RMIXL_PCIE_LINK1_MSI_STATUS _RMIXL_OFFSET(0x25)
705 #define RMIXL_PCIE_LINK0_MSI_ENABLE _RMIXL_OFFSET(0x26)
706 #define RMIXL_PCIE_LINK1_MSI_ENABLE _RMIXL_OFFSET(0x27)
707 #define RMIXL_PCIE_LINK0_INT_STATUS0 _RMIXL_OFFSET(0x28)
708 #define RMIXL_PCIE_LINK1_INT_STATUS0 _RMIXL_OFFSET(0x29)
709 #define RMIXL_PCIE_LINK0_INT_STATUS1 _RMIXL_OFFSET(0x2a)
710 #define RMIXL_PCIE_LINK1_INT_STATUS1 _RMIXL_OFFSET(0x2b)
711 #define RMIXL_PCIE_LINK0_INT_ENABLE0 _RMIXL_OFFSET(0x2c)
712 #define RMIXL_PCIE_LINK1_INT_ENABLE0 _RMIXL_OFFSET(0x2d)
713 #define RMIXL_PCIE_LINK0_INT_ENABLE1 _RMIXL_OFFSET(0x2e)
714 #define RMIXL_PCIE_LINK1_INT_ENABLE1 _RMIXL_OFFSET(0x2f)
715 #define RMIXL_PCIE_PHY_CR_CMD _RMIXL_OFFSET(0x30)
716 #define RMIXL_PCIE_PHY_CR_WR_DATA _RMIXL_OFFSET(0x31)
717 #define RMIXL_PCIE_PHY_CR_RESP _RMIXL_OFFSET(0x32)
718 #define RMIXL_PCIE_PHY_CR_RD_DATA _RMIXL_OFFSET(0x33)
719 #define RMIXL_PCIE_IOBM_ERR_CMD _RMIXL_OFFSET(0x34)
720 #define RMIXL_PCIE_IOBM_ERR_LOWER_ADDR _RMIXL_OFFSET(0x35)
721 #define RMIXL_PCIE_IOBM_ERR_UPPER_ADDR _RMIXL_OFFSET(0x36)
722 #define RMIXL_PCIE_IOBM_ERR_BE _RMIXL_OFFSET(0x37)
723 #define RMIXL_PCIE_LINK2_STATE _RMIXL_OFFSET(0x60) /* not on XLS408Lite, XLS404Lite */
724 #define RMIXL_PCIE_LINK3_STATE _RMIXL_OFFSET(0x61) /* not on XLS408Lite, XLS404Lite */
725 #define RMIXL_PCIE_LINK2_MSI_STATUS _RMIXL_OFFSET(0x64) /* not on XLS408Lite, XLS404Lite */
726 #define RMIXL_PCIE_LINK3_MSI_STATUS _RMIXL_OFFSET(0x65) /* not on XLS408Lite, XLS404Lite */
727 #define RMIXL_PCIE_LINK2_MSI_ENABLE _RMIXL_OFFSET(0x66) /* not on XLS408Lite, XLS404Lite */
728 #define RMIXL_PCIE_LINK3_MSI_ENABLE _RMIXL_OFFSET(0x67) /* not on XLS408Lite, XLS404Lite */
729 #define RMIXL_PCIE_LINK2_INT_STATUS0 _RMIXL_OFFSET(0x68) /* not on XLS408Lite, XLS404Lite */
730 #define RMIXL_PCIE_LINK3_INT_STATUS0 _RMIXL_OFFSET(0x69) /* not on XLS408Lite, XLS404Lite */
731 #define RMIXL_PCIE_LINK2_INT_STATUS1 _RMIXL_OFFSET(0x6a) /* not on XLS408Lite, XLS404Lite */
732 #define RMIXL_PCIE_LINK3_INT_STATUS1 _RMIXL_OFFSET(0x6b) /* not on XLS408Lite, XLS404Lite */
733 #define RMIXL_PCIE_LINK2_INT_ENABLE0 _RMIXL_OFFSET(0x6c) /* not on XLS408Lite, XLS404Lite */
734 #define RMIXL_PCIE_LINK3_INT_ENABLE0 _RMIXL_OFFSET(0x6d) /* not on XLS408Lite, XLS404Lite */
735 #define RMIXL_PCIE_LINK2_INT_ENABLE1 _RMIXL_OFFSET(0x6e) /* not on XLS408Lite, XLS404Lite */
736 #define RMIXL_PCIE_LINK3_INT_ENABLE1 _RMIXL_OFFSET(0x6f) /* not on XLS408Lite, XLS404Lite */
737 #define RMIXL_VC0_POSTED_RX_QUEUE_CTRL _RMIXL_OFFSET(0x1d2)
738 #define RMIXL_VC0_POSTED_BUFFER_DEPTH _RMIXL_OFFSET(0x1ea)
739 #define RMIXL_PCIE_MSG_TX_THRESHOLD _RMIXL_OFFSET(0x308)
740 #define RMIXL_PCIE_MSG_BUCKET_SIZE_0 _RMIXL_OFFSET(0x320)
741 #define RMIXL_PCIE_MSG_BUCKET_SIZE_1 _RMIXL_OFFSET(0x321)
742 #define RMIXL_PCIE_MSG_BUCKET_SIZE_2 _RMIXL_OFFSET(0x322)
743 #define RMIXL_PCIE_MSG_BUCKET_SIZE_3 _RMIXL_OFFSET(0x323)
744 #define RMIXL_PCIE_MSG_BUCKET_SIZE_4 _RMIXL_OFFSET(0x324) /* not on XLS408Lite, XLS404Lite */
745 #define RMIXL_PCIE_MSG_BUCKET_SIZE_5 _RMIXL_OFFSET(0x325) /* not on XLS408Lite, XLS404Lite */
746 #define RMIXL_PCIE_MSG_BUCKET_SIZE_6 _RMIXL_OFFSET(0x326) /* not on XLS408Lite, XLS404Lite */
747 #define RMIXL_PCIE_MSG_BUCKET_SIZE_7 _RMIXL_OFFSET(0x327) /* not on XLS408Lite, XLS404Lite */
748 #define RMIXL_PCIE_MSG_CREDIT_FIRST _RMIXL_OFFSET(0x380)
749 #define RMIXL_PCIE_MSG_CREDIT_LAST _RMIXL_OFFSET(0x3ff)
750
751 /*
752 * USB General Interface registers
753 * these are opffset from REGSPACE selected by __BIT(12) == 1
754 * RMIXL_IOREG_VADDR(RMIXL_IO_DEV_USB_B + reg)
755 * see Tables 18-7 and 18-14 in the XLS PRM
756 */
757 #define RMIXL_USB_GEN_CTRL1 0x00
758 #define RMIXL_USB_GEN_CTRL2 0x04
759 #define RMIXL_USB_GEN_CTRL3 0x08
760 #define RMIXL_USB_IOBM_TIMER 0x0C
761 #define RMIXL_USB_VBUS_TIMER 0x10
762 #define RMIXL_USB_BYTESWAP_EN 0x14
763 #define RMIXL_USB_COHERENT_MEM_BASE 0x40
764 #define RMIXL_USB_COHERENT_MEM_LIMIT 0x44
765 #define RMIXL_USB_L2ALLOC_MEM_BASE 0x48
766 #define RMIXL_USB_L2ALLOC_MEM_LIMIT 0x4C
767 #define RMIXL_USB_READEX_MEM_BASE 0x50
768 #define RMIXL_USB_READEX_MEM_LIMIT 0x54
769 #define RMIXL_USB_PHY_STATUS 0xC0
770 #define RMIXL_USB_INTERRUPT_STATUS 0xC4
771 #define RMIXL_USB_INTERRUPT_ENABLE 0xC8
772
773 /*
774 * RMIXL_USB_GEN_CTRL1 bits
775 */
776 #define RMIXL_UG_CTRL1_RESV __BITS(31,2)
777 #define RMIXL_UG_CTRL1_HOST_RST __BIT(1) /* Resets the Host Controller
778 * 0: reset
779 * 1: normal operation
780 */
781 #define RMIXL_UG_CTRL1_DEV_RST __BIT(0) /* Resets the Device Controller
782 * 0: reset
783 * 1: normal operation
784 */
785
786 /*
787 * RMIXL_USB_GEN_CTRL2 bits
788 */
789 #define RMIXL_UG_CTRL2_RESa __BITS(31,20)
790 #define RMIXL_UG_CTRL2_TX_TUNE_1 __BITS(19,18) /* Port_1 Transmitter Tuning for High-Speed Operation.
791 * 00: ~-4.5%
792 * 01: Design default
793 * 10: ~+4.5%
794 * 11: ~+9% = Recommended Operating setting
795 */
796 #define RMIXL_UG_CTRL2_TX_TUNE_0 __BITS(17,16) /* Port_0 Transmitter Tuning for High-Speed Operation
797 * 11: Recommended Operating condition
798 */
799 #define RMIXL_UG_CTRL2_RESb __BIT(15)
800 #define RMIXL_UG_CTRL2_WEAK_PDEN __BIT(14) /* 500kOhm Pull-Down Resistor on D+ and D- Enable */
801 #define RMIXL_UG_CTRL2_DP_PULLUP_ESD __BIT(13) /* D+ Pull-Up Resistor Enable */
802 #define RMIXL_UG_CTRL2_ESD_TEST_MODE __BIT(12) /* D+ Pull-Up Resistor Control Select */
803 #define RMIXL_UG_CTRL2_TX_BIT_STUFF_EN_H_1 \
804 __BIT(11) /* Port_1 High-Byte Transmit Bit-Stuffing Enable */
805 #define RMIXL_UG_CTRL2_TX_BIT_STUFF_EN_H_0 \
806 __BIT(10) /* Port_0 High-Byte Transmit Bit-Stuffing Enable */
807 #define RMIXL_UG_CTRL2_TX_BIT_STUFF_EN_L_1 \
808 __BIT(9) /* Port_1 Low-Byte Transmit Bit-Stuffing Enable */
809 #define RMIXL_UG_CTRL2_TX_BIT_STUFF_EN_L_0 \
810 __BIT(8) /* Port_0 Low-Byte Transmit Bit-Stuffing Enable */
811 #define RMIXL_UG_CTRL2_RESc __BITS(7,6)
812 #define RMIXL_UG_CTRL2_LOOPBACK_ENB_1 __BIT(5) /* Port_1 Loopback Test Enable */
813 #define RMIXL_UG_CTRL2_LOOPBACK_ENB_0 __BIT(4) /* Port_0 Loopback Test Enable */
814 #define RMIXL_UG_CTRL2_DEVICE_VBUS __BIT(3) /* VBUS detected (Device mode only) */
815 #define RMIXL_UG_CTRL2_PHY_PORT_RST_1 __BIT(2) /* Resets Port_1 of the PHY
816 * 1: normal operation
817 * 0: reset
818 */
819 #define RMIXL_UG_CTRL2_PHY_PORT_RST_0 __BIT(1) /* Resets Port_0 of the PHY
820 * 1: normal operation
821 * 0: reset
822 */
823 #define RMIXL_UG_CTRL2_PHY_RST __BIT(0) /* Resets the PHY
824 * 1: normal operation
825 * 0: reset
826 */
827 #define RMIXL_UG_CTRL2_RESV \
828 (RMIXL_UG_CTRL2_RESa | RMIXL_UG_CTRL2_RESb | RMIXL_UG_CTRL2_RESc)
829
830
831 /*
832 * RMIXL_USB_GEN_CTRL3 bits
833 */
834 #define RMIXL_UG_CTRL3_RESa __BITS(31,11)
835 #define RMIXL_UG_CTRL3_PREFETCH_SIZE __BITS(10,8) /* The pre-fetch size for a memory read transfer
836 * between USB Interface and DI station.
837 * Valid value ranges is from 1 to 4.
838 */
839 #define RMIXL_UG_CTRL3_RESb __BIT(7)
840 #define RMIXL_UG_CTRL3_DEV_UPPERADDR __BITS(6,1) /* Device controller address space selector */
841 #define RMIXL_UG_CTRL3_USB_FLUSH __BIT(0) /* Flush the USB interface */
842
843 /*
844 * RMIXL_USB_PHY_STATUS bits
845 */
846 #define RMIXL_UB_PHY_STATUS_RESV __BITS(31,1)
847 #define RMIXL_UB_PHY_STATUS_VBUS __BIT(0) /* USB VBUS status */
848
849 /*
850 * RMIXL_USB_INTERRUPT_STATUS and RMIXL_USB_INTERRUPT_ENABLE bits
851 */
852 #define RMIXL_UB_INTERRUPT_RESV __BITS(31,6)
853 #define RMIXL_UB_INTERRUPT_FORCE __BIT(5) /* USB force interrupt */
854 #define RMIXL_UB_INTERRUPT_PHY __BIT(4) /* USB PHY interrupt */
855 #define RMIXL_UB_INTERRUPT_DEV __BIT(3) /* USB Device Controller interrupt */
856 #define RMIXL_UB_INTERRUPT_EHCI __BIT(2) /* USB EHCI interrupt */
857 #define RMIXL_UB_INTERRUPT_OHCI_1 __BIT(1) /* USB OHCI #1 interrupt */
858 #define RMIXL_UB_INTERRUPT_OHCI_0 __BIT(0) /* USB OHCI #0 interrupt */
859 #define RMIXL_UB_INTERRUPT_MAX 5
860
861
862 /*
863 * USB Device Controller registers
864 * these are opffset from REGSPACE selected by __BIT(12) == 0
865 * RMIXL_IOREG_VADDR(RMIXL_IO_DEV_USB_A + reg)
866 * see Table 18-7 in the XLS PRM
867 */
868 #define RMIXL_USB_UDC_GAHBCFG 0x008 /* UDC Configuration A (UDC_GAHBCFG) */
869 #define RMIXL_USB_UDC_GUSBCFG 0x00C /* UDC Configuration B (UDC_GUSBCFG) */
870 #define RMIXL_USB_UDC_GRSTCTL 0x010 /* UDC Reset */
871 #define RMIXL_USB_UDC_GINTSTS 0x014 /* UDC Interrupt Register */
872 #define RMIXL_USB_UDC_GINTMSK 0x018 /* UDC Interrupt Mask Register */
873 #define RMIXL_USB_UDC_GRXSTSP 0x020 /* UDC Receive Status Read /Pop Register (Read Only) */
874 #define RMIXL_USB_UDC_GRXFSIZ 0x024 /* UDC Receive FIFO Size Register */
875 #define RMIXL_USB_UDC_GNPTXFSIZ 0x028 /* UDC Non-periodic Transmit FIFO Size Register */
876 #define RMIXL_USB_UDC_GUID 0x03C /* UDC User ID Register (UDC_GUID) */
877 #define RMIXL_USB_UDC_GSNPSID 0x040 /* UDC ID Register (Read Only) */
878 #define RMIXL_USB_UDC_GHWCFG1 0x044 /* UDC User HW Config1 Register (Read Only) */
879 #define RMIXL_USB_UDC_GHWCFG2 0x048 /* UDC User HW Config2 Register (Read Only) */
880 #define RMIXL_USB_UDC_GHWCFG3 0x04C /* UDC User HW Config3 Register (Read Only) */
881 #define RMIXL_USB_UDC_GHWCFG4 0x050 /* UDC User HW Config4 Register (Read Only) */
882 #define RMIXL_USB_UDC_DPTXFSIZ0 0x104
883 #define RMIXL_USB_UDC_DPTXFSIZ1 0x108
884 #define RMIXL_USB_UDC_DPTXFSIZ2 0x10c
885 #define RMIXL_USB_UDC_DPTXFSIZn(n) (0x104 + (4 * (n)))
886 /* UDC Device IN Endpoint Transmit FIFO-n
887 Size Registers (UDC_DPTXFSIZn) */
888 #define RMIXL_USB_UDC_DCFG 0x800 /* UDC Configuration C */
889 #define RMIXL_USB_UDC_DCTL 0x804 /* UDC Control Register */
890 #define RMIXL_USB_UDC_DSTS 0x808 /* UDC Status Register (Read Only) */
891 #define RMIXL_USB_UDC_DIEPMSK 0x810 /* UDC Device IN Endpoint Common
892 Interrupt Mask Register (UDC_DIEPMSK) */
893 #define RMIXL_USB_UDC_DOEPMSK 0x814 /* UDC Device OUT Endpoint Common Interrupt Mask register */
894 #define RMIXL_USB_UDC_DAINT 0x818 /* UDC Device All Endpoints Interrupt Register */
895 #define RMIXL_USB_UDC_DAINTMSK 0x81C /* UDC Device All Endpoints Interrupt Mask Register */
896 #define RMIXL_USB_UDC_DTKNQR3 0x830 /* Device Threshold Control Register */
897 #define RMIXL_USB_UDC_DTKNQR4 0x834 /* Device IN Endpoint FIFO Empty Interrupt Mask Register */
898 #define RMIXL_USB_UDC_DIEPCTL 0x900 /* Device Control IN Endpoint 0 Control Register */
899 #define RMIXL_USB_UDC_DIEPINT 0x908 /* Device IN Endpoint 0 Interrupt Register */
900 #define RMIXL_USB_UDC_DIEPTSIZ 0x910 /* Device IN Endpoint 0 Transfer Size Register */
901 #define RMIXL_USB_UDC_DIEPDMA 0x914 /* Device IN Endpoint 0 DMA Address Register */
902 #define RMIXL_USB_UDC_DTXFSTS 0x918 /* Device IN Endpoint Transmit FIFO Status Register */
903 #define RMIXL_USB_DEV_IN_ENDPT(d,n) (0x920 + ((d) * 0x20) + ((n) * 4))
904 /* Device IN Endpoint #d Register #n */
905
906 /*
907 * USB Host Controller register base addrs
908 * these are offset from REGSPACE selected by __BIT(12) == 0
909 * RMIXL_IOREG_VADDR(RMIXL_IO_DEV_USB_A + reg)
910 * see Table 18-14 in the XLS PRM
911 * specific Host Controller is selected by __BITS(11,10)
912 */
913 #define RMIXL_USB_HOST_EHCI_BASE 0x000
914 #define RMIXL_USB_HOST_0HCI0_BASE 0x400
915 #define RMIXL_USB_HOST_0HCI1_BASE 0x800
916 #define RMIXL_USB_HOST_RESV 0xc00
917 #define RMIXL_USB_HOST_MASK 0xc00
918
919
920 /*
921 * FMN non-core station configuration registers
922 */
923 #define RMIXL_FMN_BS_FIRST _RMIXL_OFFSET(0x320)
924
925 /*
926 * SGMII bucket size regs
927 */
928 #define RMIXL_FMN_BS_SGMII_UNUSED0 _RMIXL_OFFSET(0x320) /* initialize as 0 */
929 #define RMIXL_FMN_BS_SGMII_FCB _RMIXL_OFFSET(0x321) /* Free Credit Bucket size */
930 #define RMIXL_FMN_BS_SGMII_TX0 _RMIXL_OFFSET(0x322)
931 #define RMIXL_FMN_BS_SGMII_TX1 _RMIXL_OFFSET(0x323)
932 #define RMIXL_FMN_BS_SGMII_TX2 _RMIXL_OFFSET(0x324)
933 #define RMIXL_FMN_BS_SGMII_TX3 _RMIXL_OFFSET(0x325)
934 #define RMIXL_FMN_BS_SGMII_UNUSED1 _RMIXL_OFFSET(0x326) /* initialize as 0 */
935 #define RMIXL_FMN_BS_SGMII_FCB1 _RMIXL_OFFSET(0x327) /* Free Credit Bucket1 size */
936
937 /*
938 * SAE bucket size regs
939 */
940 #define RMIXL_FMN_BS_SAE_PIPE0 _RMIXL_OFFSET(0x320)
941 #define RMIXL_FMN_BS_SAE_RSA_PIPE _RMIXL_OFFSET(0x321)
942
943 /*
944 * DMA bucket size regs
945 */
946 #define RMIXL_FMN_BS_DMA_CHAN0 _RMIXL_OFFSET(0x320)
947 #define RMIXL_FMN_BS_DMA_CHAN1 _RMIXL_OFFSET(0x321)
948 #define RMIXL_FMN_BS_DMA_CHAN2 _RMIXL_OFFSET(0x322)
949 #define RMIXL_FMN_BS_DMA_CHAN3 _RMIXL_OFFSET(0x323)
950
951 /*
952 * CDE bucket size regs
953 */
954 #define RMIXL_FMN_BS_CDE_FREE_DESC _RMIXL_OFFSET(0x320)
955 #define RMIXL_FMN_BS_CDE_COMPDECOMP _RMIXL_OFFSET(0x321)
956
957 /*
958 * PCIe bucket size regs
959 */
960 #define RMIXL_FMN_BS_PCIE_TX0 _RMIXL_OFFSET(0x320)
961 #define RMIXL_FMN_BS_PCIE_RX0 _RMIXL_OFFSET(0x321)
962 #define RMIXL_FMN_BS_PCIE_TX1 _RMIXL_OFFSET(0x322)
963 #define RMIXL_FMN_BS_PCIE_RX1 _RMIXL_OFFSET(0x323)
964 #define RMIXL_FMN_BS_PCIE_TX2 _RMIXL_OFFSET(0x324)
965 #define RMIXL_FMN_BS_PCIE_RX2 _RMIXL_OFFSET(0x325)
966 #define RMIXL_FMN_BS_PCIE_TX3 _RMIXL_OFFSET(0x326)
967 #define RMIXL_FMN_BS_PCIE_RX3 _RMIXL_OFFSET(0x327)
968
969 /*
970 * non-core Credit Counter offsets
971 */
972 #define RMIXL_FMN_CC_FIRST _RMIXL_OFFSET(0x380)
973 #define RMIXL_FMN_CC_LAST _RMIXL_OFFSET(0x3ff)
974
975 /*
976 * non-core Credit Counter bit defines
977 */
978 #define RMIXL_FMN_CC_RESV __BITS(31,8)
979 #define RMIXL_FMN_CC_COUNT __BITS(7,0)
980
981 #endif /* _MIPS_RMI_RMIRMIXLEGS_H_ */
982
983