qcacmn: add new api to get the bus reg dump
Add new wrapper to get the bus specific register information via the bus driver. Change-Id: I544b23c8f6654e9215fb4f03203d6754c766dada CRs-Fixed: 2833251
This commit is contained in:

committed by
snandini

parent
0cb4658b79
commit
69c17ec173
@@ -303,4 +303,33 @@ void qdf_register_recovery_reason_update(qdf_recovery_reason_update_callback
|
||||
*/
|
||||
void qdf_recovery_reason_update(enum qdf_hang_reason reason);
|
||||
|
||||
/**
|
||||
* qdf_bus_reg_dump() - callback for getting bus specific register dump
|
||||
* @dev: Bus specific device
|
||||
* @buf: Hang event buffer in which the data will be populated
|
||||
* @len: length of data to be populated in the hang event buffer
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
typedef void (*qdf_bus_reg_dump)(struct device *dev, uint8_t *buf,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* qdf_register_get_bus_reg_dump() - Register callback to update bus register
|
||||
* dump
|
||||
* @qdf_bus_reg_dump: callback to update bus register dump
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void qdf_register_get_bus_reg_dump(qdf_bus_reg_dump callback);
|
||||
|
||||
/**
|
||||
* qdf_get_bus_reg_dump() - Get the register dump for the bus
|
||||
* @dev: device
|
||||
* @buffer: buffer for hang data
|
||||
* @len: len of hang data
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void qdf_get_bus_reg_dump(struct device *dev, uint8_t *buf, uint32_t len);
|
||||
#endif /*_QDF_PLATFORM_H*/
|
||||
|
@@ -1346,6 +1346,7 @@ enum qdf_suspend_type {
|
||||
* @QDF_WMI_BUF_SEQUENCE_MISMATCH: WMI Tx completion buffer sequence mismatch
|
||||
* @QDF_HAL_REG_WRITE_FAILURE: HAL register writing failures
|
||||
* @QDF_SUSPEND_NO_CREDIT: host lack of credit after suspend
|
||||
* @QCA_HANG_BUS_FAILURE: Bus failure
|
||||
*/
|
||||
enum qdf_hang_reason {
|
||||
QDF_REASON_UNSPECIFIED,
|
||||
@@ -1371,6 +1372,7 @@ enum qdf_hang_reason {
|
||||
QDF_WMI_BUF_SEQUENCE_MISMATCH,
|
||||
QDF_HAL_REG_WRITE_FAILURE,
|
||||
QDF_SUSPEND_NO_CREDIT,
|
||||
QCA_HANG_BUS_FAILURE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -32,6 +32,8 @@ static qdf_is_drv_connected_callback is_drv_connected_cb;
|
||||
static qdf_wmi_send_over_qmi_callback _wmi_send_recv_qmi_cb;
|
||||
static qdf_is_drv_supported_callback is_drv_supported_cb;
|
||||
static qdf_recovery_reason_update_callback update_recovery_reason_cb;
|
||||
static qdf_bus_reg_dump get_bus_reg_dump;
|
||||
|
||||
|
||||
|
||||
void qdf_register_fw_down_callback(qdf_is_fw_down_callback is_fw_down)
|
||||
@@ -215,3 +217,20 @@ void qdf_recovery_reason_update(enum qdf_hang_reason reason)
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_recovery_reason_update);
|
||||
|
||||
void qdf_register_get_bus_reg_dump(qdf_bus_reg_dump callback)
|
||||
{
|
||||
get_bus_reg_dump = callback;
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_register_get_bus_reg_dump);
|
||||
|
||||
void qdf_get_bus_reg_dump(struct device *dev, uint8_t *buf, uint32_t len)
|
||||
{
|
||||
if (!get_bus_reg_dump)
|
||||
return;
|
||||
|
||||
get_bus_reg_dump(dev, buf, len);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_get_bus_reg_dump);
|
||||
|
Reference in New Issue
Block a user