From 947157fbfb8c894a3b65ca9d6e3321da7c176cb3 Mon Sep 17 00:00:00 2001
From: zyc <zyc@rock-chips.com>
Date: Thu, 18 Sep 2014 18:40:35 +0800
Subject: [PATCH] camsys_drv: v0.0x16.0

---
 drivers/media/video/rk_camsys/camsys_drv.c      | 5 +++--
 drivers/media/video/rk_camsys/camsys_internal.h | 4 +++-
 drivers/media/video/rk_camsys/camsys_marvin.c   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/rk_camsys/camsys_drv.c b/drivers/media/video/rk_camsys/camsys_drv.c
index 049492f9fa0a..4edcf457b81b 100755
--- a/drivers/media/video/rk_camsys/camsys_drv.c
+++ b/drivers/media/video/rk_camsys/camsys_drv.c
@@ -790,8 +790,9 @@ static long camsys_ioctl(struct file *filp,unsigned int cmd, unsigned long arg)
 	    {
             int iommu_enabled = 0;
             #ifdef CONFIG_ROCKCHIP_IOMMU
-                of_property_read_u32(camsys_dev->pdev->dev.of_node, "rockchip,isp,iommu_enable", &iommu_enabled);
-            #endif
+                //of_property_read_u32(camsys_dev->pdev->dev.of_node, "rockchip,isp,iommu_enable", &iommu_enabled);
+            	iommu_enabled = 1;
+			#endif
             if (copy_to_user((void __user *)arg,(void*)&iommu_enabled, sizeof(iommu_enabled)))
                 return -EFAULT;
             break;
diff --git a/drivers/media/video/rk_camsys/camsys_internal.h b/drivers/media/video/rk_camsys/camsys_internal.h
index fd46812c1893..02995906f1f7 100755
--- a/drivers/media/video/rk_camsys/camsys_internal.h
+++ b/drivers/media/video/rk_camsys/camsys_internal.h
@@ -99,8 +99,10 @@
          1) camsys_extdev_register return -EBUSY when this dev_id has been registered;
 *v0.0x15.0:
          1) check extdev name when dev_id has been registered;
+*v0.0x16.0:
+		 1) enable or disable IOMMU just depending on CONFIG_ROCKCHIP_IOMMU. 
 */
-#define CAMSYS_DRIVER_VERSION                   KERNEL_VERSION(0,0x15,0)
+#define CAMSYS_DRIVER_VERSION                   KERNEL_VERSION(0,0x16,0)
 
 
 #define CAMSYS_PLATFORM_DRV_NAME                "RockChip-CamSys"
diff --git a/drivers/media/video/rk_camsys/camsys_marvin.c b/drivers/media/video/rk_camsys/camsys_marvin.c
index a3bf12e4f31d..94d856f774f5 100755
--- a/drivers/media/video/rk_camsys/camsys_marvin.c
+++ b/drivers/media/video/rk_camsys/camsys_marvin.c
@@ -237,16 +237,17 @@ static int camsys_mrv_iommu_cb(void *ptr,camsys_sysctrl_t *devctl)
     struct ion_client *client = NULL;
     struct ion_handle *handle = NULL;
     camsys_iommu_t *iommu = NULL;
-    int ret = 0,iommu_enabled = 0;
+    int ret = 0;
     camsys_dev_t * camsys_dev = (camsys_dev_t *)ptr;
 
+#if 0
     of_property_read_u32(camsys_dev->pdev->dev.of_node, "rockchip,isp,iommu_enable", &iommu_enabled);
     if(iommu_enabled != 1){
         camsys_err("isp iommu have not been enabled!\n");
         ret = -1;
         goto iommu_end;
     }
-    
+#endif
     iommu_dev = rockchip_get_sysmmu_device_by_compatible(ISP_IOMMU_COMPATIBLE_NAME);
     if(!iommu_dev){
         camsys_err("get iommu device erro!\n");
-- 
2.34.1