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: Srikanth Uyyala <suyyala@codeaurora.org>
This commit is contained in:
parent
2c333d317c
commit
ac77b7cb6c
1 changed files with 9 additions and 0 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Reference in a new issue