msm: camera: icp: Print lx7 status registers

If lx7 collapse/resume fails dump status registers to help
narrow down the cause. The change also adds a write barrier
post HOST2ICP trigger.

CRs-Fixed: 2841729
Change-Id: I8201a1c84e0455044fccf88cc86a865bb89356a7
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
This commit is contained in:
Karthik Anantha Ram
2021-06-03 22:01:03 -07:00
committed by Gerrit - the friendly Code Review server
parent 97a5608106
commit c357648fcd
3 changed files with 16 additions and 3 deletions

View File

@@ -214,6 +214,9 @@ int hfi_write_cmd(void *cmd_ptr)
*/
wmb();
hfi_irq_raise(g_hfi);
/* Ensure HOST2ICP trigger is received by FW */
wmb();
err:
mutex_unlock(&hfi_cmd_q_mutex);
return rc;

View File

@@ -695,8 +695,15 @@ static int cam_lx7_core_control(
if (core_info->use_sec_pil) {
rc = qcom_scm_set_remote_state(state, CAM_FW_PAS_ID);
if (rc)
CAM_ERR(CAM_ICP, "remote state set to %s failed rc=%d",
state == TZ_STATE_RESUME ? "resume" : "suspend", rc);
CAM_ERR(CAM_ICP,
"remote state set to %s failed rc=%d IB_status0=0x%x IB_Status1=0x%x PFault=0x%x",
state == TZ_STATE_RESUME ? "resume" : "suspend", rc,
cam_io_r_mb(lx7_info->soc_info.reg_map[LX7_CIRQ_BASE].mem_base +
ICP_LX7_CIRQ_IB_STATUS0),
cam_io_r_mb(lx7_info->soc_info.reg_map[LX7_CIRQ_BASE].mem_base +
ICP_LX7_CIRQ_IB_STATUS1),
cam_io_r_mb(lx7_info->soc_info.reg_map[LX7_CIRQ_BASE].mem_base +
ICP_LX7_CIRQ_PFAULT_INFO));
} else {
if (state == TZ_STATE_RESUME) {
rc = __cam_lx7_power_resume(lx7_info);

View File

@@ -30,7 +30,10 @@
#define ICP_LX7_CIRQ_OB_IRQ_CMD 0x10
#define LX7_IRQ_CLEAR_CMD (1 << 1)
#define ICP_LX7_CIRQ_HOST2ICPINT 0x124
#define ICP_LX7_CIRQ_IB_STATUS0 0x70
#define ICP_LX7_CIRQ_IB_STATUS1 0x74
#define ICP_LX7_CIRQ_HOST2ICPINT 0x124
#define ICP_LX7_CIRQ_PFAULT_INFO 0x128
#define LX7_HOST2ICPINT (1 << 0)
#endif /* _CAM_LX7_REG_H_ */