qcacmn: Add CDP api support for umac reset init

Add CDP api support for umac reset init API, these apis are expected
to be called whenever shmem is deinitialized.

Change-Id: I307c586454580ab8f83b0d515defa93d4e8ff656
CRs-Fixed: 3458268
This commit is contained in:
Surya Prakash Raajen
2023-04-06 18:11:25 +05:30
committed by Madan Koyyalamudi
parent 07390f2011
commit 74c7a8d542
5 changed files with 27 additions and 5 deletions

View File

@@ -1844,6 +1844,25 @@ static inline void cdp_txrx_ppeds_stop(ol_txrx_soc_handle soc)
soc->ops->cmn_drv_ops->txrx_ppeds_stop(soc); soc->ops->cmn_drv_ops->txrx_ppeds_stop(soc);
} }
/**
* cdp_txrx_umac_reset_init(): De-initialize UMAC HW reset module
* @soc: soc handle
*/
static inline void cdp_txrx_umac_reset_init(ol_txrx_soc_handle soc)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance:");
QDF_BUG(0);
return;
}
if (!soc->ops->cmn_drv_ops ||
!soc->ops->cmn_drv_ops->txrx_umac_reset_init)
return;
soc->ops->cmn_drv_ops->txrx_umac_reset_init(soc);
}
/** /**
* cdp_txrx_umac_reset_deinit(): De-initialize UMAC HW reset module * cdp_txrx_umac_reset_deinit(): De-initialize UMAC HW reset module
* @soc: soc handle * @soc: soc handle

View File

@@ -718,6 +718,7 @@ struct cdp_cmn_ops {
bool mlo_peers_only); bool mlo_peers_only);
#endif #endif
QDF_STATUS (*txrx_umac_reset_deinit)(ol_txrx_soc_handle soc); QDF_STATUS (*txrx_umac_reset_deinit)(ol_txrx_soc_handle soc);
QDF_STATUS (*txrx_umac_reset_init)(ol_txrx_soc_handle soc);
void (*txrx_get_tsf_time)(struct cdp_soc_t *soc_hdl, uint32_t tsf_id, void (*txrx_get_tsf_time)(struct cdp_soc_t *soc_hdl, uint32_t tsf_id,
uint32_t mac_id, uint64_t *tsf, uint32_t mac_id, uint64_t *tsf,
uint64_t *tsf_sync_soc_time); uint64_t *tsf_sync_soc_time);

View File

@@ -3363,7 +3363,7 @@ dp_soc_attach_target_wifi3(struct cdp_soc_t *cdp_soc)
return status; return status;
} }
status = dp_soc_umac_reset_init(soc); status = dp_soc_umac_reset_init(cdp_soc);
if (status != QDF_STATUS_SUCCESS && if (status != QDF_STATUS_SUCCESS &&
status != QDF_STATUS_E_NOSUPPORT) { status != QDF_STATUS_E_NOSUPPORT) {
dp_err("Failed to initialize UMAC reset"); dp_err("Failed to initialize UMAC reset");
@@ -10385,6 +10385,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
.txrx_recovery_vdev_flush_peers = dp_recovery_vdev_flush_peers, .txrx_recovery_vdev_flush_peers = dp_recovery_vdev_flush_peers,
#endif #endif
.txrx_umac_reset_deinit = dp_soc_umac_reset_deinit, .txrx_umac_reset_deinit = dp_soc_umac_reset_deinit,
.txrx_umac_reset_init = dp_soc_umac_reset_init,
.txrx_get_tsf_time = dp_get_tsf_time, .txrx_get_tsf_time = dp_get_tsf_time,
.txrx_get_tsf2_offset = dp_get_tsf2_scratch_reg, .txrx_get_tsf2_offset = dp_get_tsf2_scratch_reg,
.txrx_get_tqm_offset = dp_get_tqm_scratch_reg, .txrx_get_tqm_offset = dp_get_tqm_scratch_reg,

View File

@@ -82,8 +82,9 @@ dp_umac_reset_send_setup_cmd(struct dp_soc *soc)
return dp_htt_umac_reset_send_setup_cmd(soc, &params); return dp_htt_umac_reset_send_setup_cmd(soc, &params);
} }
QDF_STATUS dp_soc_umac_reset_init(struct dp_soc *soc) QDF_STATUS dp_soc_umac_reset_init(struct cdp_soc_t *txrx_soc)
{ {
struct dp_soc *soc = (struct dp_soc *)txrx_soc;
struct dp_soc_umac_reset_ctx *umac_reset_ctx; struct dp_soc_umac_reset_ctx *umac_reset_ctx;
size_t alloc_size; size_t alloc_size;
QDF_STATUS status; QDF_STATUS status;

View File

@@ -228,11 +228,11 @@ struct dp_soc_umac_reset_ctx {
/** /**
* dp_soc_umac_reset_init() - Initialize UMAC reset context * dp_soc_umac_reset_init() - Initialize UMAC reset context
* @soc: DP soc object * @txrx_soc: DP soc object
* *
* Return: QDF status of operation * Return: QDF status of operation
*/ */
QDF_STATUS dp_soc_umac_reset_init(struct dp_soc *soc); QDF_STATUS dp_soc_umac_reset_init(struct cdp_soc_t *txrx_soc);
/** /**
* dp_soc_umac_reset_deinit() - De-initialize UMAC reset context * dp_soc_umac_reset_deinit() - De-initialize UMAC reset context
@@ -317,7 +317,7 @@ static inline bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
} }
static inline static inline
QDF_STATUS dp_soc_umac_reset_init(struct dp_soc *soc) QDF_STATUS dp_soc_umac_reset_init(struct cdp_soc_t *txrx_soc)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }