tcl_status_ring.h 9.3 KB

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