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");
}
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);
#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;
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"