qcacmn: Enable Tx implict RBM mapping for Waikiki
Changes to enable Tx implicit RBM mapping support for Waikiki Change-Id: I4c30c34a250f6fb028c64741745fb5a3e6733ee3
This commit is contained in:

committed by
Madan Koyyalamudi

parent
cfa44c7843
commit
9165949820
@@ -899,6 +899,23 @@ static QDF_STATUS dp_soc_srng_init_be(struct dp_soc *soc)
|
|||||||
return dp_soc_ppe_srng_init(soc);
|
return dp_soc_ppe_srng_init(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DP_TX_IMPLICIT_RBM_MAPPING
|
||||||
|
static void dp_tx_implicit_rbm_set_be(struct dp_soc *soc,
|
||||||
|
uint8_t tx_ring_id,
|
||||||
|
uint8_t bm_id)
|
||||||
|
{
|
||||||
|
hal_tx_config_rbm_mapping_be(soc->hal_soc,
|
||||||
|
soc->tcl_data_ring[tx_ring_id].hal_srng,
|
||||||
|
bm_id);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void dp_tx_implicit_rbm_set_be(struct dp_soc *soc,
|
||||||
|
uint8_t tx_ring_id,
|
||||||
|
uint8_t bm_id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||||
{
|
{
|
||||||
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
||||||
@@ -931,6 +948,7 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
|||||||
arch_ops->txrx_vdev_detach = dp_vdev_detach_be;
|
arch_ops->txrx_vdev_detach = dp_vdev_detach_be;
|
||||||
arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_be;
|
arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_be;
|
||||||
arch_ops->soc_cfg_attach = dp_soc_cfg_attach_be;
|
arch_ops->soc_cfg_attach = dp_soc_cfg_attach_be;
|
||||||
|
arch_ops->tx_implicit_rbm_set = dp_tx_implicit_rbm_set_be;
|
||||||
|
|
||||||
dp_init_near_full_arch_ops_be(arch_ops);
|
dp_init_near_full_arch_ops_be(arch_ops);
|
||||||
}
|
}
|
||||||
|
@@ -72,6 +72,7 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
|
|||||||
#endif /* DP_FEATURE_HW_COOKIE_CONVERSION */
|
#endif /* DP_FEATURE_HW_COOKIE_CONVERSION */
|
||||||
|
|
||||||
#ifdef QCA_OL_TX_MULTIQ_SUPPORT
|
#ifdef QCA_OL_TX_MULTIQ_SUPPORT
|
||||||
|
#ifdef DP_TX_IMPLICIT_RBM_MAPPING
|
||||||
/*
|
/*
|
||||||
* dp_tx_get_rbm_id()- Get the RBM ID for data transmission completion.
|
* dp_tx_get_rbm_id()- Get the RBM ID for data transmission completion.
|
||||||
* @dp_soc - DP soc structure pointer
|
* @dp_soc - DP soc structure pointer
|
||||||
@@ -79,13 +80,19 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
|
|||||||
*
|
*
|
||||||
* Return - RBM ID corresponding to TCL ring_id
|
* Return - RBM ID corresponding to TCL ring_id
|
||||||
*/
|
*/
|
||||||
|
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
||||||
|
uint8_t ring_id)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
||||||
uint8_t ring_id)
|
uint8_t ring_id)
|
||||||
{
|
{
|
||||||
return (ring_id ? soc->wbm_sw0_bm_id + (ring_id - 1) :
|
return (ring_id ? soc->wbm_sw0_bm_id + (ring_id - 1) :
|
||||||
HAL_WBM_SW2_BM_ID(soc->wbm_sw0_bm_id));
|
HAL_WBM_SW2_BM_ID(soc->wbm_sw0_bm_id));
|
||||||
}
|
}
|
||||||
|
#endif /*DP_TX_IMPLICIT_RBM_MAPPING*/
|
||||||
#else
|
#else
|
||||||
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
static inline uint8_t dp_tx_get_rbm_id_be(struct dp_soc *soc,
|
||||||
uint8_t tcl_index)
|
uint8_t tcl_index)
|
||||||
|
@@ -4259,6 +4259,7 @@ static QDF_STATUS dp_init_tx_ring_pair_by_index(struct dp_soc *soc,
|
|||||||
uint8_t index)
|
uint8_t index)
|
||||||
{
|
{
|
||||||
int tcl_ring_num, wbm_ring_num;
|
int tcl_ring_num, wbm_ring_num;
|
||||||
|
uint8_t bm_id;
|
||||||
|
|
||||||
if (index >= MAX_TCL_DATA_RINGS) {
|
if (index >= MAX_TCL_DATA_RINGS) {
|
||||||
dp_err("unexpected index!");
|
dp_err("unexpected index!");
|
||||||
@@ -4294,6 +4295,9 @@ static QDF_STATUS dp_init_tx_ring_pair_by_index(struct dp_soc *soc,
|
|||||||
goto fail1;
|
goto fail1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bm_id = wlan_cfg_get_rbm_id_for_index(soc->wlan_cfg_ctx, tcl_ring_num);
|
||||||
|
|
||||||
|
soc->arch_ops.tx_implicit_rbm_set(soc, tcl_ring_num, bm_id);
|
||||||
wlan_minidump_log(soc->tx_comp_ring[index].base_vaddr_unaligned,
|
wlan_minidump_log(soc->tx_comp_ring[index].base_vaddr_unaligned,
|
||||||
soc->tx_comp_ring[index].alloc_size,
|
soc->tx_comp_ring[index].alloc_size,
|
||||||
soc->ctrl_psoc,
|
soc->ctrl_psoc,
|
||||||
|
@@ -1632,6 +1632,8 @@ struct dp_arch_ops {
|
|||||||
int (*dp_srng_test_and_update_nf_params)(struct dp_soc *soc,
|
int (*dp_srng_test_and_update_nf_params)(struct dp_soc *soc,
|
||||||
struct dp_srng *dp_srng,
|
struct dp_srng *dp_srng,
|
||||||
int *max_reap_limit);
|
int *max_reap_limit);
|
||||||
|
void (*tx_implicit_rbm_set)(struct dp_soc *soc, uint8_t tx_ring_id,
|
||||||
|
uint8_t bm_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -291,6 +291,12 @@ static QDF_STATUS dp_soc_srng_init_li(struct dp_soc *soc)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dp_tx_implicit_rbm_set_li(struct dp_soc *soc,
|
||||||
|
uint8_t tx_ring_id,
|
||||||
|
uint8_t bm_id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
||||||
{
|
{
|
||||||
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
||||||
@@ -325,5 +331,6 @@ void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
|||||||
dp_rx_desc_cookie_2_va_li;
|
dp_rx_desc_cookie_2_va_li;
|
||||||
arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_li;
|
arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_li;
|
||||||
arch_ops->soc_cfg_attach = dp_soc_cfg_attach_li;
|
arch_ops->soc_cfg_attach = dp_soc_cfg_attach_li;
|
||||||
|
arch_ops->tx_implicit_rbm_set = dp_tx_implicit_rbm_set_li;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -537,11 +537,12 @@ hal_tx_populate_bank_register(hal_soc_handle_t hal_soc_hdl,
|
|||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
hal_tx_config_rbm_mapping_be(struct hal_soc *hal_soc,
|
hal_tx_config_rbm_mapping_be(hal_soc_handle_t hal_soc_hdl,
|
||||||
hal_ring_handle_t hal_ring_hdl,
|
hal_ring_handle_t hal_ring_hdl,
|
||||||
uint8_t rbm_id)
|
uint8_t rbm_id)
|
||||||
{
|
{
|
||||||
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
||||||
|
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||||
uint32_t reg_addr = 0;
|
uint32_t reg_addr = 0;
|
||||||
uint32_t reg_val = 0;
|
uint32_t reg_val = 0;
|
||||||
uint32_t val = 0;
|
uint32_t val = 0;
|
||||||
@@ -550,7 +551,7 @@ hal_tx_config_rbm_mapping_be(struct hal_soc *hal_soc,
|
|||||||
|
|
||||||
ring_type = srng->ring_type;
|
ring_type = srng->ring_type;
|
||||||
ring_num = hal_soc->hw_srng_table[ring_type].start_ring_id;
|
ring_num = hal_soc->hw_srng_table[ring_type].start_ring_id;
|
||||||
ring_num = ring_num - srng->ring_id;
|
ring_num = srng->ring_id - ring_num;
|
||||||
|
|
||||||
reg_addr = HWIO_TCL_R0_RBM_MAPPING0_ADDR(MAC_TCL_REG_REG_BASE);
|
reg_addr = HWIO_TCL_R0_RBM_MAPPING0_ADDR(MAC_TCL_REG_REG_BASE);
|
||||||
|
|
||||||
@@ -573,7 +574,7 @@ hal_tx_config_rbm_mapping_be(struct hal_soc *hal_soc,
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
hal_tx_config_rbm_mapping_be(struct hal_soc *hal_soc,
|
hal_tx_config_rbm_mapping_be(hal_soc_handle_t hal_soc_hdl,
|
||||||
hal_ring_handle_t hal_ring_hdl,
|
hal_ring_handle_t hal_ring_hdl,
|
||||||
uint8_t rbm_id)
|
uint8_t rbm_id)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user