diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2016-08-02 17:06:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 19:35:37 -0400 |
commit | 1ae842de1dd8051cbb65b396b6f029d07f992641 (patch) | |
tree | 8611cc33a11229df919f3d87561d803d5e5986a9 /include/linux/rio_regs.h | |
parent | a057a52e94e15d89be8af557584e0144a496b6c6 (diff) |
rapidio: modify for rev.3 specification changes
Implement changes made in RapidIO specification rev.3 to LP-Serial Physical
Layer register definitions:
- use per-port register offset calculations based on LP-Serial Extended
Features Block (EFB) Register Map type (I or II) with different
per-port offset step (0x20 vs 0x40 respectfully).
- remove deprecated Parallel Physical layer definitions and related
code.
[alexandre.bounine@idt.com: fix DocBook warning for gen3 update]
Link: http://lkml.kernel.org/r/1469191173-19338-1-git-send-email-alexandre.bounine@idt.com
Link: http://lkml.kernel.org/r/1469125134-16523-12-git-send-email-alexandre.bounine@idt.com
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Tested-by: Barry Wood <barry.wood@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com>
Cc: Barry Wood <barry.wood@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rio_regs.h')
-rw-r--r-- | include/linux/rio_regs.h | 167 |
1 files changed, 132 insertions, 35 deletions
diff --git a/include/linux/rio_regs.h b/include/linux/rio_regs.h index 1063ae382bc2..40c04efe7409 100644 --- a/include/linux/rio_regs.h +++ b/include/linux/rio_regs.h | |||
@@ -42,9 +42,11 @@ | |||
42 | #define RIO_PEF_INB_MBOX2 0x00200000 /* [II, <= 1.2] Mailbox 2 */ | 42 | #define RIO_PEF_INB_MBOX2 0x00200000 /* [II, <= 1.2] Mailbox 2 */ |
43 | #define RIO_PEF_INB_MBOX3 0x00100000 /* [II, <= 1.2] Mailbox 3 */ | 43 | #define RIO_PEF_INB_MBOX3 0x00100000 /* [II, <= 1.2] Mailbox 3 */ |
44 | #define RIO_PEF_INB_DOORBELL 0x00080000 /* [II, <= 1.2] Doorbells */ | 44 | #define RIO_PEF_INB_DOORBELL 0x00080000 /* [II, <= 1.2] Doorbells */ |
45 | #define RIO_PEF_DEV32 0x00001000 /* [III] PE supports Common TRansport Dev32 */ | ||
45 | #define RIO_PEF_EXT_RT 0x00000200 /* [III, 1.3] Extended route table support */ | 46 | #define RIO_PEF_EXT_RT 0x00000200 /* [III, 1.3] Extended route table support */ |
46 | #define RIO_PEF_STD_RT 0x00000100 /* [III, 1.3] Standard route table support */ | 47 | #define RIO_PEF_STD_RT 0x00000100 /* [III, 1.3] Standard route table support */ |
47 | #define RIO_PEF_CTLS 0x00000010 /* [III] CTLS */ | 48 | #define RIO_PEF_CTLS 0x00000010 /* [III] Common Transport Large System (< rev.3) */ |
49 | #define RIO_PEF_DEV16 0x00000010 /* [III] PE Supports Common Transport Dev16 (rev.3) */ | ||
48 | #define RIO_PEF_EXT_FEATURES 0x00000008 /* [I] EFT_PTR valid */ | 50 | #define RIO_PEF_EXT_FEATURES 0x00000008 /* [I] EFT_PTR valid */ |
49 | #define RIO_PEF_ADDR_66 0x00000004 /* [I] 66 bits */ | 51 | #define RIO_PEF_ADDR_66 0x00000004 /* [I] 66 bits */ |
50 | #define RIO_PEF_ADDR_50 0x00000002 /* [I] 50 bits */ | 52 | #define RIO_PEF_ADDR_50 0x00000002 /* [I] 50 bits */ |
@@ -194,70 +196,101 @@ | |||
194 | #define RIO_GET_BLOCK_ID(x) (x & RIO_EFB_ID_MASK) | 196 | #define RIO_GET_BLOCK_ID(x) (x & RIO_EFB_ID_MASK) |
195 | 197 | ||
196 | /* Extended Feature Block IDs */ | 198 | /* Extended Feature Block IDs */ |
197 | #define RIO_EFB_PAR_EP_ID 0x0001 /* [IV] LP/LVDS EP Devices */ | 199 | #define RIO_EFB_SER_EP_M1_ID 0x0001 /* [VI] LP-Serial EP Devices, Map I */ |
198 | #define RIO_EFB_PAR_EP_REC_ID 0x0002 /* [IV] LP/LVDS EP Recovery Devices */ | 200 | #define RIO_EFB_SER_EP_SW_M1_ID 0x0002 /* [VI] LP-Serial EP w SW Recovery Devices, Map I */ |
199 | #define RIO_EFB_PAR_EP_FREE_ID 0x0003 /* [IV] LP/LVDS EP Free Devices */ | 201 | #define RIO_EFB_SER_EPF_M1_ID 0x0003 /* [VI] LP-Serial EP Free Devices, Map I */ |
200 | #define RIO_EFB_SER_EP_ID_V13P 0x0001 /* [VI] LP/Serial EP Devices, RapidIO Spec ver 1.3 and above */ | 202 | #define RIO_EFB_SER_EP_ID 0x0004 /* [VI] LP-Serial EP Devices, RIO 1.2 */ |
201 | #define RIO_EFB_SER_EP_REC_ID_V13P 0x0002 /* [VI] LP/Serial EP Recovery Devices, RapidIO Spec ver 1.3 and above */ | 203 | #define RIO_EFB_SER_EP_REC_ID 0x0005 /* [VI] LP-Serial EP w SW Recovery Devices, RIO 1.2 */ |
202 | #define RIO_EFB_SER_EP_FREE_ID_V13P 0x0003 /* [VI] LP/Serial EP Free Devices, RapidIO Spec ver 1.3 and above */ | 204 | #define RIO_EFB_SER_EP_FREE_ID 0x0006 /* [VI] LP-Serial EP Free Devices, RIO 1.2 */ |
203 | #define RIO_EFB_SER_EP_ID 0x0004 /* [VI] LP/Serial EP Devices */ | ||
204 | #define RIO_EFB_SER_EP_REC_ID 0x0005 /* [VI] LP/Serial EP Recovery Devices */ | ||
205 | #define RIO_EFB_SER_EP_FREE_ID 0x0006 /* [VI] LP/Serial EP Free Devices */ | ||
206 | #define RIO_EFB_SER_EP_FREC_ID 0x0009 /* [VI] LP/Serial EP Free Recovery Devices */ | ||
207 | #define RIO_EFB_ERR_MGMNT 0x0007 /* [VIII] Error Management Extensions */ | 205 | #define RIO_EFB_ERR_MGMNT 0x0007 /* [VIII] Error Management Extensions */ |
206 | #define RIO_EFB_SER_EPF_SW_M1_ID 0x0009 /* [VI] LP-Serial EP Free w SW Recovery Devices, Map I */ | ||
207 | #define RIO_EFB_SW_ROUTING_TBL 0x000E /* [III] Switch Routing Table Block */ | ||
208 | #define RIO_EFB_SER_EP_M2_ID 0x0011 /* [VI] LP-Serial EP Devices, Map II */ | ||
209 | #define RIO_EFB_SER_EP_SW_M2_ID 0x0012 /* [VI] LP-Serial EP w SW Recovery Devices, Map II */ | ||
210 | #define RIO_EFB_SER_EPF_M2_ID 0x0013 /* [VI] LP-Serial EP Free Devices, Map II */ | ||
211 | #define RIO_EFB_ERR_MGMNT_HS 0x0017 /* [VIII] Error Management Extensions, Hot-Swap only */ | ||
212 | #define RIO_EFB_SER_EPF_SW_M2_ID 0x0019 /* [VI] LP-Serial EP Free w SW Recovery Devices, Map II */ | ||
208 | 213 | ||
209 | /* | 214 | /* |
210 | * Physical 8/16 LP-LVDS | 215 | * Physical LP-Serial Registers Definitions |
211 | * ID=0x0001, Generic End Point Devices | 216 | * Parameters in register macros: |
212 | * ID=0x0002, Generic End Point Devices, software assisted recovery option | 217 | * n - port number, m - Register Map Type (1 or 2) |
213 | * ID=0x0003, Generic End Point Free Devices | ||
214 | * | ||
215 | * Physical LP-Serial | ||
216 | * ID=0x0004, Generic End Point Devices | ||
217 | * ID=0x0005, Generic End Point Devices, software assisted recovery option | ||
218 | * ID=0x0006, Generic End Point Free Devices | ||
219 | */ | 218 | */ |
220 | #define RIO_PORT_MNT_HEADER 0x0000 | 219 | #define RIO_PORT_MNT_HEADER 0x0000 |
221 | #define RIO_PORT_REQ_CTL_CSR 0x0020 | 220 | #define RIO_PORT_REQ_CTL_CSR 0x0020 |
222 | #define RIO_PORT_RSP_CTL_CSR 0x0024 /* 0x0001/0x0002 */ | 221 | #define RIO_PORT_RSP_CTL_CSR 0x0024 |
223 | #define RIO_PORT_LINKTO_CTL_CSR 0x0020 /* Serial */ | 222 | #define RIO_PORT_LINKTO_CTL_CSR 0x0020 |
224 | #define RIO_PORT_RSPTO_CTL_CSR 0x0024 /* Serial */ | 223 | #define RIO_PORT_RSPTO_CTL_CSR 0x0024 |
225 | #define RIO_PORT_GEN_CTL_CSR 0x003c | 224 | #define RIO_PORT_GEN_CTL_CSR 0x003c |
226 | #define RIO_PORT_GEN_HOST 0x80000000 | 225 | #define RIO_PORT_GEN_HOST 0x80000000 |
227 | #define RIO_PORT_GEN_MASTER 0x40000000 | 226 | #define RIO_PORT_GEN_MASTER 0x40000000 |
228 | #define RIO_PORT_GEN_DISCOVERED 0x20000000 | 227 | #define RIO_PORT_GEN_DISCOVERED 0x20000000 |
229 | #define RIO_PORT_N_MNT_REQ_CSR(x) (0x0040 + x*0x20) /* 0x0002 */ | 228 | #define RIO_PORT_N_MNT_REQ_CSR(n, m) (0x40 + (n) * (0x20 * (m))) |
230 | #define RIO_MNT_REQ_CMD_RD 0x03 /* Reset-device command */ | 229 | #define RIO_MNT_REQ_CMD_RD 0x03 /* Reset-device command */ |
231 | #define RIO_MNT_REQ_CMD_IS 0x04 /* Input-status command */ | 230 | #define RIO_MNT_REQ_CMD_IS 0x04 /* Input-status command */ |
232 | #define RIO_PORT_N_MNT_RSP_CSR(x) (0x0044 + x*0x20) /* 0x0002 */ | 231 | #define RIO_PORT_N_MNT_RSP_CSR(n, m) (0x44 + (n) * (0x20 * (m))) |
233 | #define RIO_PORT_N_MNT_RSP_RVAL 0x80000000 /* Response Valid */ | 232 | #define RIO_PORT_N_MNT_RSP_RVAL 0x80000000 /* Response Valid */ |
234 | #define RIO_PORT_N_MNT_RSP_ASTAT 0x000007e0 /* ackID Status */ | 233 | #define RIO_PORT_N_MNT_RSP_ASTAT 0x000007e0 /* ackID Status */ |
235 | #define RIO_PORT_N_MNT_RSP_LSTAT 0x0000001f /* Link Status */ | 234 | #define RIO_PORT_N_MNT_RSP_LSTAT 0x0000001f /* Link Status */ |
236 | #define RIO_PORT_N_ACK_STS_CSR(x) (0x0048 + x*0x20) /* 0x0002 */ | 235 | #define RIO_PORT_N_ACK_STS_CSR(n) (0x48 + (n) * 0x20) /* Only in RM-I */ |
237 | #define RIO_PORT_N_ACK_CLEAR 0x80000000 | 236 | #define RIO_PORT_N_ACK_CLEAR 0x80000000 |
238 | #define RIO_PORT_N_ACK_INBOUND 0x3f000000 | 237 | #define RIO_PORT_N_ACK_INBOUND 0x3f000000 |
239 | #define RIO_PORT_N_ACK_OUTSTAND 0x00003f00 | 238 | #define RIO_PORT_N_ACK_OUTSTAND 0x00003f00 |
240 | #define RIO_PORT_N_ACK_OUTBOUND 0x0000003f | 239 | #define RIO_PORT_N_ACK_OUTBOUND 0x0000003f |
241 | #define RIO_PORT_N_CTL2_CSR(x) (0x0054 + x*0x20) | 240 | #define RIO_PORT_N_CTL2_CSR(n, m) (0x54 + (n) * (0x20 * (m))) |
242 | #define RIO_PORT_N_CTL2_SEL_BAUD 0xf0000000 | 241 | #define RIO_PORT_N_CTL2_SEL_BAUD 0xf0000000 |
243 | #define RIO_PORT_N_ERR_STS_CSR(x) (0x0058 + x*0x20) | 242 | #define RIO_PORT_N_ERR_STS_CSR(n, m) (0x58 + (n) * (0x20 * (m))) |
244 | #define RIO_PORT_N_ERR_STS_PW_OUT_ES 0x00010000 /* Output Error-stopped */ | 243 | #define RIO_PORT_N_ERR_STS_OUT_ES 0x00010000 /* Output Error-stopped */ |
245 | #define RIO_PORT_N_ERR_STS_PW_INP_ES 0x00000100 /* Input Error-stopped */ | 244 | #define RIO_PORT_N_ERR_STS_INP_ES 0x00000100 /* Input Error-stopped */ |
246 | #define RIO_PORT_N_ERR_STS_PW_PEND 0x00000010 /* Port-Write Pending */ | 245 | #define RIO_PORT_N_ERR_STS_PW_PEND 0x00000010 /* Port-Write Pending */ |
246 | #define RIO_PORT_N_ERR_STS_PORT_UA 0x00000008 /* Port Unavailable */ | ||
247 | #define RIO_PORT_N_ERR_STS_PORT_ERR 0x00000004 | 247 | #define RIO_PORT_N_ERR_STS_PORT_ERR 0x00000004 |
248 | #define RIO_PORT_N_ERR_STS_PORT_OK 0x00000002 | 248 | #define RIO_PORT_N_ERR_STS_PORT_OK 0x00000002 |
249 | #define RIO_PORT_N_ERR_STS_PORT_UNINIT 0x00000001 | 249 | #define RIO_PORT_N_ERR_STS_PORT_UNINIT 0x00000001 |
250 | #define RIO_PORT_N_CTL_CSR(x) (0x005c + x*0x20) | 250 | #define RIO_PORT_N_CTL_CSR(n, m) (0x5c + (n) * (0x20 * (m))) |
251 | #define RIO_PORT_N_CTL_PWIDTH 0xc0000000 | 251 | #define RIO_PORT_N_CTL_PWIDTH 0xc0000000 |
252 | #define RIO_PORT_N_CTL_PWIDTH_1 0x00000000 | 252 | #define RIO_PORT_N_CTL_PWIDTH_1 0x00000000 |
253 | #define RIO_PORT_N_CTL_PWIDTH_4 0x40000000 | 253 | #define RIO_PORT_N_CTL_PWIDTH_4 0x40000000 |
254 | #define RIO_PORT_N_CTL_IPW 0x38000000 /* Initialized Port Width */ | 254 | #define RIO_PORT_N_CTL_IPW 0x38000000 /* Initialized Port Width */ |
255 | #define RIO_PORT_N_CTL_P_TYP_SER 0x00000001 | 255 | #define RIO_PORT_N_CTL_P_TYP_SER 0x00000001 |
256 | #define RIO_PORT_N_CTL_LOCKOUT 0x00000002 | 256 | #define RIO_PORT_N_CTL_LOCKOUT 0x00000002 |
257 | #define RIO_PORT_N_CTL_EN_RX_SER 0x00200000 | 257 | #define RIO_PORT_N_CTL_EN_RX 0x00200000 |
258 | #define RIO_PORT_N_CTL_EN_TX_SER 0x00400000 | 258 | #define RIO_PORT_N_CTL_EN_TX 0x00400000 |
259 | #define RIO_PORT_N_CTL_EN_RX_PAR 0x08000000 | 259 | #define RIO_PORT_N_OB_ACK_CSR(n) (0x60 + (n) * 0x40) /* Only in RM-II */ |
260 | #define RIO_PORT_N_CTL_EN_TX_PAR 0x40000000 | 260 | #define RIO_PORT_N_OB_ACK_CLEAR 0x80000000 |
261 | #define RIO_PORT_N_OB_ACK_OUTSTD 0x00fff000 | ||
262 | #define RIO_PORT_N_OB_ACK_OUTBND 0x00000fff | ||
263 | #define RIO_PORT_N_IB_ACK_CSR(n) (0x64 + (n) * 0x40) /* Only in RM-II */ | ||
264 | #define RIO_PORT_N_IB_ACK_INBND 0x00000fff | ||
265 | |||
266 | /* | ||
267 | * Device-based helper macros for serial port register access. | ||
268 | * d - pointer to rapidio device object, n - port number | ||
269 | */ | ||
270 | |||
271 | #define RIO_DEV_PORT_N_MNT_REQ_CSR(d, n) \ | ||
272 | (d->phys_efptr + RIO_PORT_N_MNT_REQ_CSR(n, d->phys_rmap)) | ||
273 | |||
274 | #define RIO_DEV_PORT_N_MNT_RSP_CSR(d, n) \ | ||
275 | (d->phys_efptr + RIO_PORT_N_MNT_RSP_CSR(n, d->phys_rmap)) | ||
276 | |||
277 | #define RIO_DEV_PORT_N_ACK_STS_CSR(d, n) \ | ||
278 | (d->phys_efptr + RIO_PORT_N_ACK_STS_CSR(n)) | ||
279 | |||
280 | #define RIO_DEV_PORT_N_CTL2_CSR(d, n) \ | ||
281 | (d->phys_efptr + RIO_PORT_N_CTL2_CSR(n, d->phys_rmap)) | ||
282 | |||
283 | #define RIO_DEV_PORT_N_ERR_STS_CSR(d, n) \ | ||
284 | (d->phys_efptr + RIO_PORT_N_ERR_STS_CSR(n, d->phys_rmap)) | ||
285 | |||
286 | #define RIO_DEV_PORT_N_CTL_CSR(d, n) \ | ||
287 | (d->phys_efptr + RIO_PORT_N_CTL_CSR(n, d->phys_rmap)) | ||
288 | |||
289 | #define RIO_DEV_PORT_N_OB_ACK_CSR(d, n) \ | ||
290 | (d->phys_efptr + RIO_PORT_N_OB_ACK_CSR(n)) | ||
291 | |||
292 | #define RIO_DEV_PORT_N_IB_ACK_CSR(d, n) \ | ||
293 | (d->phys_efptr + RIO_PORT_N_IB_ACK_CSR(n)) | ||
261 | 294 | ||
262 | /* | 295 | /* |
263 | * Error Management Extensions (RapidIO 1.3+, Part 8) | 296 | * Error Management Extensions (RapidIO 1.3+, Part 8) |
@@ -268,6 +301,7 @@ | |||
268 | /* General EM Registers (Common for all Ports) */ | 301 | /* General EM Registers (Common for all Ports) */ |
269 | 302 | ||
270 | #define RIO_EM_EFB_HEADER 0x000 /* Error Management Extensions Block Header */ | 303 | #define RIO_EM_EFB_HEADER 0x000 /* Error Management Extensions Block Header */ |
304 | #define RIO_EM_EMHS_CAR 0x004 /* EM Functionality CAR */ | ||
271 | #define RIO_EM_LTL_ERR_DETECT 0x008 /* Logical/Transport Layer Error Detect CSR */ | 305 | #define RIO_EM_LTL_ERR_DETECT 0x008 /* Logical/Transport Layer Error Detect CSR */ |
272 | #define RIO_EM_LTL_ERR_EN 0x00c /* Logical/Transport Layer Error Enable CSR */ | 306 | #define RIO_EM_LTL_ERR_EN 0x00c /* Logical/Transport Layer Error Enable CSR */ |
273 | #define REM_LTL_ERR_ILLTRAN 0x08000000 /* Illegal Transaction decode */ | 307 | #define REM_LTL_ERR_ILLTRAN 0x08000000 /* Illegal Transaction decode */ |
@@ -278,15 +312,33 @@ | |||
278 | #define RIO_EM_LTL_ADDR_CAP 0x014 /* Logical/Transport Layer Address Capture CSR */ | 312 | #define RIO_EM_LTL_ADDR_CAP 0x014 /* Logical/Transport Layer Address Capture CSR */ |
279 | #define RIO_EM_LTL_DEVID_CAP 0x018 /* Logical/Transport Layer Device ID Capture CSR */ | 313 | #define RIO_EM_LTL_DEVID_CAP 0x018 /* Logical/Transport Layer Device ID Capture CSR */ |
280 | #define RIO_EM_LTL_CTRL_CAP 0x01c /* Logical/Transport Layer Control Capture CSR */ | 314 | #define RIO_EM_LTL_CTRL_CAP 0x01c /* Logical/Transport Layer Control Capture CSR */ |
315 | #define RIO_EM_LTL_DID32_CAP 0x020 /* Logical/Transport Layer Dev32 DestID Capture CSR */ | ||
316 | #define RIO_EM_LTL_SID32_CAP 0x024 /* Logical/Transport Layer Dev32 source ID Capture CSR */ | ||
281 | #define RIO_EM_PW_TGT_DEVID 0x028 /* Port-write Target deviceID CSR */ | 317 | #define RIO_EM_PW_TGT_DEVID 0x028 /* Port-write Target deviceID CSR */ |
318 | #define RIO_EM_PW_TGT_DEVID_D16M 0xff000000 /* Port-write Target DID16 MSB */ | ||
319 | #define RIO_EM_PW_TGT_DEVID_D8 0x00ff0000 /* Port-write Target DID16 LSB or DID8 */ | ||
320 | #define RIO_EM_PW_TGT_DEVID_DEV16 0x00008000 /* Port-write Target DID16 LSB or DID8 */ | ||
321 | #define RIO_EM_PW_TGT_DEVID_DEV32 0x00004000 /* Port-write Target DID16 LSB or DID8 */ | ||
282 | #define RIO_EM_PKT_TTL 0x02c /* Packet Time-to-live CSR */ | 322 | #define RIO_EM_PKT_TTL 0x02c /* Packet Time-to-live CSR */ |
323 | #define RIO_EM_PKT_TTL_VAL 0xffff0000 /* Packet Time-to-live value */ | ||
324 | #define RIO_EM_PW_TGT32_DEVID 0x030 /* Port-write Dev32 Target deviceID CSR */ | ||
325 | #define RIO_EM_PW_TX_CTRL 0x034 /* Port-write Transmission Control CSR */ | ||
326 | #define RIO_EM_PW_TX_CTRL_PW_DIS 0x00000001 /* Port-write Transmission Disable bit */ | ||
283 | 327 | ||
284 | /* Per-Port EM Registers */ | 328 | /* Per-Port EM Registers */ |
285 | 329 | ||
286 | #define RIO_EM_PN_ERR_DETECT(x) (0x040 + x*0x40) /* Port N Error Detect CSR */ | 330 | #define RIO_EM_PN_ERR_DETECT(x) (0x040 + x*0x40) /* Port N Error Detect CSR */ |
287 | #define REM_PED_IMPL_SPEC 0x80000000 | 331 | #define REM_PED_IMPL_SPEC 0x80000000 |
332 | #define REM_PED_LINK_OK2U 0x40000000 /* Link OK to Uninit transition */ | ||
333 | #define REM_PED_LINK_UPDA 0x20000000 /* Link Uninit Packet Discard Active */ | ||
334 | #define REM_PED_LINK_U2OK 0x10000000 /* Link Uninit to OK transition */ | ||
288 | #define REM_PED_LINK_TO 0x00000001 | 335 | #define REM_PED_LINK_TO 0x00000001 |
336 | |||
289 | #define RIO_EM_PN_ERRRATE_EN(x) (0x044 + x*0x40) /* Port N Error Rate Enable CSR */ | 337 | #define RIO_EM_PN_ERRRATE_EN(x) (0x044 + x*0x40) /* Port N Error Rate Enable CSR */ |
338 | #define RIO_EM_PN_ERRRATE_EN_OK2U 0x40000000 /* Enable notification for OK2U */ | ||
339 | #define RIO_EM_PN_ERRRATE_EN_UPDA 0x20000000 /* Enable notification for UPDA */ | ||
340 | #define RIO_EM_PN_ERRRATE_EN_U2OK 0x10000000 /* Enable notification for U2OK */ | ||
341 | |||
290 | #define RIO_EM_PN_ATTRIB_CAP(x) (0x048 + x*0x40) /* Port N Attributes Capture CSR */ | 342 | #define RIO_EM_PN_ATTRIB_CAP(x) (0x048 + x*0x40) /* Port N Attributes Capture CSR */ |
291 | #define RIO_EM_PN_PKT_CAP_0(x) (0x04c + x*0x40) /* Port N Packet/Control Symbol Capture 0 CSR */ | 343 | #define RIO_EM_PN_PKT_CAP_0(x) (0x04c + x*0x40) /* Port N Packet/Control Symbol Capture 0 CSR */ |
292 | #define RIO_EM_PN_PKT_CAP_1(x) (0x050 + x*0x40) /* Port N Packet Capture 1 CSR */ | 344 | #define RIO_EM_PN_PKT_CAP_1(x) (0x050 + x*0x40) /* Port N Packet Capture 1 CSR */ |
@@ -294,5 +346,50 @@ | |||
294 | #define RIO_EM_PN_PKT_CAP_3(x) (0x058 + x*0x40) /* Port N Packet Capture 3 CSR */ | 346 | #define RIO_EM_PN_PKT_CAP_3(x) (0x058 + x*0x40) /* Port N Packet Capture 3 CSR */ |
295 | #define RIO_EM_PN_ERRRATE(x) (0x068 + x*0x40) /* Port N Error Rate CSR */ | 347 | #define RIO_EM_PN_ERRRATE(x) (0x068 + x*0x40) /* Port N Error Rate CSR */ |
296 | #define RIO_EM_PN_ERRRATE_TR(x) (0x06c + x*0x40) /* Port N Error Rate Threshold CSR */ | 348 | #define RIO_EM_PN_ERRRATE_TR(x) (0x06c + x*0x40) /* Port N Error Rate Threshold CSR */ |
349 | #define RIO_EM_PN_LINK_UDT(x) (0x070 + x*0x40) /* Port N Link Uninit Discard Timer CSR */ | ||
350 | #define RIO_EM_PN_LINK_UDT_TO 0xffffff00 /* Link Uninit Timeout value */ | ||
351 | |||
352 | /* | ||
353 | * Switch Routing Table Register Block ID=0x000E (RapidIO 3.0+, part 3) | ||
354 | * Register offsets are defined from beginning of the block. | ||
355 | */ | ||
356 | |||
357 | /* Broadcast Routing Table Control CSR */ | ||
358 | #define RIO_BC_RT_CTL_CSR 0x020 | ||
359 | #define RIO_RT_CTL_THREE_LVL 0x80000000 | ||
360 | #define RIO_RT_CTL_DEV32_RT_CTRL 0x40000000 | ||
361 | #define RIO_RT_CTL_MC_MASK_SZ 0x03000000 /* 3.0+ Part 11: Multicast */ | ||
362 | |||
363 | /* Broadcast Level 0 Info CSR */ | ||
364 | #define RIO_BC_RT_LVL0_INFO_CSR 0x030 | ||
365 | #define RIO_RT_L0I_NUM_GR 0xff000000 | ||
366 | #define RIO_RT_L0I_GR_PTR 0x00fffc00 | ||
367 | |||
368 | /* Broadcast Level 1 Info CSR */ | ||
369 | #define RIO_BC_RT_LVL1_INFO_CSR 0x034 | ||
370 | #define RIO_RT_L1I_NUM_GR 0xff000000 | ||
371 | #define RIO_RT_L1I_GR_PTR 0x00fffc00 | ||
372 | |||
373 | /* Broadcast Level 2 Info CSR */ | ||
374 | #define RIO_BC_RT_LVL2_INFO_CSR 0x038 | ||
375 | #define RIO_RT_L2I_NUM_GR 0xff000000 | ||
376 | #define RIO_RT_L2I_GR_PTR 0x00fffc00 | ||
377 | |||
378 | /* Per-Port Routing Table registers. | ||
379 | * Register fields defined in the broadcast section above are | ||
380 | * applicable to the corresponding registers below. | ||
381 | */ | ||
382 | #define RIO_SPx_RT_CTL_CSR(x) (0x040 + (0x20 * x)) | ||
383 | #define RIO_SPx_RT_LVL0_INFO_CSR(x) (0x50 + (0x20 * x)) | ||
384 | #define RIO_SPx_RT_LVL1_INFO_CSR(x) (0x54 + (0x20 * x)) | ||
385 | #define RIO_SPx_RT_LVL2_INFO_CSR(x) (0x58 + (0x20 * x)) | ||
386 | |||
387 | /* Register Formats for Routing Table Group entry. | ||
388 | * Register offsets are calculated using GR_PTR field in the corresponding | ||
389 | * table Level_N and group/entry numbers (see RapidIO 3.0+ Part 3). | ||
390 | */ | ||
391 | #define RIO_RT_Ln_ENTRY_IMPL_DEF 0xf0000000 | ||
392 | #define RIO_RT_Ln_ENTRY_RTE_VAL 0x000003ff | ||
393 | #define RIO_RT_ENTRY_DROP_PKT 0x300 | ||
297 | 394 | ||
298 | #endif /* LINUX_RIO_REGS_H */ | 395 | #endif /* LINUX_RIO_REGS_H */ |