|
@@ -312,15 +312,15 @@ static int cam_bps_cmd_reset(struct cam_hw_soc_info *soc_info,
|
|
|
break;
|
|
|
retry_cnt++;
|
|
|
}
|
|
|
- status = cam_io_r_mb(soc_info->reg_map[0].mem_base +
|
|
|
- hw_info->cdm_irq_status);
|
|
|
- if ((status & BPS_RST_DONE_IRQ_STATUS_BIT) != 0x1) {
|
|
|
+
|
|
|
+ if (retry_cnt == HFI_MAX_POLL_TRY) {
|
|
|
CAM_ERR(CAM_ICP, "BPS CDM rst failed status 0x%x", status);
|
|
|
reset_bps_cdm_fail = true;
|
|
|
}
|
|
|
|
|
|
/* Reset BPS core*/
|
|
|
status = 0;
|
|
|
+ retry_cnt = 0;
|
|
|
cam_io_w_mb((uint32_t)0x3,
|
|
|
soc_info->reg_map[0].mem_base + hw_info->top_rst_cmd);
|
|
|
while (retry_cnt < HFI_MAX_POLL_TRY) {
|
|
@@ -336,9 +336,8 @@ static int cam_bps_cmd_reset(struct cam_hw_soc_info *soc_info,
|
|
|
break;
|
|
|
retry_cnt++;
|
|
|
}
|
|
|
- status = cam_io_r_mb(soc_info->reg_map[0].mem_base +
|
|
|
- hw_info->top_irq_status);
|
|
|
- if ((status & BPS_RST_DONE_IRQ_STATUS_BIT) != 0x1) {
|
|
|
+
|
|
|
+ if (retry_cnt == HFI_MAX_POLL_TRY) {
|
|
|
CAM_ERR(CAM_ICP, "BPS top rst failed status 0x%x", status);
|
|
|
reset_bps_top_fail = true;
|
|
|
}
|
|
@@ -354,6 +353,8 @@ static int cam_bps_cmd_reset(struct cam_hw_soc_info *soc_info,
|
|
|
|
|
|
if (reset_bps_cdm_fail || reset_bps_top_fail)
|
|
|
rc = -EAGAIN;
|
|
|
+ else
|
|
|
+ CAM_DBG(CAM_ICP, "BPS cdm and BPS top reset success");
|
|
|
|
|
|
return rc;
|
|
|
}
|