qcacmn: Scratch register read api for qca5332
Add a new api to read tsf2 and tqm scratch register for qca5332. The function to read these registers are different from that of qcn9224 since qca5332 is a AHB radio and reading register involves ioremap of address range. Change-Id: Ib05df2ddf528594ae67109f8bcb409424a4350a2 CRs-Fixed: 3331476
This commit is contained in:

committed by
Madan Koyyalamudi

parent
45859216d6
commit
ae55a446c6
@@ -133,27 +133,6 @@
|
||||
#define PMM_REG_BASE 0xB500FC
|
||||
|
||||
#define FW_QTIME_CYCLES_PER_10_USEC 192
|
||||
|
||||
/* enum to indicate which scratch registers hold which value*/
|
||||
/* Obtain from pcie_reg_scratch.h? */
|
||||
enum hal_scratch_reg_enum {
|
||||
PMM_QTIMER_GLOBAL_OFFSET_LO_US,
|
||||
PMM_QTIMER_GLOBAL_OFFSET_HI_US,
|
||||
PMM_MAC0_TSF1_OFFSET_LO_US,
|
||||
PMM_MAC0_TSF1_OFFSET_HI_US,
|
||||
PMM_MAC0_TSF2_OFFSET_LO_US,
|
||||
PMM_MAC0_TSF2_OFFSET_HI_US,
|
||||
PMM_MAC1_TSF1_OFFSET_LO_US,
|
||||
PMM_MAC1_TSF1_OFFSET_HI_US,
|
||||
PMM_MAC1_TSF2_OFFSET_LO_US,
|
||||
PMM_MAC1_TSF2_OFFSET_HI_US,
|
||||
PMM_MLO_OFFSET_LO_US,
|
||||
PMM_MLO_OFFSET_HI_US,
|
||||
PMM_TQM_CLOCK_OFFSET_LO_US,
|
||||
PMM_TQM_CLOCK_OFFSET_HI_US,
|
||||
PMM_Q6_CRASH_REASON,
|
||||
PMM_PMM_REG_MAX
|
||||
};
|
||||
#endif
|
||||
|
||||
static uint32_t hal_get_link_desc_size_kiwi(void)
|
||||
@@ -1925,30 +1904,6 @@ static uint32_t hal_get_reo_qdesc_size_kiwi(uint32_t ba_window_size, int tid)
|
||||
}
|
||||
|
||||
#ifdef QCA_GET_TSF_VIA_REG
|
||||
static inline void
|
||||
hal_get_tsf_enum(uint32_t tsf_id, uint32_t mac_id,
|
||||
enum hal_scratch_reg_enum *tsf_enum_low,
|
||||
enum hal_scratch_reg_enum *tsf_enum_hi)
|
||||
{
|
||||
if (mac_id == 0) {
|
||||
if (tsf_id == 0) {
|
||||
*tsf_enum_low = PMM_MAC0_TSF1_OFFSET_LO_US;
|
||||
*tsf_enum_hi = PMM_MAC0_TSF1_OFFSET_HI_US;
|
||||
} else if (tsf_id == 1) {
|
||||
*tsf_enum_low = PMM_MAC0_TSF2_OFFSET_LO_US;
|
||||
*tsf_enum_hi = PMM_MAC0_TSF2_OFFSET_HI_US;
|
||||
}
|
||||
} else if (mac_id == 1) {
|
||||
if (tsf_id == 0) {
|
||||
*tsf_enum_low = PMM_MAC1_TSF1_OFFSET_LO_US;
|
||||
*tsf_enum_hi = PMM_MAC1_TSF1_OFFSET_HI_US;
|
||||
} else if (tsf_id == 1) {
|
||||
*tsf_enum_low = PMM_MAC1_TSF2_OFFSET_LO_US;
|
||||
*tsf_enum_hi = PMM_MAC1_TSF2_OFFSET_HI_US;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
hal_tsf_read_scratch_reg(struct hal_soc *soc,
|
||||
enum hal_scratch_reg_enum reg_enum)
|
||||
|
Reference in New Issue
Block a user