media: video: tegra: nvavp: Fix avp print issue
Soumen Kumar Dey [Thu, 28 Jun 2012 08:05:18 +0000 (13:05 +0530)]
Anding with NVAVP_INBOX_VALID is used to clear interrupts.

Change-Id: I941b3af44cd19280832aff3364d110b645aa1ec8
Signed-off-by: Soumen Kumar Dey <sdey@nvidia.com>
Reviewed-on: http://git-master/r/111821
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/media/video/tegra/nvavp/nvavp_dev.c

index e0a3d89..9a54f8e 100644 (file)
@@ -300,8 +300,6 @@ static int nvavp_service(struct nvavp_info *nvavp)
        if (!(inbox & NVAVP_INBOX_VALID))
                inbox = 0x00000000;
 
-       writel(0x00000000, NVAVP_OS_INBOX);
-
        if (inbox & NVE276_OS_INTERRUPT_VIDEO_IDLE)
                schedule_work(&nvavp->clock_disable_work);
 
@@ -328,6 +326,7 @@ static int nvavp_service(struct nvavp_info *nvavp)
                dev_err(&nvavp->nvhost_dev->dev, "AVP breakpoint hit\n");
        if (inbox & NVE276_OS_INTERRUPT_TIMEOUT)
                dev_err(&nvavp->nvhost_dev->dev, "AVP timeout\n");
+       writel(inbox & NVAVP_INBOX_VALID, NVAVP_OS_INBOX);
 
        return 0;
 }