summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKaz Fukuoka <kfukuoka@nvidia.com>2011-05-25 18:21:32 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-06-15 22:22:52 -0700
commit5627dad2ca7b7196cb93025f0f44ffbeece8e9b7 (patch)
tree721aea229e9e953dbbfc0583f315082f51eedc9b /drivers
parentd697392e32fa0c7f84a2bdb5554ffad6af5c8522 (diff)
media: tegra: avp: Clear interrupt registers when AVP starts
There was no code to clear interrupt registers for AVP. First run of AVP was OK because those registers start from reset value. But because those registers were not cleared, when the second time AVP was started, some interrupts were enabled too early. That caused interrupts coming before handlers were ready. This change also removes the workaroud for the bug. bug 827353 bug 826234 Change-Id: Ia45efe1d5f2c48d8d372a2442a614d52f1a766c0 Reviewed-on: http://git-master/r/33083 Reviewed-on: http://git-master/r/35357 Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/tegra/avp/avp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/tegra/avp/avp.c b/drivers/media/video/tegra/avp/avp.c
index 384fd5af3890..af0a9853f445 100644
--- a/drivers/media/video/tegra/avp/avp.c
+++ b/drivers/media/video/tegra/avp/avp.c
@@ -41,6 +41,7 @@
#include <mach/io.h>
#include <mach/iomap.h>
#include <mach/nvmap.h>
+#include <mach/legacy_irq.h>
#include "../../../../video/tegra/nvmap/nvmap.h"
@@ -953,6 +954,8 @@ static int avp_init(struct tegra_avp_info *avp, const char *fw_file)
wmb();
release_firmware(avp_fw);
+ tegra_init_legacy_irq_cop();
+
ret = avp_reset(avp, AVP_KERNEL_VIRT_BASE);
if (ret) {
pr_err("%s: cannot reset the AVP.. aborting..\n", __func__);
@@ -1347,6 +1350,7 @@ int tegra_avp_release(struct tegra_avp_info *avp)
{
int ret = 0;
+ pr_debug("%s: close\n", __func__);
mutex_lock(&avp->open_lock);
if (!avp->refcount) {
pr_err("%s: releasing while in invalid state\n", __func__);