cvmx-srxx-defs.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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-2008 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) \
  30. CVMX_ADD_IO_SEG(0x0001180090000200ull + (((block_id) & 1) * 0x8000000ull))
  31. #define CVMX_SRXX_IGN_RX_FULL(block_id) \
  32. CVMX_ADD_IO_SEG(0x0001180090000218ull + (((block_id) & 1) * 0x8000000ull))
  33. #define CVMX_SRXX_SPI4_CALX(offset, block_id) \
  34. CVMX_ADD_IO_SEG(0x0001180090000000ull + (((offset) & 31) * 8) + (((block_id) & 1) * 0x8000000ull))
  35. #define CVMX_SRXX_SPI4_STAT(block_id) \
  36. CVMX_ADD_IO_SEG(0x0001180090000208ull + (((block_id) & 1) * 0x8000000ull))
  37. #define CVMX_SRXX_SW_TICK_CTL(block_id) \
  38. CVMX_ADD_IO_SEG(0x0001180090000220ull + (((block_id) & 1) * 0x8000000ull))
  39. #define CVMX_SRXX_SW_TICK_DAT(block_id) \
  40. CVMX_ADD_IO_SEG(0x0001180090000228ull + (((block_id) & 1) * 0x8000000ull))
  41. union cvmx_srxx_com_ctl {
  42. uint64_t u64;
  43. struct cvmx_srxx_com_ctl_s {
  44. uint64_t reserved_8_63:56;
  45. uint64_t prts:4;
  46. uint64_t st_en:1;
  47. uint64_t reserved_1_2:2;
  48. uint64_t inf_en:1;
  49. } s;
  50. struct cvmx_srxx_com_ctl_s cn38xx;
  51. struct cvmx_srxx_com_ctl_s cn38xxp2;
  52. struct cvmx_srxx_com_ctl_s cn58xx;
  53. struct cvmx_srxx_com_ctl_s cn58xxp1;
  54. };
  55. union cvmx_srxx_ign_rx_full {
  56. uint64_t u64;
  57. struct cvmx_srxx_ign_rx_full_s {
  58. uint64_t reserved_16_63:48;
  59. uint64_t ignore:16;
  60. } s;
  61. struct cvmx_srxx_ign_rx_full_s cn38xx;
  62. struct cvmx_srxx_ign_rx_full_s cn38xxp2;
  63. struct cvmx_srxx_ign_rx_full_s cn58xx;
  64. struct cvmx_srxx_ign_rx_full_s cn58xxp1;
  65. };
  66. union cvmx_srxx_spi4_calx {
  67. uint64_t u64;
  68. struct cvmx_srxx_spi4_calx_s {
  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. } s;
  76. struct cvmx_srxx_spi4_calx_s cn38xx;
  77. struct cvmx_srxx_spi4_calx_s cn38xxp2;
  78. struct cvmx_srxx_spi4_calx_s cn58xx;
  79. struct cvmx_srxx_spi4_calx_s cn58xxp1;
  80. };
  81. union cvmx_srxx_spi4_stat {
  82. uint64_t u64;
  83. struct cvmx_srxx_spi4_stat_s {
  84. uint64_t reserved_16_63:48;
  85. uint64_t m:8;
  86. uint64_t reserved_7_7:1;
  87. uint64_t len:7;
  88. } s;
  89. struct cvmx_srxx_spi4_stat_s cn38xx;
  90. struct cvmx_srxx_spi4_stat_s cn38xxp2;
  91. struct cvmx_srxx_spi4_stat_s cn58xx;
  92. struct cvmx_srxx_spi4_stat_s cn58xxp1;
  93. };
  94. union cvmx_srxx_sw_tick_ctl {
  95. uint64_t u64;
  96. struct cvmx_srxx_sw_tick_ctl_s {
  97. uint64_t reserved_14_63:50;
  98. uint64_t eop:1;
  99. uint64_t sop:1;
  100. uint64_t mod:4;
  101. uint64_t opc:4;
  102. uint64_t adr:4;
  103. } s;
  104. struct cvmx_srxx_sw_tick_ctl_s cn38xx;
  105. struct cvmx_srxx_sw_tick_ctl_s cn58xx;
  106. struct cvmx_srxx_sw_tick_ctl_s cn58xxp1;
  107. };
  108. union cvmx_srxx_sw_tick_dat {
  109. uint64_t u64;
  110. struct cvmx_srxx_sw_tick_dat_s {
  111. uint64_t dat:64;
  112. } s;
  113. struct cvmx_srxx_sw_tick_dat_s cn38xx;
  114. struct cvmx_srxx_sw_tick_dat_s cn58xx;
  115. struct cvmx_srxx_sw_tick_dat_s cn58xxp1;
  116. };
  117. #endif