qcacmn: Add support for HW cookie conversion

Support HW cookie conversion for BE platform.

Change-Id: I39058fbf256266557f5e734ba376db4db0731b24
CRs-Fixed: 2929533
这个提交包含在:
Jinwei Chen
2021-02-22 03:22:07 -08:00
提交者 Madan Koyyalamudi
父节点 1bb3155d2c
当前提交 4083155141
修改 30 个文件,包含 1618 行新增124 行删除

查看文件

@@ -20,6 +20,7 @@
#define _HAL_BE_TX_H_
#include "hal_be_hw_headers.h"
#include "hal_tx.h"
enum hal_be_tx_ret_buf_manager {
HAL_BE_WBM_SW0_BM_ID = 5,
@@ -279,6 +280,45 @@ static inline qdf_dma_addr_t hal_tx_comp_get_paddr(void *hal_desc)
return (qdf_dma_addr_t)(paddr_lo | (((uint64_t)paddr_hi) << 32));
}
#ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
/* HW set dowrd-2 bit30 to 1 if HW CC is done */
#define HAL_WBM2SW_COMPLETION_RING_TX_CC_DONE_OFFSET 0x8
#define HAL_WBM2SW_COMPLETION_RING_TX_CC_DONE_MASK 0x40000000
#define HAL_WBM2SW_COMPLETION_RING_TX_CC_DONE_LSB 0x1E
/**
* hal_tx_comp_get_cookie_convert_done() - Get cookie conversion done flag
* @hal_desc: completion ring descriptor pointer
*
* This function will get the bit value that indicate HW cookie
* conversion done or not
*
* Return: 1 - HW cookie conversion done, 0 - not
*/
static inline uint8_t hal_tx_comp_get_cookie_convert_done(void *hal_desc)
{
return HAL_TX_DESC_GET(hal_desc, HAL_WBM2SW_COMPLETION_RING_TX,
CC_DONE);
}
#endif
/**
* hal_tx_comp_get_desc_va() - Get Desc virtual address within completion Desc
* @hal_desc: completion ring descriptor pointer
*
* This function will get the TX Desc virtual address
*
* Return: TX desc virtual address
*/
static inline uint64_t hal_tx_comp_get_desc_va(void *hal_desc)
{
return HAL_TX_DESC_GET(hal_desc, WBM2SW_COMPLETION_RING_TX,
BUFFER_VIRT_ADDR_31_0) |
(((uint64_t)HAL_TX_DESC_GET(
hal_desc,
WBM2SW_COMPLETION_RING_TX,
BUFFER_VIRT_ADDR_63_32)) << 32);
}
/*---------------------------------------------------------------------------
* TX BANK register accessor APIs
* ---------------------------------------------------------------------------