qcacmn: Add stats for register write failure
Sometimes the register write in windowed region are not going through, thereby retaining the previous value, which can be incorrect for a certain mode of operation for the driver. This kind of incorrect register values, due to a register write not succeeding, can lead to unwanted issues. Also the simple logging of any such occcurence can be over-written in the logs, thereby going unnoticed. Add a HAL level statistics to maintain the count of such failed register writes. Change-Id: Ib5e98705c23f0c916cb85f518576663710eb30e0 CRs-Fixed: 2611839
This commit is contained in:
@@ -94,6 +94,16 @@ hal_set_verbose_debug(bool flag)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_HAL_SOC_STATS
|
||||
#define HAL_STATS_INC(_handle, _field, _delta) \
|
||||
{ \
|
||||
if (likely(_handle)) \
|
||||
_handle->stats._field += _delta; \
|
||||
}
|
||||
#else
|
||||
#define HAL_STATS_INC(_handle, _field, _delta)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hal_reg_write_result_check() - check register writing result
|
||||
* @hal_soc: HAL soc handle
|
||||
@@ -117,6 +127,8 @@ static inline void hal_reg_write_result_check(struct hal_soc *hal_soc,
|
||||
"the expectation 0x%x, actual value 0x%x\n",
|
||||
exp_val,
|
||||
value);
|
||||
HAL_STATS_INC(hal_soc, reg_write_fail, 1);
|
||||
QDF_BUG(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user