Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9346b13 authored by Srikanth Uyyala's avatar Srikanth Uyyala Committed by Gerrit - the friendly Code Review server
Browse files

msm: isp: Clear irq status if irq is set again with same value



Sometimes same irq is received even after clearing irq.
make sure irq status is rest by clearing the irq again.

Change-Id: Ib5355a4b9952fa7f02d1dea69b5fb767928e4b9f
Signed-off-by: default avatarSrikanth Uyyala <suyyala@codeaurora.org>
parent 61f7384a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -570,6 +570,7 @@ void msm_vfe47_process_error_status(struct vfe_device *vfe_dev)
void msm_vfe47_read_and_clear_irq_status(struct vfe_device *vfe_dev,
	uint32_t *irq_status0, uint32_t *irq_status1)
{
	uint32_t count = 0;
	*irq_status0 = msm_camera_io_r(vfe_dev->vfe_base + 0x6C);
	*irq_status1 = msm_camera_io_r(vfe_dev->vfe_base + 0x70);
	/* Mask off bits that are not enabled */
@@ -578,6 +579,14 @@ void msm_vfe47_read_and_clear_irq_status(struct vfe_device *vfe_dev,
	msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58);
	*irq_status0 &= vfe_dev->irq0_mask;
	*irq_status1 &= vfe_dev->irq1_mask;
	/* check if status register is cleared if not clear again*/
	while (*irq_status0 &&
		(*irq_status0 & msm_camera_io_r(vfe_dev->vfe_base + 0x6C)) &&
		(count < MAX_RECOVERY_THRESHOLD)) {
		msm_camera_io_w(*irq_status0, vfe_dev->vfe_base + 0x64);
		msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58);
		count++;
	}

	if (*irq_status1 & (1 << 0)) {
		vfe_dev->error_info.camif_status =