cvmx-srxx-defs.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. #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. };
  53. union cvmx_srxx_ign_rx_full {
  54. uint64_t u64;
  55. struct cvmx_srxx_ign_rx_full_s {
  56. #ifdef __BIG_ENDIAN_BITFIELD
  57. uint64_t reserved_16_63:48;
  58. uint64_t ignore:16;
  59. #else
  60. uint64_t ignore:16;
  61. uint64_t reserved_16_63:48;
  62. #endif
  63. } s;
  64. };
  65. union cvmx_srxx_spi4_calx {
  66. uint64_t u64;
  67. struct cvmx_srxx_spi4_calx_s {
  68. #ifdef __BIG_ENDIAN_BITFIELD
  69. uint64_t reserved_17_63:47;
  70. uint64_t oddpar:1;
  71. uint64_t prt3:4;
  72. uint64_t prt2:4;
  73. uint64_t prt1:4;
  74. uint64_t prt0:4;
  75. #else
  76. uint64_t prt0:4;
  77. uint64_t prt1:4;
  78. uint64_t prt2:4;
  79. uint64_t prt3:4;
  80. uint64_t oddpar:1;
  81. uint64_t reserved_17_63:47;
  82. #endif
  83. } s;
  84. };
  85. union cvmx_srxx_spi4_stat {
  86. uint64_t u64;
  87. struct cvmx_srxx_spi4_stat_s {
  88. #ifdef __BIG_ENDIAN_BITFIELD
  89. uint64_t reserved_16_63:48;
  90. uint64_t m:8;
  91. uint64_t reserved_7_7:1;
  92. uint64_t len:7;
  93. #else
  94. uint64_t len:7;
  95. uint64_t reserved_7_7:1;
  96. uint64_t m:8;
  97. uint64_t reserved_16_63:48;
  98. #endif
  99. } s;
  100. };
  101. union cvmx_srxx_sw_tick_ctl {
  102. uint64_t u64;
  103. struct cvmx_srxx_sw_tick_ctl_s {
  104. #ifdef __BIG_ENDIAN_BITFIELD
  105. uint64_t reserved_14_63:50;
  106. uint64_t eop:1;
  107. uint64_t sop:1;
  108. uint64_t mod:4;
  109. uint64_t opc:4;
  110. uint64_t adr:4;
  111. #else
  112. uint64_t adr:4;
  113. uint64_t opc:4;
  114. uint64_t mod:4;
  115. uint64_t sop:1;
  116. uint64_t eop:1;
  117. uint64_t reserved_14_63:50;
  118. #endif
  119. } s;
  120. };
  121. union cvmx_srxx_sw_tick_dat {
  122. uint64_t u64;
  123. struct cvmx_srxx_sw_tick_dat_s {
  124. #ifdef __BIG_ENDIAN_BITFIELD
  125. uint64_t dat:64;
  126. #else
  127. uint64_t dat:64;
  128. #endif
  129. } s;
  130. };
  131. #endif