tcl_status_ring.h 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _TCL_STATUS_RING_H_
  16. #define _TCL_STATUS_RING_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_TCL_STATUS_RING 8
  20. struct tcl_status_ring {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t gse_ctrl : 4,
  23. ase_fse_sel : 1,
  24. cache_op_res : 2,
  25. index_search_en : 1,
  26. msdu_cnt_n : 24;
  27. uint32_t msdu_byte_cnt_n : 32;
  28. uint32_t msdu_timestmp_n : 32;
  29. uint32_t cmd_meta_data_31_0 : 32;
  30. uint32_t cmd_meta_data_63_32 : 32;
  31. uint32_t hash_indx_val : 20,
  32. cache_set_num : 4,
  33. reserved_5a : 8;
  34. uint32_t reserved_6a : 32;
  35. uint32_t reserved_7a : 20,
  36. ring_id : 8,
  37. looping_count : 4;
  38. #else
  39. uint32_t msdu_cnt_n : 24,
  40. index_search_en : 1,
  41. cache_op_res : 2,
  42. ase_fse_sel : 1,
  43. gse_ctrl : 4;
  44. uint32_t msdu_byte_cnt_n : 32;
  45. uint32_t msdu_timestmp_n : 32;
  46. uint32_t cmd_meta_data_31_0 : 32;
  47. uint32_t cmd_meta_data_63_32 : 32;
  48. uint32_t reserved_5a : 8,
  49. cache_set_num : 4,
  50. hash_indx_val : 20;
  51. uint32_t reserved_6a : 32;
  52. uint32_t looping_count : 4,
  53. ring_id : 8,
  54. reserved_7a : 20;
  55. #endif
  56. };
  57. #define TCL_STATUS_RING_GSE_CTRL_OFFSET 0x00000000
  58. #define TCL_STATUS_RING_GSE_CTRL_LSB 0
  59. #define TCL_STATUS_RING_GSE_CTRL_MSB 3
  60. #define TCL_STATUS_RING_GSE_CTRL_MASK 0x0000000f
  61. #define TCL_STATUS_RING_ASE_FSE_SEL_OFFSET 0x00000000
  62. #define TCL_STATUS_RING_ASE_FSE_SEL_LSB 4
  63. #define TCL_STATUS_RING_ASE_FSE_SEL_MSB 4
  64. #define TCL_STATUS_RING_ASE_FSE_SEL_MASK 0x00000010
  65. #define TCL_STATUS_RING_CACHE_OP_RES_OFFSET 0x00000000
  66. #define TCL_STATUS_RING_CACHE_OP_RES_LSB 5
  67. #define TCL_STATUS_RING_CACHE_OP_RES_MSB 6
  68. #define TCL_STATUS_RING_CACHE_OP_RES_MASK 0x00000060
  69. #define TCL_STATUS_RING_INDEX_SEARCH_EN_OFFSET 0x00000000
  70. #define TCL_STATUS_RING_INDEX_SEARCH_EN_LSB 7
  71. #define TCL_STATUS_RING_INDEX_SEARCH_EN_MSB 7
  72. #define TCL_STATUS_RING_INDEX_SEARCH_EN_MASK 0x00000080
  73. #define TCL_STATUS_RING_MSDU_CNT_N_OFFSET 0x00000000
  74. #define TCL_STATUS_RING_MSDU_CNT_N_LSB 8
  75. #define TCL_STATUS_RING_MSDU_CNT_N_MSB 31
  76. #define TCL_STATUS_RING_MSDU_CNT_N_MASK 0xffffff00
  77. #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_OFFSET 0x00000004
  78. #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_LSB 0
  79. #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_MSB 31
  80. #define TCL_STATUS_RING_MSDU_BYTE_CNT_N_MASK 0xffffffff
  81. #define TCL_STATUS_RING_MSDU_TIMESTMP_N_OFFSET 0x00000008
  82. #define TCL_STATUS_RING_MSDU_TIMESTMP_N_LSB 0
  83. #define TCL_STATUS_RING_MSDU_TIMESTMP_N_MSB 31
  84. #define TCL_STATUS_RING_MSDU_TIMESTMP_N_MASK 0xffffffff
  85. #define TCL_STATUS_RING_CMD_META_DATA_31_0_OFFSET 0x0000000c
  86. #define TCL_STATUS_RING_CMD_META_DATA_31_0_LSB 0
  87. #define TCL_STATUS_RING_CMD_META_DATA_31_0_MSB 31
  88. #define TCL_STATUS_RING_CMD_META_DATA_31_0_MASK 0xffffffff
  89. #define TCL_STATUS_RING_CMD_META_DATA_63_32_OFFSET 0x00000010
  90. #define TCL_STATUS_RING_CMD_META_DATA_63_32_LSB 0
  91. #define TCL_STATUS_RING_CMD_META_DATA_63_32_MSB 31
  92. #define TCL_STATUS_RING_CMD_META_DATA_63_32_MASK 0xffffffff
  93. #define TCL_STATUS_RING_HASH_INDX_VAL_OFFSET 0x00000014
  94. #define TCL_STATUS_RING_HASH_INDX_VAL_LSB 0
  95. #define TCL_STATUS_RING_HASH_INDX_VAL_MSB 19
  96. #define TCL_STATUS_RING_HASH_INDX_VAL_MASK 0x000fffff
  97. #define TCL_STATUS_RING_CACHE_SET_NUM_OFFSET 0x00000014
  98. #define TCL_STATUS_RING_CACHE_SET_NUM_LSB 20
  99. #define TCL_STATUS_RING_CACHE_SET_NUM_MSB 23
  100. #define TCL_STATUS_RING_CACHE_SET_NUM_MASK 0x00f00000
  101. #define TCL_STATUS_RING_RESERVED_5A_OFFSET 0x00000014
  102. #define TCL_STATUS_RING_RESERVED_5A_LSB 24
  103. #define TCL_STATUS_RING_RESERVED_5A_MSB 31
  104. #define TCL_STATUS_RING_RESERVED_5A_MASK 0xff000000
  105. #define TCL_STATUS_RING_RESERVED_6A_OFFSET 0x00000018
  106. #define TCL_STATUS_RING_RESERVED_6A_LSB 0
  107. #define TCL_STATUS_RING_RESERVED_6A_MSB 31
  108. #define TCL_STATUS_RING_RESERVED_6A_MASK 0xffffffff
  109. #define TCL_STATUS_RING_RESERVED_7A_OFFSET 0x0000001c
  110. #define TCL_STATUS_RING_RESERVED_7A_LSB 0
  111. #define TCL_STATUS_RING_RESERVED_7A_MSB 19
  112. #define TCL_STATUS_RING_RESERVED_7A_MASK 0x000fffff
  113. #define TCL_STATUS_RING_RING_ID_OFFSET 0x0000001c
  114. #define TCL_STATUS_RING_RING_ID_LSB 20
  115. #define TCL_STATUS_RING_RING_ID_MSB 27
  116. #define TCL_STATUS_RING_RING_ID_MASK 0x0ff00000
  117. #define TCL_STATUS_RING_LOOPING_COUNT_OFFSET 0x0000001c
  118. #define TCL_STATUS_RING_LOOPING_COUNT_LSB 28
  119. #define TCL_STATUS_RING_LOOPING_COUNT_MSB 31
  120. #define TCL_STATUS_RING_LOOPING_COUNT_MASK 0xf0000000
  121. #endif