qcacmn: Disable TX cmd credit ring for Kiwi
Kiwi target does not used TX cmd credit ring. Hence disable the tx cmd credit ring for Kiwi. Change-Id: Ibd5fe2905a7362ea2ab89e65d77c7aea6ab259ee CRs-Fixed: 3150814
This commit is contained in:

committed by
Madan Koyyalamudi

parent
42dd66b280
commit
f15646c12b
@@ -2578,6 +2578,24 @@ dp_queue_mon_ring_stats(struct dp_pdev *pdev,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG
|
||||||
|
static inline QDF_STATUS
|
||||||
|
dp_get_tcl_cmd_cred_ring_state_from_hal(struct dp_pdev *pdev,
|
||||||
|
struct dp_srng_ring_state *ring_state)
|
||||||
|
{
|
||||||
|
return dp_get_srng_ring_state_from_hal(pdev->soc, pdev,
|
||||||
|
&pdev->soc->tcl_cmd_credit_ring,
|
||||||
|
TCL_CMD_CREDIT, ring_state);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
dp_get_tcl_cmd_cred_ring_state_from_hal(struct dp_pdev *pdev,
|
||||||
|
struct dp_srng_ring_state *ring_state)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_queue_srng_ring_stats(): Print pdev hal level ring stats
|
* dp_queue_srng_ring_stats(): Print pdev hal level ring stats
|
||||||
* @pdev: DP_pdev handle
|
* @pdev: DP_pdev handle
|
||||||
@@ -2646,12 +2664,8 @@ static void dp_queue_ring_stats(struct dp_pdev *pdev)
|
|||||||
if (status == QDF_STATUS_SUCCESS)
|
if (status == QDF_STATUS_SUCCESS)
|
||||||
qdf_assert_always(++j < DP_MAX_SRNGS);
|
qdf_assert_always(++j < DP_MAX_SRNGS);
|
||||||
|
|
||||||
status = dp_get_srng_ring_state_from_hal
|
status = dp_get_tcl_cmd_cred_ring_state_from_hal
|
||||||
(pdev->soc, pdev,
|
(pdev, &soc_srngs_state->ring_state[j]);
|
||||||
&pdev->soc->tcl_cmd_credit_ring,
|
|
||||||
TCL_CMD_CREDIT,
|
|
||||||
&soc_srngs_state->ring_state[j]);
|
|
||||||
|
|
||||||
if (status == QDF_STATUS_SUCCESS)
|
if (status == QDF_STATUS_SUCCESS)
|
||||||
qdf_assert_always(++j < DP_MAX_SRNGS);
|
qdf_assert_always(++j < DP_MAX_SRNGS);
|
||||||
|
|
||||||
|
@@ -14459,6 +14459,92 @@ fail1:
|
|||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG
|
||||||
|
static inline QDF_STATUS dp_soc_tcl_cmd_cred_srng_init(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (soc->init_tcl_cmd_cred_ring) {
|
||||||
|
status = dp_srng_init(soc, &soc->tcl_cmd_credit_ring,
|
||||||
|
TCL_CMD_CREDIT, 0, 0);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return status;
|
||||||
|
|
||||||
|
wlan_minidump_log(soc->tcl_cmd_credit_ring.base_vaddr_unaligned,
|
||||||
|
soc->tcl_cmd_credit_ring.alloc_size,
|
||||||
|
soc->ctrl_psoc,
|
||||||
|
WLAN_MD_DP_SRNG_TCL_CMD,
|
||||||
|
"wbm_desc_rel_ring");
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_soc_tcl_cmd_cred_srng_deinit(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
if (soc->init_tcl_cmd_cred_ring) {
|
||||||
|
wlan_minidump_remove(soc->tcl_cmd_credit_ring.base_vaddr_unaligned,
|
||||||
|
soc->tcl_cmd_credit_ring.alloc_size,
|
||||||
|
soc->ctrl_psoc, WLAN_MD_DP_SRNG_TCL_CMD,
|
||||||
|
"wbm_desc_rel_ring");
|
||||||
|
dp_srng_deinit(soc, &soc->tcl_cmd_credit_ring,
|
||||||
|
TCL_CMD_CREDIT, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS dp_soc_tcl_cmd_cred_srng_alloc(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||||
|
uint32_t entries;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
entries = wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(soc_cfg_ctx);
|
||||||
|
if (soc->init_tcl_cmd_cred_ring) {
|
||||||
|
status = dp_srng_alloc(soc, &soc->tcl_cmd_credit_ring,
|
||||||
|
TCL_CMD_CREDIT, entries, 0);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_soc_tcl_cmd_cred_srng_free(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
if (soc->init_tcl_cmd_cred_ring)
|
||||||
|
dp_srng_free(soc, &soc->tcl_cmd_credit_ring);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_tx_init_cmd_credit_ring(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
if (soc->init_tcl_cmd_cred_ring)
|
||||||
|
hal_tx_init_cmd_credit_ring(soc->hal_soc,
|
||||||
|
soc->tcl_cmd_credit_ring.hal_srng);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS dp_soc_tcl_cmd_cred_srng_init(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_soc_tcl_cmd_cred_srng_deinit(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS dp_soc_tcl_cmd_cred_srng_alloc(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_soc_tcl_cmd_cred_srng_free(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void dp_tx_init_cmd_credit_ring(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_soc_srng_deinit() - de-initialize soc srng rings
|
* dp_soc_srng_deinit() - de-initialize soc srng rings
|
||||||
* @soc: Datapath soc handle
|
* @soc: Datapath soc handle
|
||||||
@@ -14489,14 +14575,7 @@ static void dp_soc_srng_deinit(struct dp_soc *soc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TCL command and status rings */
|
/* TCL command and status rings */
|
||||||
if (soc->init_tcl_cmd_cred_ring) {
|
dp_soc_tcl_cmd_cred_srng_deinit(soc);
|
||||||
wlan_minidump_remove(soc->tcl_cmd_credit_ring.base_vaddr_unaligned,
|
|
||||||
soc->tcl_cmd_credit_ring.alloc_size,
|
|
||||||
soc->ctrl_psoc, WLAN_MD_DP_SRNG_TCL_CMD,
|
|
||||||
"wbm_desc_rel_ring");
|
|
||||||
dp_srng_deinit(soc, &soc->tcl_cmd_credit_ring,
|
|
||||||
TCL_CMD_CREDIT, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
wlan_minidump_remove(soc->tcl_status_ring.base_vaddr_unaligned,
|
wlan_minidump_remove(soc->tcl_status_ring.base_vaddr_unaligned,
|
||||||
soc->tcl_status_ring.alloc_size,
|
soc->tcl_status_ring.alloc_size,
|
||||||
@@ -14581,19 +14660,10 @@ static QDF_STATUS dp_soc_srng_init(struct dp_soc *soc)
|
|||||||
WLAN_MD_DP_SRNG_WBM_DESC_REL,
|
WLAN_MD_DP_SRNG_WBM_DESC_REL,
|
||||||
"wbm_desc_rel_ring");
|
"wbm_desc_rel_ring");
|
||||||
|
|
||||||
if (soc->init_tcl_cmd_cred_ring) {
|
/* TCL command and status rings */
|
||||||
/* TCL command and status rings */
|
if (dp_soc_tcl_cmd_cred_srng_init(soc)) {
|
||||||
if (dp_srng_init(soc, &soc->tcl_cmd_credit_ring,
|
dp_init_err("%pK: dp_srng_init failed for tcl_cmd_ring", soc);
|
||||||
TCL_CMD_CREDIT, 0, 0)) {
|
goto fail1;
|
||||||
dp_init_err("%pK: dp_srng_init failed for tcl_cmd_ring", soc);
|
|
||||||
goto fail1;
|
|
||||||
}
|
|
||||||
|
|
||||||
wlan_minidump_log(soc->tcl_cmd_credit_ring.base_vaddr_unaligned,
|
|
||||||
soc->tcl_cmd_credit_ring.alloc_size,
|
|
||||||
soc->ctrl_psoc,
|
|
||||||
WLAN_MD_DP_SRNG_TCL_CMD,
|
|
||||||
"wbm_desc_rel_ring");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dp_srng_init(soc, &soc->tcl_status_ring, TCL_STATUS, 0, 0)) {
|
if (dp_srng_init(soc, &soc->tcl_status_ring, TCL_STATUS, 0, 0)) {
|
||||||
@@ -14743,8 +14813,7 @@ static void dp_soc_srng_free(struct dp_soc *soc)
|
|||||||
dp_ipa_free_alt_tx_ring(soc);
|
dp_ipa_free_alt_tx_ring(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->init_tcl_cmd_cred_ring)
|
dp_soc_tcl_cmd_cred_srng_free(soc);
|
||||||
dp_srng_free(soc, &soc->tcl_cmd_credit_ring);
|
|
||||||
|
|
||||||
dp_srng_free(soc, &soc->tcl_status_ring);
|
dp_srng_free(soc, &soc->tcl_status_ring);
|
||||||
|
|
||||||
@@ -14785,14 +14854,10 @@ static QDF_STATUS dp_soc_srng_alloc(struct dp_soc *soc)
|
|||||||
goto fail1;
|
goto fail1;
|
||||||
}
|
}
|
||||||
|
|
||||||
entries = wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(soc_cfg_ctx);
|
|
||||||
/* TCL command and status rings */
|
/* TCL command and status rings */
|
||||||
if (soc->init_tcl_cmd_cred_ring) {
|
if (dp_soc_tcl_cmd_cred_srng_alloc(soc)) {
|
||||||
if (dp_srng_alloc(soc, &soc->tcl_cmd_credit_ring,
|
dp_init_err("%pK: dp_srng_alloc failed for tcl_cmd_ring", soc);
|
||||||
TCL_CMD_CREDIT, entries, 0)) {
|
goto fail1;
|
||||||
dp_init_err("%pK: dp_srng_alloc failed for tcl_cmd_ring", soc);
|
|
||||||
goto fail1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entries = wlan_cfg_get_dp_soc_tcl_status_ring_size(soc_cfg_ctx);
|
entries = wlan_cfg_get_dp_soc_tcl_status_ring_size(soc_cfg_ctx);
|
||||||
@@ -15165,9 +15230,7 @@ static QDF_STATUS dp_pdev_init(struct cdp_soc_t *txrx_soc,
|
|||||||
* Initialize command/credit ring descriptor
|
* Initialize command/credit ring descriptor
|
||||||
* Command/CREDIT ring also used for sending DATA cmds
|
* Command/CREDIT ring also used for sending DATA cmds
|
||||||
*/
|
*/
|
||||||
if (soc->init_tcl_cmd_cred_ring)
|
dp_tx_init_cmd_credit_ring(soc);
|
||||||
hal_tx_init_cmd_credit_ring(soc->hal_soc,
|
|
||||||
soc->tcl_cmd_credit_ring.hal_srng);
|
|
||||||
|
|
||||||
dp_tx_pdev_init(pdev);
|
dp_tx_pdev_init(pdev);
|
||||||
|
|
||||||
|
@@ -2006,7 +2006,11 @@ struct hal_hw_srng_config hw_srng_table_kiwi[] = {
|
|||||||
},
|
},
|
||||||
{ /* TCL_CMD */
|
{ /* TCL_CMD */
|
||||||
.start_ring_id = HAL_SRNG_SW2TCL_CMD,
|
.start_ring_id = HAL_SRNG_SW2TCL_CMD,
|
||||||
|
#ifndef WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG
|
||||||
.max_rings = 1,
|
.max_rings = 1,
|
||||||
|
#else
|
||||||
|
.max_rings = 0,
|
||||||
|
#endif
|
||||||
.entry_size = sizeof(struct tcl_gse_cmd) >> 2,
|
.entry_size = sizeof(struct tcl_gse_cmd) >> 2,
|
||||||
.lmac_ring = FALSE,
|
.lmac_ring = FALSE,
|
||||||
.ring_dir = HAL_SRNG_SRC_RING,
|
.ring_dir = HAL_SRNG_SRC_RING,
|
||||||
|
Reference in New Issue
Block a user