From 7b2df0e3e5482bfbad2f6e9f598c6b57a27c4920 Mon Sep 17 00:00:00 2001 From: zyc Date: Wed, 28 Jan 2015 11:24:21 +0800 Subject: [PATCH] camera: camsys_drv:v0.0x1b.0 oneframe:v0.1.0xd --- arch/arm/mach-rockchip/rk_camera.c | 5 +++-- drivers/media/video/rk30_camera_oneframe.c | 4 +++- drivers/media/video/rk_camsys/camsys_drv.c | 3 ++- drivers/media/video/rk_camsys/camsys_internal.h | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/rk_camera.c b/arch/arm/mach-rockchip/rk_camera.c index f2408423cdbb..c79d50ebcbcb 100644 --- a/arch/arm/mach-rockchip/rk_camera.c +++ b/arch/arm/mach-rockchip/rk_camera.c @@ -349,11 +349,12 @@ static int rk_dts_cif_probe(struct platform_device *pdev) /*yzm*/ err = of_property_read_string(dev->of_node->parent,"compatible",&compatible); rk_camera_platform_data.rockchip_name = compatible; - vpu_node = of_find_compatible_node(NULL,NULL, "rockchip,vpu_sub"); + vpu_node = of_find_node_by_name(NULL, "vpu_service"); if(vpu_node){ err = of_property_read_u32(vpu_node, "iommu_enabled", &vpu_iommu_enabled); rk_camera_platform_data.iommu_enabled = vpu_iommu_enabled; - }else{ + of_node_put(vpu_node); + }else{ printk("get vpu_node failed,vpu_iommu_enabled == 0 !!!!!!\n"); } diff --git a/drivers/media/video/rk30_camera_oneframe.c b/drivers/media/video/rk30_camera_oneframe.c index 9a238b5ce86a..9aa388a5f549 100755 --- a/drivers/media/video/rk30_camera_oneframe.c +++ b/drivers/media/video/rk30_camera_oneframe.c @@ -289,8 +289,10 @@ static u32 CHIP_NAME; 1. Vpu_service compatible has change ,fix it. *v0.1.c: 1. setting cif capture en bit can't stop cif really,reset cif instead. +*v0.1.d: + 1. use of_find_node_by_name to get vpu node instead of of_find_compatible_node */ -#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 1, 0xc) +#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 1, 0xd) static int version = RK_CAM_VERSION_CODE; module_param(version, int, S_IRUGO); diff --git a/drivers/media/video/rk_camsys/camsys_drv.c b/drivers/media/video/rk_camsys/camsys_drv.c index 4232b242d853..d9e0e35b3a65 100755 --- a/drivers/media/video/rk_camsys/camsys_drv.c +++ b/drivers/media/video/rk_camsys/camsys_drv.c @@ -814,10 +814,11 @@ static long camsys_ioctl(struct file *filp,unsigned int cmd, unsigned long arg) #ifdef CONFIG_ROCKCHIP_IOMMU struct device_node * vpu_node =NULL; int vpu_iommu_enabled = 0; - vpu_node = of_find_compatible_node(NULL,NULL, "rockchip,vpu_sub"); + vpu_node = of_find_node_by_name(NULL, "vpu_service"); if(vpu_node){ of_property_read_u32(vpu_node, "iommu_enabled", &vpu_iommu_enabled); of_property_read_u32(camsys_dev->pdev->dev.of_node, "rockchip,isp,iommu_enable", &iommu_enabled); + of_node_put(vpu_node); if(iommu_enabled != vpu_iommu_enabled){ camsys_err("iommu status not consistent,check the dts file ! isp:%d,vpu:%d",iommu_enabled,vpu_iommu_enabled); return -EFAULT; diff --git a/drivers/media/video/rk_camsys/camsys_internal.h b/drivers/media/video/rk_camsys/camsys_internal.h index d89fc3dc7e11..6311637d99c2 100755 --- a/drivers/media/video/rk_camsys/camsys_internal.h +++ b/drivers/media/video/rk_camsys/camsys_internal.h @@ -110,8 +110,10 @@ 1) set CONFIG_CAMSYS_DRV disable as default,enable in defconfig file if needed. *v0.0x1a.0: 1) vpu_node changed from "vpu_service" to "rockchip,vpu_sub" +*v0.0x1b.0: + 1) use of_find_node_by_name to get vpu node instead of of_find_compatible_node */ -#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0x1a,0) +#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0x1b,0) #define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys" -- 2.34.1