media: tegra: enable a clock for VIP in APB MISC register
Bryan Wu [Wed, 14 Nov 2012 20:07:24 +0000 (12:07 -0800)]
Change-Id: Ic4d91f4ed70fc3daf52768118f6ea537d529a5a8
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169835
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

drivers/media/video/tegra_v4l2_camera.c

index 22e3f5b..990f6af 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/pm_runtime.h>
 #include <linux/nvhost.h>
 
+#include <mach/iomap.h>
+
 #include <media/soc_camera.h>
 #include <media/soc_mediabus.h>
 #include <media/videobuf2-dma-nvmap.h>
@@ -936,6 +938,11 @@ static void tegra_camera_work(struct work_struct *work)
 
 static void tegra_camera_activate(struct tegra_camera_dev *pcdev)
 {
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+       u32 val;
+       void __iomem *apb_misc;
+#endif
+
        nvhost_module_busy_ext(pcdev->ndev);
 
        /* Turn on relevant clocks. */
@@ -945,6 +952,12 @@ static void tegra_camera_activate(struct tegra_camera_dev *pcdev)
        clk_enable(pcdev->clk_isp);
        clk_enable(pcdev->clk_csus);
 
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+       apb_misc = IO_ADDRESS(TEGRA_APB_MISC_BASE);
+       val = readl(apb_misc + 0x42c);
+       writel(val | 0x1, apb_misc + 0x42c);
+#endif
+
        /* Save current syncpt values. */
        tegra_camera_save_syncpts(pcdev);
 }