qcacmn: Configure registers for reo2ppe
Configure REO destination remap register and REO DST_INFO register fot REO2PPE ring Change-Id: I81cce807cde3babcfb265675ec758d33fc10214f CRs-Fixed: 3274303
This commit is contained in:

committed by
Madan Koyyalamudi

parent
6809114926
commit
2f3e28c33c
@@ -1189,6 +1189,7 @@ static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
|
|||||||
{
|
{
|
||||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||||
|
hal_soc_handle_t hal_soc = soc->hal_soc;
|
||||||
|
|
||||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||||
|
|
||||||
@@ -1206,6 +1207,8 @@ static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
|
|||||||
WLAN_MD_DP_SRNG_REO2PPE,
|
WLAN_MD_DP_SRNG_REO2PPE,
|
||||||
"reo2ppe_ring");
|
"reo2ppe_ring");
|
||||||
|
|
||||||
|
hal_reo_config_reo2ppe_dest_info(hal_soc);
|
||||||
|
|
||||||
if (dp_srng_init(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0, 0)) {
|
if (dp_srng_init(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0, 0)) {
|
||||||
dp_err("%pK: dp_srng_init failed for ppe2tcl_ring", soc);
|
dp_err("%pK: dp_srng_init failed for ppe2tcl_ring", soc);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@@ -803,6 +803,21 @@ hal_tx_mcast_mlo_reinject_routing_set(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* hal_reo_config_reo2ppe_dest_info() - Configure reo2ppe dest info
|
||||||
|
* @hal_soc_hdl: HAL SoC Context
|
||||||
|
*
|
||||||
|
* Return: None.
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void hal_reo_config_reo2ppe_dest_info(hal_soc_handle_t hal_soc_hdl)
|
||||||
|
{
|
||||||
|
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||||
|
|
||||||
|
if (hal_soc->ops->hal_reo_config_reo2ppe_dest_info)
|
||||||
|
hal_soc->ops->hal_reo_config_reo2ppe_dest_info(hal_soc_hdl);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hal_tx_get_num_ppe_vp_tbl_entries() - Get the total number of VP table
|
* hal_tx_get_num_ppe_vp_tbl_entries() - Get the total number of VP table
|
||||||
* @hal_soc: HAL SoC Context
|
* @hal_soc: HAL SoC Context
|
||||||
|
@@ -877,6 +877,9 @@ struct hal_hw_txrx_ops {
|
|||||||
uint32_t (*hal_tx_comp_get_buffer_source)(void *hal_desc);
|
uint32_t (*hal_tx_comp_get_buffer_source)(void *hal_desc);
|
||||||
uint32_t (*hal_tx_get_num_ppe_vp_tbl_entries)(
|
uint32_t (*hal_tx_get_num_ppe_vp_tbl_entries)(
|
||||||
hal_soc_handle_t hal_soc_hdl);
|
hal_soc_handle_t hal_soc_hdl);
|
||||||
|
|
||||||
|
void (*hal_reo_config_reo2ppe_dest_info)(hal_soc_handle_t hal_soc_hdl);
|
||||||
|
|
||||||
void (*hal_tx_set_ppe_cmn_cfg)(hal_soc_handle_t hal_soc_hdl,
|
void (*hal_tx_set_ppe_cmn_cfg)(hal_soc_handle_t hal_soc_hdl,
|
||||||
union hal_tx_cmn_config_ppe *cmn_cfg);
|
union hal_tx_cmn_config_ppe *cmn_cfg);
|
||||||
void (*hal_tx_set_ppe_vp_entry)(hal_soc_handle_t hal_soc_hdl,
|
void (*hal_tx_set_ppe_vp_entry)(hal_soc_handle_t hal_soc_hdl,
|
||||||
@@ -1442,6 +1445,7 @@ struct hal_srng *hal_ring_handle_to_hal_srng(hal_ring_handle_t hal_ring)
|
|||||||
* REO2PPE destination indication
|
* REO2PPE destination indication
|
||||||
*/
|
*/
|
||||||
#define REO2PPE_DST_IND 11
|
#define REO2PPE_DST_IND 11
|
||||||
|
#define REO2PPE_RULE_FAIL_FB 0x2000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum hal_pkt_type - Type of packet type reported by HW
|
* enum hal_pkt_type - Type of packet type reported by HW
|
||||||
|
@@ -1413,6 +1413,25 @@ void hal_compute_reo_remap_ix2_ix3_9224(uint32_t *ring, uint32_t num_rings,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void hal_compute_reo_remap_ix0_9224(struct hal_soc *soc)
|
||||||
|
{
|
||||||
|
uint32_t remap0;
|
||||||
|
|
||||||
|
remap0 = HAL_REG_READ(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR
|
||||||
|
(REO_REG_REG_BASE));
|
||||||
|
|
||||||
|
remap0 &= ~(HAL_REO_REMAP_IX0(0xF, 6));
|
||||||
|
remap0 |= HAL_REO_REMAP_IX0(REO2PPE_DST_IND, 6);
|
||||||
|
|
||||||
|
HAL_REG_WRITE(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR
|
||||||
|
(REO_REG_REG_BASE), remap0);
|
||||||
|
|
||||||
|
hal_debug("HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR 0x%x",
|
||||||
|
HAL_REG_READ(soc, HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0_ADDR
|
||||||
|
(REO_REG_REG_BASE)));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_rx_flow_setup_fse_9224() - Setup a flow search entry in HW FST
|
* hal_rx_flow_setup_fse_9224() - Setup a flow search entry in HW FST
|
||||||
* @fst: Pointer to the Rx Flow Search Table
|
* @fst: Pointer to the Rx Flow Search Table
|
||||||
@@ -1700,6 +1719,8 @@ static void hal_reo_setup_9224(struct hal_soc *soc, void *reoparams,
|
|||||||
* 7: NOT_USED.
|
* 7: NOT_USED.
|
||||||
*/
|
*/
|
||||||
if (reo_params->rx_hash_enabled) {
|
if (reo_params->rx_hash_enabled) {
|
||||||
|
hal_compute_reo_remap_ix0_9224(soc);
|
||||||
|
|
||||||
HAL_REG_WRITE(soc,
|
HAL_REG_WRITE(soc,
|
||||||
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_1_ADDR
|
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_1_ADDR
|
||||||
(REO_REG_REG_BASE), reo_params->remap0);
|
(REO_REG_REG_BASE), reo_params->remap0);
|
||||||
@@ -2032,6 +2053,7 @@ static void hal_hw_txrx_ops_attach_qcn9224(struct hal_soc *hal_soc)
|
|||||||
hal_rx_priv_info_get_from_tlv_be;
|
hal_rx_priv_info_get_from_tlv_be;
|
||||||
hal_soc->ops->hal_rx_pkt_hdr_get = hal_rx_pkt_hdr_get_be;
|
hal_soc->ops->hal_rx_pkt_hdr_get = hal_rx_pkt_hdr_get_be;
|
||||||
hal_soc->ops->hal_reo_setup = hal_reo_setup_9224;
|
hal_soc->ops->hal_reo_setup = hal_reo_setup_9224;
|
||||||
|
hal_soc->ops->hal_reo_config_reo2ppe_dest_info = NULL;
|
||||||
#ifdef REO_SHARED_QREF_TABLE_EN
|
#ifdef REO_SHARED_QREF_TABLE_EN
|
||||||
hal_soc->ops->hal_reo_shared_qaddr_setup = hal_reo_shared_qaddr_setup_be;
|
hal_soc->ops->hal_reo_shared_qaddr_setup = hal_reo_shared_qaddr_setup_be;
|
||||||
hal_soc->ops->hal_reo_shared_qaddr_init = hal_reo_shared_qaddr_init_be;
|
hal_soc->ops->hal_reo_shared_qaddr_init = hal_reo_shared_qaddr_init_be;
|
||||||
|
@@ -546,6 +546,25 @@ struct hal_hw_srng_config hw_srng_table_9224v2[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* hal_reo_config_reo2ppe_dest_info() - Configure reo2ppe dest info
|
||||||
|
* @hal_soc_hdl: HAL SoC Context
|
||||||
|
*
|
||||||
|
* Return: None.
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void hal_reo_config_reo2ppe_dest_info_9224(hal_soc_handle_t hal_soc_hdl)
|
||||||
|
{
|
||||||
|
HAL_REG_WRITE((struct hal_soc *)hal_soc_hdl,
|
||||||
|
HWIO_REO_R0_REO2PPE_DEST_INFO_ADDR(REO_REG_REG_BASE),
|
||||||
|
REO2PPE_RULE_FAIL_FB);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hal_hw_txrx_ops_override_qcn9224_v2(struct hal_soc *hal_soc)
|
||||||
|
{
|
||||||
|
hal_soc->ops->hal_reo_config_reo2ppe_dest_info =
|
||||||
|
hal_reo_config_reo2ppe_dest_info_9224;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* hal_qcn9224_attach()- Attach 9224 target specific hal_soc ops,
|
* hal_qcn9224_attach()- Attach 9224 target specific hal_soc ops,
|
||||||
* offset and srng table
|
* offset and srng table
|
||||||
@@ -563,4 +582,6 @@ void hal_qcn9224v2_attach(struct hal_soc *hal_soc)
|
|||||||
if (hal_soc->static_window_map)
|
if (hal_soc->static_window_map)
|
||||||
hal_write_window_register(hal_soc);
|
hal_write_window_register(hal_soc);
|
||||||
hal_soc->dmac_cmn_src_rxbuf_ring = true;
|
hal_soc->dmac_cmn_src_rxbuf_ring = true;
|
||||||
|
|
||||||
|
hal_hw_txrx_ops_override_qcn9224_v2(hal_soc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user