|
@@ -529,6 +529,7 @@ static int cam_ife_csid_path_reset(struct cam_ife_csid_hw *csid_hw,
|
|
struct cam_csid_reset_cfg_args *reset)
|
|
struct cam_csid_reset_cfg_args *reset)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
|
|
+ unsigned long rem_jiffies;
|
|
struct cam_hw_soc_info *soc_info;
|
|
struct cam_hw_soc_info *soc_info;
|
|
struct cam_isp_resource_node *res;
|
|
struct cam_isp_resource_node *res;
|
|
const struct cam_ife_csid_reg_offset *csid_reg;
|
|
const struct cam_ife_csid_reg_offset *csid_reg;
|
|
@@ -648,14 +649,13 @@ static int cam_ife_csid_path_reset(struct cam_ife_csid_hw *csid_hw,
|
|
cam_io_w_mb(reset_strb_val, soc_info->reg_map[0].mem_base +
|
|
cam_io_w_mb(reset_strb_val, soc_info->reg_map[0].mem_base +
|
|
reset_strb_addr);
|
|
reset_strb_addr);
|
|
|
|
|
|
- rc = wait_for_completion_timeout(complete,
|
|
|
|
|
|
+ rem_jiffies = wait_for_completion_timeout(complete,
|
|
msecs_to_jiffies(IFE_CSID_TIMEOUT));
|
|
msecs_to_jiffies(IFE_CSID_TIMEOUT));
|
|
- if (rc <= 0) {
|
|
|
|
|
|
+ if (!rem_jiffies) {
|
|
|
|
+ rc = -ETIMEDOUT;
|
|
CAM_ERR(CAM_ISP, "CSID:%d Res id %d fail rc = %d",
|
|
CAM_ERR(CAM_ISP, "CSID:%d Res id %d fail rc = %d",
|
|
csid_hw->hw_intf->hw_idx,
|
|
csid_hw->hw_intf->hw_idx,
|
|
res->res_id, rc);
|
|
res->res_id, rc);
|
|
- if (rc == 0)
|
|
|
|
- rc = -ETIMEDOUT;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
end:
|
|
end:
|