qcacmn: Add support for PPE

Add the PPE related DP APIs

Change-Id: I25aeff73fef21a7a8ad0f0e6e8aa6c537a233029
CRs-Fixed: 3045340
This commit is contained in:
Neelansh Mittal
2021-12-03 19:41:17 +05:30
committed by Madan Koyyalamudi
parent bfde0ca01b
commit 2c06a656a5
5 changed files with 468 additions and 3 deletions

View File

@@ -27,6 +27,12 @@
/* MAX_TCL_BANK reserved for FW use */
#define HAL_TX_NUM_RESERVED_BANKS 1
/*
* Number of Priority to TID mapping
*/
#define HAL_BE_TX_MAP0_PRI2TID_MAX 10
#define HAL_BE_TX_MAP1_PRI2TID_MAX 6
enum hal_be_tx_ret_buf_manager {
HAL_BE_WBM_SW0_BM_ID = 5,
HAL_BE_WBM_SW1_BM_ID = 6,
@@ -935,4 +941,116 @@ hal_tx_vdev_mismatch_routing_set(hal_soc_handle_t hal_soc_hdl,
{
}
#endif
/*
* hal_tx_get_num_ppe_vp_tbl_entries() - Get the total number of VP table
* @hal_soc: HAL SoC Context
*
* Return: Total number of entries.
*/
static inline
uint32_t hal_tx_get_num_ppe_vp_tbl_entries(hal_soc_handle_t hal_soc_hdl)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
return hal_soc->ops->hal_tx_get_num_ppe_vp_tbl_entries(hal_soc_hdl);
}
/**
* hal_tx_set_ppe_cmn_cfg()- Set the PPE common config
* @hal_soc: HAL SoC context
* @cmn_cfg: HAL PPE VP common config
*
* Return: void
*/
static inline void
hal_tx_set_ppe_cmn_cfg(hal_soc_handle_t hal_soc_hdl,
union hal_tx_cmn_config_ppe *cmn_cfg)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_set_ppe_cmn_cfg(hal_soc_hdl, cmn_cfg);
}
/**
* hal_tx_populate_ppe_vp_entry - Populate ppe VP entry
* @hal_soc: HAL SoC context
* @vp_cfg: HAL PPE VP config
* @ppe_vp_idx: PPE VP index
*
* Return: void
*/
static inline void
hal_tx_populate_ppe_vp_entry(hal_soc_handle_t hal_soc_hdl,
union hal_tx_ppe_vp_config *vp_cfg,
int ppe_vp_idx)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_set_ppe_vp_entry(hal_soc_hdl, vp_cfg, ppe_vp_idx);
}
/**
* hal_tx_set_int_pri2id - Set the prit2tid table.
* @hal_soc: HAL SoC context
* @pri2tid: Reference to SW INT_PRI to TID table
*
* Return: void
*/
static inline void
hal_tx_set_int_pri2tid(hal_soc_handle_t hal_soc_hdl,
uint32_t val, uint8_t map_no)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_set_ppe_pri2tid(hal_soc_hdl, val, map_no);
}
/**
* hal_tx_update_int_pri2id - Populate the prit2tid table.
* @hal_soc: HAL SoC context
* @pri: INT_PRI value
* @tid: Wi-Fi TID
*
* Return: void
*/
static inline void
hal_tx_update_int_pri2tid(hal_soc_handle_t hal_soc_hdl,
uint8_t pri, uint8_t tid)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_update_ppe_pri2tid(hal_soc_hdl, pri, tid);
}
/**
* hal_tx_dump_ppe_vp_entry - Dump the PPE VP entry
* @hal_soc_hdl: HAL SoC context
*
* Return: void
*/
static inline void
hal_tx_dump_ppe_vp_entry(hal_soc_handle_t hal_soc_hdl)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_dump_ppe_vp_entry(hal_soc_hdl);
}
/**
* hal_tx_enable_pri2tid_map- Enable the priority to tid mapping
* @hal_soc_hdl: HAL SoC context
* @val: True/False value
*
* Return: void
*/
static inline void
hal_tx_enable_pri2tid_map(hal_soc_handle_t hal_soc_hdl, bool val,
uint8_t ppe_vp_idx)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
hal_soc->ops->hal_tx_enable_pri2tid_map(hal_soc_hdl, val,
ppe_vp_idx);
}
#endif /* _HAL_BE_TX_H_ */