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

Commit 4230cbde authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 891d4621 eaba8cc6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -566,6 +566,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 */
@@ -574,6 +575,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 =