tcl_gse_cmd.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*
  2. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _TCL_GSE_CMD_H_
  19. #define _TCL_GSE_CMD_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #define NUM_OF_DWORDS_TCL_GSE_CMD 8
  23. struct tcl_gse_cmd {
  24. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  25. uint32_t control_buffer_addr_31_0 : 32;
  26. uint32_t control_buffer_addr_39_32 : 8,
  27. gse_ctrl : 4,
  28. gse_sel : 1,
  29. status_destination_ring_id : 1,
  30. swap : 1,
  31. index_search_en : 1,
  32. cache_set_num : 4,
  33. reserved_1a : 12;
  34. uint32_t tcl_cmd_type : 1,
  35. reserved_2a : 31;
  36. uint32_t cmd_meta_data_31_0 : 32;
  37. uint32_t cmd_meta_data_63_32 : 32;
  38. uint32_t reserved_5a : 32;
  39. uint32_t reserved_6a : 32;
  40. uint32_t reserved_7a : 20,
  41. ring_id : 8,
  42. looping_count : 4;
  43. #else
  44. uint32_t control_buffer_addr_31_0 : 32;
  45. uint32_t reserved_1a : 12,
  46. cache_set_num : 4,
  47. index_search_en : 1,
  48. swap : 1,
  49. status_destination_ring_id : 1,
  50. gse_sel : 1,
  51. gse_ctrl : 4,
  52. control_buffer_addr_39_32 : 8;
  53. uint32_t reserved_2a : 31,
  54. tcl_cmd_type : 1;
  55. uint32_t cmd_meta_data_31_0 : 32;
  56. uint32_t cmd_meta_data_63_32 : 32;
  57. uint32_t reserved_5a : 32;
  58. uint32_t reserved_6a : 32;
  59. uint32_t looping_count : 4,
  60. ring_id : 8,
  61. reserved_7a : 20;
  62. #endif
  63. };
  64. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_31_0_OFFSET 0x00000000
  65. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_31_0_LSB 0
  66. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_31_0_MSB 31
  67. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_31_0_MASK 0xffffffff
  68. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_39_32_OFFSET 0x00000004
  69. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_39_32_LSB 0
  70. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_39_32_MSB 7
  71. #define TCL_GSE_CMD_CONTROL_BUFFER_ADDR_39_32_MASK 0x000000ff
  72. #define TCL_GSE_CMD_GSE_CTRL_OFFSET 0x00000004
  73. #define TCL_GSE_CMD_GSE_CTRL_LSB 8
  74. #define TCL_GSE_CMD_GSE_CTRL_MSB 11
  75. #define TCL_GSE_CMD_GSE_CTRL_MASK 0x00000f00
  76. #define TCL_GSE_CMD_GSE_SEL_OFFSET 0x00000004
  77. #define TCL_GSE_CMD_GSE_SEL_LSB 12
  78. #define TCL_GSE_CMD_GSE_SEL_MSB 12
  79. #define TCL_GSE_CMD_GSE_SEL_MASK 0x00001000
  80. #define TCL_GSE_CMD_STATUS_DESTINATION_RING_ID_OFFSET 0x00000004
  81. #define TCL_GSE_CMD_STATUS_DESTINATION_RING_ID_LSB 13
  82. #define TCL_GSE_CMD_STATUS_DESTINATION_RING_ID_MSB 13
  83. #define TCL_GSE_CMD_STATUS_DESTINATION_RING_ID_MASK 0x00002000
  84. #define TCL_GSE_CMD_SWAP_OFFSET 0x00000004
  85. #define TCL_GSE_CMD_SWAP_LSB 14
  86. #define TCL_GSE_CMD_SWAP_MSB 14
  87. #define TCL_GSE_CMD_SWAP_MASK 0x00004000
  88. #define TCL_GSE_CMD_INDEX_SEARCH_EN_OFFSET 0x00000004
  89. #define TCL_GSE_CMD_INDEX_SEARCH_EN_LSB 15
  90. #define TCL_GSE_CMD_INDEX_SEARCH_EN_MSB 15
  91. #define TCL_GSE_CMD_INDEX_SEARCH_EN_MASK 0x00008000
  92. #define TCL_GSE_CMD_CACHE_SET_NUM_OFFSET 0x00000004
  93. #define TCL_GSE_CMD_CACHE_SET_NUM_LSB 16
  94. #define TCL_GSE_CMD_CACHE_SET_NUM_MSB 19
  95. #define TCL_GSE_CMD_CACHE_SET_NUM_MASK 0x000f0000
  96. #define TCL_GSE_CMD_RESERVED_1A_OFFSET 0x00000004
  97. #define TCL_GSE_CMD_RESERVED_1A_LSB 20
  98. #define TCL_GSE_CMD_RESERVED_1A_MSB 31
  99. #define TCL_GSE_CMD_RESERVED_1A_MASK 0xfff00000
  100. #define TCL_GSE_CMD_TCL_CMD_TYPE_OFFSET 0x00000008
  101. #define TCL_GSE_CMD_TCL_CMD_TYPE_LSB 0
  102. #define TCL_GSE_CMD_TCL_CMD_TYPE_MSB 0
  103. #define TCL_GSE_CMD_TCL_CMD_TYPE_MASK 0x00000001
  104. #define TCL_GSE_CMD_RESERVED_2A_OFFSET 0x00000008
  105. #define TCL_GSE_CMD_RESERVED_2A_LSB 1
  106. #define TCL_GSE_CMD_RESERVED_2A_MSB 31
  107. #define TCL_GSE_CMD_RESERVED_2A_MASK 0xfffffffe
  108. #define TCL_GSE_CMD_CMD_META_DATA_31_0_OFFSET 0x0000000c
  109. #define TCL_GSE_CMD_CMD_META_DATA_31_0_LSB 0
  110. #define TCL_GSE_CMD_CMD_META_DATA_31_0_MSB 31
  111. #define TCL_GSE_CMD_CMD_META_DATA_31_0_MASK 0xffffffff
  112. #define TCL_GSE_CMD_CMD_META_DATA_63_32_OFFSET 0x00000010
  113. #define TCL_GSE_CMD_CMD_META_DATA_63_32_LSB 0
  114. #define TCL_GSE_CMD_CMD_META_DATA_63_32_MSB 31
  115. #define TCL_GSE_CMD_CMD_META_DATA_63_32_MASK 0xffffffff
  116. #define TCL_GSE_CMD_RESERVED_5A_OFFSET 0x00000014
  117. #define TCL_GSE_CMD_RESERVED_5A_LSB 0
  118. #define TCL_GSE_CMD_RESERVED_5A_MSB 31
  119. #define TCL_GSE_CMD_RESERVED_5A_MASK 0xffffffff
  120. #define TCL_GSE_CMD_RESERVED_6A_OFFSET 0x00000018
  121. #define TCL_GSE_CMD_RESERVED_6A_LSB 0
  122. #define TCL_GSE_CMD_RESERVED_6A_MSB 31
  123. #define TCL_GSE_CMD_RESERVED_6A_MASK 0xffffffff
  124. #define TCL_GSE_CMD_RESERVED_7A_OFFSET 0x0000001c
  125. #define TCL_GSE_CMD_RESERVED_7A_LSB 0
  126. #define TCL_GSE_CMD_RESERVED_7A_MSB 19
  127. #define TCL_GSE_CMD_RESERVED_7A_MASK 0x000fffff
  128. #define TCL_GSE_CMD_RING_ID_OFFSET 0x0000001c
  129. #define TCL_GSE_CMD_RING_ID_LSB 20
  130. #define TCL_GSE_CMD_RING_ID_MSB 27
  131. #define TCL_GSE_CMD_RING_ID_MASK 0x0ff00000
  132. #define TCL_GSE_CMD_LOOPING_COUNT_OFFSET 0x0000001c
  133. #define TCL_GSE_CMD_LOOPING_COUNT_LSB 28
  134. #define TCL_GSE_CMD_LOOPING_COUNT_MSB 31
  135. #define TCL_GSE_CMD_LOOPING_COUNT_MASK 0xf0000000
  136. #endif