cvmx-srxx-defs.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: support@caviumnetworks.com
  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. #ifndef __CVMX_SRXX_DEFS_H__
  28. #define __CVMX_SRXX_DEFS_H__
  29. #define CVMX_SRXX_COM_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000200ull) + ((block_id) & 1) * 0x8000000ull)
  30. #define CVMX_SRXX_IGN_RX_FULL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000218ull) + ((block_id) & 1) * 0x8000000ull)
  31. #define CVMX_SRXX_SPI4_CALX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180090000000ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
  32. #define CVMX_SRXX_SPI4_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000208ull) + ((block_id) & 1) * 0x8000000ull)
  33. #define CVMX_SRXX_SW_TICK_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000220ull) + ((block_id) & 1) * 0x8000000ull)
  34. #define CVMX_SRXX_SW_TICK_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000228ull) + ((block_id) & 1) * 0x8000000ull)
  35. union cvmx_srxx_com_ctl {
  36. uint64_t u64;
  37. struct cvmx_srxx_com_ctl_s {
  38. #ifdef __BIG_ENDIAN_BITFIELD
  39. uint64_t reserved_8_63:56;
  40. uint64_t prts:4;
  41. uint64_t st_en:1;
  42. uint64_t reserved_1_2:2;
  43. uint64_t inf_en:1;
  44. #else
  45. uint64_t inf_en:1;
  46. uint64_t reserved_1_2:2;
  47. uint64_t st_en:1;
  48. uint64_t prts:4;
  49. uint64_t reserved_8_63:56;
  50. #endif
  51. } s;
  52. struct cvmx_srxx_com_ctl_s cn38xx;
  53. struct cvmx_srxx_com_ctl_s cn38xxp2;
  54. struct cvmx_srxx_com_ctl_s cn58xx;
  55. struct cvmx_srxx_com_ctl_s cn58xxp1;
  56. };
  57. union cvmx_srxx_ign_rx_full {
  58. uint64_t u64;
  59. struct cvmx_srxx_ign_rx_full_s {
  60. #ifdef __BIG_ENDIAN_BITFIELD
  61. uint64_t reserved_16_63:48;
  62. uint64_t ignore:16;
  63. #else
  64. uint64_t ignore:16;
  65. uint64_t reserved_16_63:48;
  66. #endif
  67. } s;
  68. struct cvmx_srxx_ign_rx_full_s cn38xx;
  69. struct cvmx_srxx_ign_rx_full_s cn38xxp2;
  70. struct cvmx_srxx_ign_rx_full_s cn58xx;
  71. struct cvmx_srxx_ign_rx_full_s cn58xxp1;
  72. };
  73. union cvmx_srxx_spi4_calx {
  74. uint64_t u64;
  75. struct cvmx_srxx_spi4_calx_s {
  76. #ifdef __BIG_ENDIAN_BITFIELD
  77. uint64_t reserved_17_63:47;
  78. uint64_t oddpar:1;
  79. uint64_t prt3:4;
  80. uint64_t prt2:4;
  81. uint64_t prt1:4;
  82. uint64_t prt0:4;
  83. #else
  84. uint64_t prt0:4;
  85. uint64_t prt1:4;
  86. uint64_t prt2:4;
  87. uint64_t prt3:4;
  88. uint64_t oddpar:1;
  89. uint64_t reserved_17_63:47;
  90. #endif
  91. } s;
  92. struct cvmx_srxx_spi4_calx_s cn38xx;
  93. struct cvmx_srxx_spi4_calx_s cn38xxp2;
  94. struct cvmx_srxx_spi4_calx_s cn58xx;
  95. struct cvmx_srxx_spi4_calx_s cn58xxp1;
  96. };
  97. union cvmx_srxx_spi4_stat {
  98. uint64_t u64;
  99. struct cvmx_srxx_spi4_stat_s {
  100. #ifdef __BIG_ENDIAN_BITFIELD
  101. uint64_t reserved_16_63:48;
  102. uint64_t m:8;
  103. uint64_t reserved_7_7:1;
  104. uint64_t len:7;
  105. #else
  106. uint64_t len:7;
  107. uint64_t reserved_7_7:1;
  108. uint64_t m:8;
  109. uint64_t reserved_16_63:48;
  110. #endif
  111. } s;
  112. struct cvmx_srxx_spi4_stat_s cn38xx;
  113. struct cvmx_srxx_spi4_stat_s cn38xxp2;
  114. struct cvmx_srxx_spi4_stat_s cn58xx;
  115. struct cvmx_srxx_spi4_stat_s cn58xxp1;
  116. };
  117. union cvmx_srxx_sw_tick_ctl {
  118. uint64_t u64;
  119. struct cvmx_srxx_sw_tick_ctl_s {
  120. #ifdef __BIG_ENDIAN_BITFIELD
  121. uint64_t reserved_14_63:50;
  122. uint64_t eop:1;
  123. uint64_t sop:1;
  124. uint64_t mod:4;
  125. uint64_t opc:4;
  126. uint64_t adr:4;
  127. #else
  128. uint64_t adr:4;
  129. uint64_t opc:4;
  130. uint64_t mod:4;
  131. uint64_t sop:1;
  132. uint64_t eop:1;
  133. uint64_t reserved_14_63:50;
  134. #endif
  135. } s;
  136. struct cvmx_srxx_sw_tick_ctl_s cn38xx;
  137. struct cvmx_srxx_sw_tick_ctl_s cn58xx;
  138. struct cvmx_srxx_sw_tick_ctl_s cn58xxp1;
  139. };
  140. union cvmx_srxx_sw_tick_dat {
  141. uint64_t u64;
  142. struct cvmx_srxx_sw_tick_dat_s {
  143. #ifdef __BIG_ENDIAN_BITFIELD
  144. uint64_t dat:64;
  145. #else
  146. uint64_t dat:64;
  147. #endif
  148. } s;
  149. struct cvmx_srxx_sw_tick_dat_s cn38xx;
  150. struct cvmx_srxx_sw_tick_dat_s cn58xx;
  151. struct cvmx_srxx_sw_tick_dat_s cn58xxp1;
  152. };
  153. #endif