Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cvmx-dpi-defs.h
Go to the documentation of this file.
1 /***********************license start***************
2  * Author: Cavium Networks
3  *
4  * Contact: [email protected]
5  * This file is part of the OCTEON SDK
6  *
7  * Copyright (c) 2003-2012 Cavium Networks
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License, Version 2, as
11  * published by the Free Software Foundation.
12  *
13  * This file is distributed in the hope that it will be useful, but
14  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16  * NONINFRINGEMENT. See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this file; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  * or visit http://www.gnu.org/licenses/.
23  *
24  * This file may also be available under a different license from Cavium.
25  * Contact Cavium Networks for more information
26  ***********************license end**************************************/
27 
28 #ifndef __CVMX_DPI_DEFS_H__
29 #define __CVMX_DPI_DEFS_H__
30 
31 #define CVMX_DPI_BIST_STATUS (CVMX_ADD_IO_SEG(0x0001DF0000000000ull))
32 #define CVMX_DPI_CTL (CVMX_ADD_IO_SEG(0x0001DF0000000040ull))
33 #define CVMX_DPI_DMAX_COUNTS(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000300ull) + ((offset) & 7) * 8)
34 #define CVMX_DPI_DMAX_DBELL(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000200ull) + ((offset) & 7) * 8)
35 #define CVMX_DPI_DMAX_ERR_RSP_STATUS(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000A80ull) + ((offset) & 7) * 8)
36 #define CVMX_DPI_DMAX_IBUFF_SADDR(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000280ull) + ((offset) & 7) * 8)
37 #define CVMX_DPI_DMAX_IFLIGHT(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000A00ull) + ((offset) & 7) * 8)
38 #define CVMX_DPI_DMAX_NADDR(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000380ull) + ((offset) & 7) * 8)
39 #define CVMX_DPI_DMAX_REQBNK0(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000400ull) + ((offset) & 7) * 8)
40 #define CVMX_DPI_DMAX_REQBNK1(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000480ull) + ((offset) & 7) * 8)
41 #define CVMX_DPI_DMA_CONTROL (CVMX_ADD_IO_SEG(0x0001DF0000000048ull))
42 #define CVMX_DPI_DMA_ENGX_EN(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000080ull) + ((offset) & 7) * 8)
43 #define CVMX_DPI_DMA_PPX_CNT(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000B00ull) + ((offset) & 31) * 8)
44 #define CVMX_DPI_ENGX_BUF(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000880ull) + ((offset) & 7) * 8)
45 #define CVMX_DPI_INFO_REG (CVMX_ADD_IO_SEG(0x0001DF0000000980ull))
46 #define CVMX_DPI_INT_EN (CVMX_ADD_IO_SEG(0x0001DF0000000010ull))
47 #define CVMX_DPI_INT_REG (CVMX_ADD_IO_SEG(0x0001DF0000000008ull))
48 #define CVMX_DPI_NCBX_CFG(block_id) (CVMX_ADD_IO_SEG(0x0001DF0000000800ull))
49 #define CVMX_DPI_PINT_INFO (CVMX_ADD_IO_SEG(0x0001DF0000000830ull))
50 #define CVMX_DPI_PKT_ERR_RSP (CVMX_ADD_IO_SEG(0x0001DF0000000078ull))
51 #define CVMX_DPI_REQ_ERR_RSP (CVMX_ADD_IO_SEG(0x0001DF0000000058ull))
52 #define CVMX_DPI_REQ_ERR_RSP_EN (CVMX_ADD_IO_SEG(0x0001DF0000000068ull))
53 #define CVMX_DPI_REQ_ERR_RST (CVMX_ADD_IO_SEG(0x0001DF0000000060ull))
54 #define CVMX_DPI_REQ_ERR_RST_EN (CVMX_ADD_IO_SEG(0x0001DF0000000070ull))
55 #define CVMX_DPI_REQ_ERR_SKIP_COMP (CVMX_ADD_IO_SEG(0x0001DF0000000838ull))
56 #define CVMX_DPI_REQ_GBL_EN (CVMX_ADD_IO_SEG(0x0001DF0000000050ull))
57 #define CVMX_DPI_SLI_PRTX_CFG(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000900ull) + ((offset) & 3) * 8)
58 static inline uint64_t CVMX_DPI_SLI_PRTX_ERR(unsigned long offset)
59 {
60  switch (cvmx_get_octeon_family()) {
62  return CVMX_ADD_IO_SEG(0x0001DF0000000920ull) + (offset) * 8;
66 
68  return CVMX_ADD_IO_SEG(0x0001DF0000000928ull) + (offset) * 8;
69 
71  return CVMX_ADD_IO_SEG(0x0001DF0000000920ull) + (offset) * 8;
72  return CVMX_ADD_IO_SEG(0x0001DF0000000920ull) + (offset) * 8;
74  return CVMX_ADD_IO_SEG(0x0001DF0000000928ull) + (offset) * 8;
75  }
76  return CVMX_ADD_IO_SEG(0x0001DF0000000920ull) + (offset) * 8;
77 }
78 
79 #define CVMX_DPI_SLI_PRTX_ERR_INFO(offset) (CVMX_ADD_IO_SEG(0x0001DF0000000940ull) + ((offset) & 3) * 8)
80 
84 #ifdef __BIG_ENDIAN_BITFIELD
86  uint64_t bist:47;
87 #else
90 #endif
91  } s;
94 #ifdef __BIG_ENDIAN_BITFIELD
96  uint64_t bist:45;
97 #else
100 #endif
101  } cn63xx;
103 #ifdef __BIG_ENDIAN_BITFIELD
105  uint64_t bist:37;
106 #else
109 #endif
110  } cn63xxp1;
115 };
116 
119  struct cvmx_dpi_ctl_s {
120 #ifdef __BIG_ENDIAN_BITFIELD
122  uint64_t clk:1;
123  uint64_t en:1;
124 #else
128 #endif
129  } s;
131 #ifdef __BIG_ENDIAN_BITFIELD
133  uint64_t en:1;
134 #else
137 #endif
138  } cn61xx;
145 };
146 
150 #ifdef __BIG_ENDIAN_BITFIELD
152  uint64_t fcnt:7;
153  uint64_t dbell:32;
154 #else
158 #endif
159  } s;
167 };
168 
172 #ifdef __BIG_ENDIAN_BITFIELD
174  uint64_t dbell:16;
175 #else
178 #endif
179  } s;
187 };
188 
192 #ifdef __BIG_ENDIAN_BITFIELD
194  uint64_t status:6;
195 #else
198 #endif
199  } s;
205 };
206 
210 #ifdef __BIG_ENDIAN_BITFIELD
212  uint64_t csize:14;
214  uint64_t idle:1;
215  uint64_t saddr:33;
217 #else
224 #endif
225  } s;
227 #ifdef __BIG_ENDIAN_BITFIELD
229  uint64_t csize:14;
231  uint64_t idle:1;
233  uint64_t saddr:29;
235 #else
243 #endif
244  } cn61xx;
251 };
252 
256 #ifdef __BIG_ENDIAN_BITFIELD
258  uint64_t cnt:3;
259 #else
262 #endif
263  } s;
269 };
270 
274 #ifdef __BIG_ENDIAN_BITFIELD
276  uint64_t addr:40;
277 #else
280 #endif
281  } s;
283 #ifdef __BIG_ENDIAN_BITFIELD
285  uint64_t addr:36;
286 #else
289 #endif
290  } cn61xx;
297 };
298 
302 #ifdef __BIG_ENDIAN_BITFIELD
303  uint64_t state:64;
304 #else
306 #endif
307  } s;
315 };
316 
320 #ifdef __BIG_ENDIAN_BITFIELD
321  uint64_t state:64;
322 #else
324 #endif
325  } s;
333 };
334 
338 #ifdef __BIG_ENDIAN_BITFIELD
341  uint64_t pkt_en1:1;
342  uint64_t ffp_dis:1;
344  uint64_t pkt_hp:1;
345  uint64_t pkt_en:1;
347  uint64_t dma_enb:6;
349  uint64_t b0_lend:1;
350  uint64_t dwb_denb:1;
351  uint64_t dwb_ichk:9;
352  uint64_t fpa_que:3;
353  uint64_t o_add1:1;
354  uint64_t o_ro:1;
355  uint64_t o_ns:1;
356  uint64_t o_es:2;
357  uint64_t o_mode:1;
359 #else
380 #endif
381  } s;
384 #ifdef __BIG_ENDIAN_BITFIELD
386  uint64_t pkt_en1:1;
387  uint64_t ffp_dis:1;
389  uint64_t pkt_hp:1;
390  uint64_t pkt_en:1;
392  uint64_t dma_enb:6;
394  uint64_t b0_lend:1;
395  uint64_t dwb_denb:1;
396  uint64_t dwb_ichk:9;
397  uint64_t fpa_que:3;
398  uint64_t o_add1:1;
399  uint64_t o_ro:1;
400  uint64_t o_ns:1;
401  uint64_t o_es:2;
402  uint64_t o_mode:1;
404 #else
424 #endif
425  } cn63xx;
427 #ifdef __BIG_ENDIAN_BITFIELD
430  uint64_t pkt_hp:1;
431  uint64_t pkt_en:1;
433  uint64_t dma_enb:6;
435  uint64_t b0_lend:1;
436  uint64_t dwb_denb:1;
437  uint64_t dwb_ichk:9;
438  uint64_t fpa_que:3;
439  uint64_t o_add1:1;
440  uint64_t o_ro:1;
441  uint64_t o_ns:1;
442  uint64_t o_es:2;
443  uint64_t o_mode:1;
445 #else
463 #endif
464  } cn63xxp1;
469 };
470 
474 #ifdef __BIG_ENDIAN_BITFIELD
476  uint64_t qen:8;
477 #else
480 #endif
481  } s;
489 };
490 
494 #ifdef __BIG_ENDIAN_BITFIELD
496  uint64_t cnt:16;
497 #else
500 #endif
501  } s;
505 };
506 
510 #ifdef __BIG_ENDIAN_BITFIELD
512  uint64_t compblks:5;
514  uint64_t base:5;
515  uint64_t blks:4;
516 #else
522 #endif
523  } s;
526 #ifdef __BIG_ENDIAN_BITFIELD
528  uint64_t base:4;
529  uint64_t blks:4;
530 #else
534 #endif
535  } cn63xx;
541 };
542 
546 #ifdef __BIG_ENDIAN_BITFIELD
548  uint64_t ffp:4;
550  uint64_t ncb:1;
551  uint64_t rsl:1;
552 #else
558 #endif
559  } s;
563 #ifdef __BIG_ENDIAN_BITFIELD
565  uint64_t ncb:1;
566  uint64_t rsl:1;
567 #else
571 #endif
572  } cn63xxp1;
577 };
578 
582 #ifdef __BIG_ENDIAN_BITFIELD
596  uint64_t dmadbo:8;
598  uint64_t nfovr:1;
599  uint64_t nderr:1;
600 #else
618 #endif
619  } s;
622 #ifdef __BIG_ENDIAN_BITFIELD
634  uint64_t dmadbo:8;
636  uint64_t nfovr:1;
637  uint64_t nderr:1;
638 #else
654 #endif
655  } cn63xx;
661 };
662 
666 #ifdef __BIG_ENDIAN_BITFIELD
680  uint64_t dmadbo:8;
682  uint64_t nfovr:1;
683  uint64_t nderr:1;
684 #else
702 #endif
703  } s;
706 #ifdef __BIG_ENDIAN_BITFIELD
718  uint64_t dmadbo:8;
720  uint64_t nfovr:1;
721  uint64_t nderr:1;
722 #else
738 #endif
739  } cn63xx;
745 };
746 
750 #ifdef __BIG_ENDIAN_BITFIELD
752  uint64_t molr:6;
753 #else
756 #endif
757  } s;
762 };
763 
767 #ifdef __BIG_ENDIAN_BITFIELD
769  uint64_t iinfo:6;
771  uint64_t sinfo:6;
772 #else
777 #endif
778  } s;
786 };
787 
791 #ifdef __BIG_ENDIAN_BITFIELD
793  uint64_t pkterr:1;
794 #else
797 #endif
798  } s;
806 };
807 
811 #ifdef __BIG_ENDIAN_BITFIELD
813  uint64_t qerr:8;
814 #else
817 #endif
818  } s;
826 };
827 
831 #ifdef __BIG_ENDIAN_BITFIELD
833  uint64_t en:8;
834 #else
837 #endif
838  } s;
846 };
847 
851 #ifdef __BIG_ENDIAN_BITFIELD
853  uint64_t qerr:8;
854 #else
857 #endif
858  } s;
866 };
867 
871 #ifdef __BIG_ENDIAN_BITFIELD
873  uint64_t en:8;
874 #else
877 #endif
878  } s;
886 };
887 
891 #ifdef __BIG_ENDIAN_BITFIELD
893  uint64_t en_rst:8;
895  uint64_t en_rsp:8;
896 #else
901 #endif
902  } s;
908 };
909 
913 #ifdef __BIG_ENDIAN_BITFIELD
915  uint64_t qen:8;
916 #else
919 #endif
920  } s;
928 };
929 
933 #ifdef __BIG_ENDIAN_BITFIELD
935  uint64_t halt:1;
936  uint64_t qlm_cfg:4;
938  uint64_t rd_mode:1;
940  uint64_t molr:6;
941  uint64_t mps_lim:1;
943  uint64_t mps:1;
944  uint64_t mrrs_lim:1;
946  uint64_t mrrs:2;
947 #else
961 #endif
962  } s;
965 #ifdef __BIG_ENDIAN_BITFIELD
967  uint64_t halt:1;
969  uint64_t qlm_cfg:1;
971  uint64_t rd_mode:1;
973  uint64_t molr:6;
974  uint64_t mps_lim:1;
976  uint64_t mps:1;
977  uint64_t mrrs_lim:1;
979  uint64_t mrrs:2;
980 #else
995 #endif
996  } cn63xx;
1002 };
1003 
1007 #ifdef __BIG_ENDIAN_BITFIELD
1008  uint64_t addr:61;
1010 #else
1013 #endif
1014  } s;
1022 };
1023 
1027 #ifdef __BIG_ENDIAN_BITFIELD
1029  uint64_t lock:1;
1031  uint64_t type:1;
1033  uint64_t reqq:3;
1034 #else
1041 #endif
1042  } s;
1050 };
1051 
1052 #endif