hal_hw_headers.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #ifndef _HAL_HW_INTERNAL_H_
  20. #define _HAL_HW_INTERNAL_H_
  21. #include "qdf_types.h"
  22. #include "qdf_lock.h"
  23. #include "qdf_mem.h"
  24. #include "qdf_trace.h"
  25. #include "rx_msdu_link.h"
  26. #include "rx_reo_queue.h"
  27. #include "rx_reo_queue_ext.h"
  28. #include "wcss_seq_hwiobase.h"
  29. #include "tlv_hdr.h"
  30. #include "tlv_tag_def.h"
  31. #include "reo_destination_ring.h"
  32. #include "reo_entrance_ring.h"
  33. #include "reo_get_queue_stats.h"
  34. #include "reo_get_queue_stats_status.h"
  35. #include "tcl_data_cmd.h"
  36. #include "tcl_gse_cmd.h"
  37. #include "tcl_status_ring.h"
  38. #include "ce_src_desc.h"
  39. #include "ce_stat_desc.h"
  40. #include "wbm_link_descriptor_ring.h"
  41. #include "wbm_buffer_ring.h"
  42. #include "wbm_release_ring.h"
  43. #include "rx_msdu_desc_info.h"
  44. #include "rx_mpdu_start.h"
  45. #include "rx_mpdu_end.h"
  46. #include "rx_msdu_start.h"
  47. #include "rx_msdu_end.h"
  48. #include "rx_attention.h"
  49. #include "rx_ppdu_start.h"
  50. #include "rx_ppdu_start_user_info.h"
  51. #include "rx_ppdu_end_user_stats.h"
  52. #include "rx_ppdu_end_user_stats_ext.h"
  53. #include "rx_mpdu_desc_info.h"
  54. #include "rxpcu_ppdu_end_info.h"
  55. #include "phyrx_he_sig_a_su.h"
  56. #include "phyrx_he_sig_a_mu_dl.h"
  57. #if defined(QCA_WIFI_QCA6290_11AX_MU_UL) && defined(QCA_WIFI_QCA6290_11AX)
  58. #include "phyrx_he_sig_a_mu_ul.h"
  59. #endif
  60. #include "phyrx_he_sig_b1_mu.h"
  61. #include "phyrx_he_sig_b2_mu.h"
  62. #include "phyrx_he_sig_b2_ofdma.h"
  63. #include "phyrx_l_sig_a.h"
  64. #include "phyrx_l_sig_b.h"
  65. #include "phyrx_vht_sig_a.h"
  66. #include "phyrx_ht_sig.h"
  67. #include "tx_msdu_extension.h"
  68. #include "receive_rssi_info.h"
  69. #include "phyrx_pkt_end.h"
  70. #include "phyrx_rssi_legacy.h"
  71. #include "wcss_version.h"
  72. #include "rx_msdu_link.h"
  73. #include "hal_internal.h"
  74. #define HAL_SRNG_REO_EXCEPTION HAL_SRNG_REO2SW1
  75. #define HAL_SRNG_REO_ALTERNATE_SELECT 0x7
  76. #define HAL_NON_QOS_TID 16
  77. /* TODO: Check if the following can be provided directly by HW headers */
  78. #define SRNG_LOOP_CNT_MASK REO_DESTINATION_RING_15_LOOPING_COUNT_MASK
  79. #define SRNG_LOOP_CNT_LSB REO_DESTINATION_RING_15_LOOPING_COUNT_LSB
  80. #define HAL_REO_R0_REO2SW1_RING_MSI1_BASE_MSB_ADDR_SHFT 0x0
  81. #define HAL_REO_R0_REO2SW1_RING_MSI1_BASE_MSB_ADDR_BMSK 0xff
  82. #define HAL_REO_R0_REO2SW1_RING_MSI1_BASE_MSB_MSI1_ENABLE_SHFT 0x8
  83. #define HAL_REO_R0_REO2SW1_RING_MSI1_BASE_MSB_MSI1_ENABLE_BMSK 0x100
  84. #define HAL_REO_R0_REO2SW1_RING_MSI2_BASE_MSB_ADDR_SHFT 0x0
  85. #define HAL_REO_R0_REO2SW1_RING_MSI2_BASE_MSB_ADDR_BMSK 0xff
  86. #define HAL_REO_R0_REO2SW1_RING_MSI2_BASE_MSB_MSI2_ENABLE_SHFT 0x8
  87. #define HAL_REO_R0_REO2SW1_RING_MSI2_BASE_MSB_MSI2_ENABLE_BMSK 0x100
  88. #define HAL_REO_R0_REO2SW1_RING_BASE_MSB_RING_BASE_ADDR_MSB_SHFT 0x0
  89. #define HAL_REO_R0_REO2SW1_RING_BASE_MSB_RING_BASE_ADDR_MSB_BMSK 0xff
  90. #define HAL_REO_R0_REO2SW1_RING_BASE_MSB_RING_SIZE_SHFT 0x8
  91. #define HAL_REO_R0_REO2SW1_RING_BASE_MSB_RING_SIZE_BMSK 0xfffff00
  92. #define HAL_REO_R0_REO2SW1_RING_ID_RING_ID_SHFT 0x8
  93. #define HAL_REO_R0_REO2SW1_RING_ID_RING_ID_BMSK 0x0000ff00
  94. #define HAL_REO_R0_REO2SW1_RING_ID_ENTRY_SIZE_SHFT 0x0
  95. #define HAL_REO_R0_REO2SW1_RING_ID_ENTRY_SIZE_BMSK 0xff
  96. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT_SETUP_INTERRUPT_TIMER_THRESHOLD_SHFT 0x10
  97. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT_SETUP_INTERRUPT_TIMER_THRESHOLD_BMSK 0xffff0000
  98. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT_SETUP_BATCH_COUNTER_THRESHOLD_SHFT 0x0
  99. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT_SETUP_BATCH_COUNTER_THRESHOLD_BMSK 0x00007fff
  100. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT2_SETUP_INTERRUPT2_TIMER_THRESHOLD_SHFT 24
  101. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT2_SETUP_INTERRUPT2_TIMER_THRESHOLD_BMSK 0xff000000
  102. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT2_SETUP_HIGH_THRESHOLD_SHFT 0
  103. #define HAL_REO_R0_REO2SW1_RING_PRODUCER_INT2_SETUP_HIGH_THRESHOLD_BMSK 0xfffff
  104. #define HAL_REO_R0_REO2SW1_RING_MISC_DATA_TLV_SWAP_BIT_SHFT 0x5
  105. #define HAL_REO_R0_REO2SW1_RING_MISC_DATA_TLV_SWAP_BIT_BMSK 0x20
  106. #define HAL_REO_R0_REO2SW1_RING_MISC_HOST_FW_SWAP_BIT_SHFT 0x4
  107. #define HAL_REO_R0_REO2SW1_RING_MISC_HOST_FW_SWAP_BIT_BMSK 0x10
  108. #define HAL_REO_R0_REO2SW1_RING_MISC_MSI_SWAP_BIT_SHFT 0x3
  109. #define HAL_REO_R0_REO2SW1_RING_MISC_MSI_SWAP_BIT_BMSK 0x8
  110. /* HAL Macro to get the buffer info size */
  111. #define HAL_RX_BUFFINFO_NUM_DWORDS NUM_OF_DWORDS_BUFFER_ADDR_INFO
  112. #define HAL_DEFAULT_BE_BK_VI_REO_TIMEOUT_MS 100 /* milliseconds */
  113. #define HAL_DEFAULT_VO_REO_TIMEOUT_MS 40 /* milliseconds */
  114. #define HAL_DESC_SET_FIELD(_desc, _word, _fld, _value) do { \
  115. ((uint32_t *)(_desc))[(_word ## _ ## _fld ## _OFFSET) >> 2] &= \
  116. ~(_word ## _ ## _fld ## _MASK); \
  117. ((uint32_t *)(_desc))[(_word ## _ ## _fld ## _OFFSET) >> 2] |= \
  118. ((_value) << _word ## _ ## _fld ## _LSB); \
  119. } while (0)
  120. #define HAL_SM(_reg, _fld, _val) \
  121. (((_val) << (_reg ## _ ## _fld ## _SHFT)) & \
  122. (_reg ## _ ## _fld ## _BMSK))
  123. #define HAL_MS(_reg, _fld, _val) \
  124. (((_val) & (_reg ## _ ## _fld ## _BMSK)) >> \
  125. (_reg ## _ ## _fld ## _SHFT))
  126. #define HAL_REG_WRITE(_soc, _reg, _value) \
  127. hal_write32_mb(_soc, (_reg), (_value))
  128. /* Check register writing result */
  129. #define HAL_REG_WRITE_CONFIRM(_soc, _reg, _value) \
  130. hal_write32_mb_confirm(_soc, (_reg), (_value))
  131. #define HAL_REG_WRITE_CONFIRM_RETRY(_soc, _reg, _value, _recovery) \
  132. hal_write32_mb_confirm_retry(_soc, (_reg), (_value), (_recovery))
  133. #define HAL_REG_READ(_soc, _offset) \
  134. hal_read32_mb(_soc, (_offset))
  135. #define HAL_CMEM_WRITE(_soc, _reg, _value) \
  136. hal_write32_mb_cmem(_soc, (_reg), (_value))
  137. #define HAL_CMEM_READ(_soc, _offset) \
  138. hal_read32_mb_cmem(_soc, (_offset))
  139. #define WBM_IDLE_DESC_LIST 1
  140. /*
  141. * Common SRNG register access macros:
  142. * The SRNG registers are distributed across various UMAC and LMAC HW blocks,
  143. * but the register group and format is exactly same for all rings, with some
  144. * difference between producer rings (these are 'producer rings' with respect
  145. * to HW and referred as 'destination rings' in SW) and consumer rings (these
  146. * are 'consumer rings' with respect to HW and
  147. * referred as 'source rings' in SW).
  148. * The following macros provide uniform access to all SRNG rings.
  149. */
  150. /* SRNG registers are split among two groups R0 and R2 and following
  151. * definitions identify the group to which each register belongs to
  152. */
  153. #define R0_INDEX 0
  154. #define R2_INDEX 1
  155. #define HWREG_INDEX(_reg_group) _reg_group ## _ ## INDEX
  156. /* Registers in R0 group */
  157. #define BASE_LSB_GROUP R0
  158. #define BASE_MSB_GROUP R0
  159. #define ID_GROUP R0
  160. #define STATUS_GROUP R0
  161. #define MISC_GROUP R0
  162. #define MISC_1_GROUP R0
  163. #define HP_ADDR_LSB_GROUP R0
  164. #define HP_ADDR_MSB_GROUP R0
  165. #define PRODUCER_INT_SETUP_GROUP R0
  166. #define PRODUCER_INT2_SETUP_GROUP R0
  167. #define PRODUCER_INT_STATUS_GROUP R0
  168. #define PRODUCER_FULL_COUNTER_GROUP R0
  169. #define MSI1_BASE_LSB_GROUP R0
  170. #define MSI1_BASE_MSB_GROUP R0
  171. #define MSI1_DATA_GROUP R0
  172. #define MSI2_BASE_LSB_GROUP R0
  173. #define MSI2_BASE_MSB_GROUP R0
  174. #define MSI2_DATA_GROUP R0
  175. #define HP_TP_SW_OFFSET_GROUP R0
  176. #define TP_ADDR_LSB_GROUP R0
  177. #define TP_ADDR_MSB_GROUP R0
  178. #define CONSUMER_INT_SETUP_IX0_GROUP R0
  179. #define CONSUMER_INT_SETUP_IX1_GROUP R0
  180. #define CONSUMER_INT_STATUS_GROUP R0
  181. #define CONSUMER_EMPTY_COUNTER_GROUP R0
  182. #define CONSUMER_PREFETCH_TIMER_GROUP R0
  183. #define CONSUMER_PREFETCH_STATUS_GROUP R0
  184. /* Registers in R2 group */
  185. #define HP_GROUP R2
  186. #define TP_GROUP R2
  187. /*
  188. * Register definitions for all SRNG based rings are same, except few
  189. * differences between source (HW consumer) and destination (HW producer)
  190. * registers. Following macros definitions provide generic access to all
  191. * SRNG based rings.
  192. * For source rings, we will use the register/field definitions of SW2TCL1
  193. * ring defined in the HW header file mac_tcl_reg_seq_hwioreg.h. To setup
  194. * individual fields, SRNG_SM macros should be used with fields specified
  195. * using SRNG_SRC_FLD(<register>, <field>), Register writes should be done
  196. * using SRNG_SRC_REG_WRITE(<hal_srng>, <register>, <value>).
  197. * Similarly for destination rings we will use definitions of REO2SW1 ring
  198. * defined in the register reo_destination_ring.h. To setup individual
  199. * fields SRNG_SM macros should be used with fields specified using
  200. * SRNG_DST_FLD(<register>, <field>). Register writes should be done using
  201. * SRNG_DST_REG_WRITE(<hal_srng>, <register>, <value>).
  202. */
  203. #define SRNG_DST_REG_OFFSET(_reg, _reg_group) \
  204. HWIO_REO_ ## _reg_group ## _REO2SW1_RING_ ## _reg##_ADDR(0)
  205. #define SRNG_SRC_REG_OFFSET(_reg, _reg_group) \
  206. HWIO_TCL_ ## _reg_group ## _SW2TCL1_RING_ ## _reg ## _ADDR(0)
  207. #define _SRNG_DST_FLD(_reg_group, _reg_fld) \
  208. HAL_REO_ ## _reg_group ## _REO2SW1_RING_ ## _reg_fld
  209. #define _SRNG_DST_HW_FLD(_reg_group, _reg_fld) \
  210. HWIO_REO_ ## _reg_group ## _REO2SW1_RING_ ## _reg_fld
  211. #define _SRNG_SRC_FLD(_reg_group, _reg_fld) \
  212. HWIO_TCL_ ## _reg_group ## _SW2TCL1_RING_ ## _reg_fld
  213. #define _SRNG_FLD(_reg_group, _reg_fld, _dir) \
  214. _SRNG_ ## _dir ## _FLD(_reg_group, _reg_fld)
  215. #define _SRNG_HW_FLD(_reg_group, _reg_fld, _dir) \
  216. _SRNG_ ## _dir ## _HW_FLD(_reg_group, _reg_fld)
  217. #define SRNG_DST_FLD(_reg, _f) _SRNG_FLD(_reg ## _GROUP, _reg ## _ ## _f, DST)
  218. #define SRNG_DST_HW_FLD(_reg, _f) \
  219. _SRNG_HW_FLD(_reg ## _GROUP, _reg ## _ ## _f, DST)
  220. #define SRNG_SRC_FLD(_reg, _f) _SRNG_FLD(_reg ## _GROUP, _reg ## _ ## _f, SRC)
  221. #define SRNG_SRC_R0_START_OFFSET SRNG_SRC_REG_OFFSET(BASE_LSB, R0)
  222. #define SRNG_DST_R0_START_OFFSET SRNG_DST_REG_OFFSET(BASE_LSB, R0)
  223. #define SRNG_SRC_R2_START_OFFSET SRNG_SRC_REG_OFFSET(HP, R2)
  224. #define SRNG_DST_R2_START_OFFSET SRNG_DST_REG_OFFSET(HP, R2)
  225. #define SRNG_SRC_START_OFFSET(_reg_group) \
  226. SRNG_SRC_ ## _reg_group ## _START_OFFSET
  227. #define SRNG_DST_START_OFFSET(_reg_group) \
  228. SRNG_DST_ ## _reg_group ## _START_OFFSET
  229. #define SRNG_REG_ADDR(_srng, _reg, _reg_group, _dir) \
  230. ((_srng)->hwreg_base[HWREG_INDEX(_reg_group)] + \
  231. ((_srng)->hal_soc->hal_hw_reg_offset[_dir ## _ ##_reg]))
  232. #define CALCULATE_REG_OFFSET(_dir, _reg, _reg_group) \
  233. (SRNG_ ## _dir ## _REG_OFFSET(_reg, _reg_group) - \
  234. SRNG_ ## _dir ## _START_OFFSET(_reg_group))
  235. #define REG_OFFSET(_dir, _reg) \
  236. CALCULATE_REG_OFFSET(_dir, _reg, _reg ## _GROUP)
  237. #define SRNG_DST_ADDR(_srng, _reg) \
  238. SRNG_REG_ADDR(_srng, _reg, _reg ## _GROUP, DST)
  239. #define SRNG_SRC_ADDR(_srng, _reg) \
  240. SRNG_REG_ADDR(_srng, _reg, _reg ## _GROUP, SRC)
  241. #define SRNG_REG_WRITE(_srng, _reg, _value, _dir) \
  242. hal_write_address_32_mb(_srng->hal_soc,\
  243. SRNG_ ## _dir ## _ADDR(_srng, _reg), (_value), false)
  244. #define SRNG_REG_WRITE_CONFIRM(_srng, _reg, _value, _dir) \
  245. hal_write_address_32_mb(_srng->hal_soc,\
  246. SRNG_ ## _dir ## _ADDR(_srng, _reg), (_value), true)
  247. #define SRNG_REG_READ(_srng, _reg, _dir) \
  248. hal_read_address_32_mb(_srng->hal_soc, \
  249. SRNG_ ## _dir ## _ADDR(_srng, _reg))
  250. #define SRNG_SRC_REG_WRITE(_srng, _reg, _value) \
  251. SRNG_REG_WRITE(_srng, _reg, _value, SRC)
  252. #define SRNG_DST_REG_WRITE(_srng, _reg, _value) \
  253. SRNG_REG_WRITE(_srng, _reg, _value, DST)
  254. #define SRNG_DST_REG_WRITE_CONFIRM(_srng, _reg, _value) \
  255. SRNG_REG_WRITE_CONFIRM(_srng, _reg, _value, DST)
  256. #define SRNG_SRC_REG_READ(_srng, _reg) \
  257. SRNG_REG_READ(_srng, _reg, SRC)
  258. #define SRNG_DST_REG_READ(_srng, _reg) \
  259. SRNG_REG_READ(_srng, _reg, DST)
  260. #define _SRNG_FM(_reg_fld) _reg_fld ## _BMSK
  261. #define _SRNG_FS(_reg_fld) _reg_fld ## _SHFT
  262. #define SRNG_SM(_reg_fld, _val) \
  263. (((_val) << _SRNG_FS(_reg_fld)) & _SRNG_FM(_reg_fld))
  264. #define SRNG_MS(_reg_fld, _val) \
  265. (((_val) & _SRNG_FM(_reg_fld)) >> _SRNG_FS(_reg_fld))
  266. #define SRNG_MAX_SIZE_DWORDS \
  267. (SRNG_MS(SRNG_SRC_FLD(BASE_MSB, RING_SIZE), 0xffffffff))
  268. /*
  269. * HW ring configuration table to identify hardware ring attributes like
  270. * register addresses, number of rings, ring entry size etc., for each type
  271. * of SRNG ring.
  272. *
  273. * Currently there is just one HW ring table, but there could be multiple
  274. * configurations in future based on HW variants from the same wifi3.0 family
  275. * and hence need to be attached with hal_soc based on HW type
  276. */
  277. #define HAL_SRNG_CONFIG(_hal_soc, _ring_type) \
  278. (&_hal_soc->hw_srng_table[_ring_type])
  279. /**
  280. * hal_set_link_desc_addr() - Setup link descriptor in a buffer_addr_info
  281. * HW structure
  282. * @hal_soc_hdl: HAL soc handle
  283. * @desc: Descriptor entry (from WBM_IDLE_LINK ring)
  284. * @cookie: SW cookie for the buffer/descriptor
  285. * @link_desc_paddr: Physical address of link descriptor entry
  286. * @bm_id: idle link BM id
  287. */
  288. static inline void hal_set_link_desc_addr(hal_soc_handle_t hal_soc_hdl,
  289. void *desc, uint32_t cookie,
  290. qdf_dma_addr_t link_desc_paddr,
  291. uint8_t bm_id)
  292. {
  293. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  294. if ((!hal_soc) || (!hal_soc->ops)) {
  295. hal_err("hal handle is NULL");
  296. return;
  297. }
  298. if (hal_soc->ops->hal_set_link_desc_addr)
  299. hal_soc->ops->hal_set_link_desc_addr(desc, cookie,
  300. link_desc_paddr,
  301. bm_id);
  302. }
  303. /**
  304. * hal_get_reo_qdesc_size - Get size of reo queue descriptor
  305. *
  306. * @hal_soc_hdl: Opaque HAL SOC handle
  307. * @ba_window_size: BlockAck window size
  308. * @tid: TID number
  309. *
  310. */
  311. static inline
  312. uint32_t hal_get_reo_qdesc_size(hal_soc_handle_t hal_soc_hdl,
  313. uint32_t ba_window_size, int tid)
  314. {
  315. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  316. if (hal_soc->ops->hal_get_reo_qdesc_size)
  317. return hal_soc->ops->hal_get_reo_qdesc_size(ba_window_size,
  318. tid);
  319. return sizeof(struct rx_reo_queue);
  320. }
  321. /**
  322. * hal_get_rx_max_ba_window - Get RX max BA window size per target
  323. * @hal_soc_hdl: Opaque HAL SOC handle
  324. * @tid: TID number
  325. *
  326. * Return: Max RX BA window size
  327. */
  328. static inline
  329. uint16_t hal_get_rx_max_ba_window(hal_soc_handle_t hal_soc_hdl,
  330. int tid)
  331. {
  332. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  333. return hal_soc->ops->hal_get_rx_max_ba_window(tid);
  334. }
  335. /**
  336. * hal_get_idle_link_bm_id() - Get idle link BM id from chid_id
  337. * @hal_soc_hdl: Opaque HAL SOC handle
  338. * @chip_id: mlo chip_id
  339. *
  340. * Returns: RBM ID
  341. */
  342. static inline
  343. uint8_t hal_get_idle_link_bm_id(hal_soc_handle_t hal_soc_hdl,
  344. uint8_t chip_id)
  345. {
  346. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  347. if (hal_soc->ops->hal_get_idle_link_bm_id)
  348. return hal_soc->ops->hal_get_idle_link_bm_id(chip_id);
  349. return WBM_IDLE_DESC_LIST;
  350. }
  351. #endif /* _HAL_HW_INTERNAL_H_ */