qcacmn: Add HAL APIs to read tsf2 and tqm scratch register

Add support to read TSF2 and TQM scratch regitser in the HAL layer
for WKK v1 and v2 board.

Change-Id: I0ef5e8cf4e06c0b5c98169252a81f70989285d2d
CRs-Fixed: 3321782
This commit is contained in:
Ripan Deuri
2022-10-29 15:26:31 +05:30
committed by Madan Koyyalamudi
parent 938ddb0956
commit 11ccd80f56
7 changed files with 301 additions and 0 deletions

View File

@@ -2953,4 +2953,46 @@ cdp_get_tsf_time(ol_txrx_soc_handle soc, uint32_t tsf_id, uint32_t mac_id,
tsf_sync_soc_time);
}
/**
* cdp_get_tsf2_offset() - get tsf2 offset
* @soc: Datapath soc handle
* @mac_id: mac_id
* @value: pointer to update tsf2 value
*
* Return: None.
*/
static inline void
cdp_get_tsf2_offset(ol_txrx_soc_handle soc, uint8_t mac_id, uint64_t *value)
{
if (!soc) {
dp_cdp_debug("Invalid Instance");
return;
}
if (!soc->ops->cmn_drv_ops ||
!soc->ops->cmn_drv_ops->txrx_get_tsf2_offset)
return;
soc->ops->cmn_drv_ops->txrx_get_tsf2_offset(soc, mac_id, value);
}
/**
* cdp_get_tqm_offset() - get tqm offset
* @soc: Datapath soc handle
* @value: pointer to update tqm value
*
* Return: None.
*/
static inline void
cdp_get_tqm_offset(ol_txrx_soc_handle soc, uint64_t *value)
{
if (!soc) {
dp_cdp_debug("Invalid Instance");
return;
}
if (!soc->ops->cmn_drv_ops ||
!soc->ops->cmn_drv_ops->txrx_get_tqm_offset)
return;
soc->ops->cmn_drv_ops->txrx_get_tqm_offset(soc, value);
}
#endif /* _CDP_TXRX_CMN_H_ */