1) use of_find_node_by_name to get vpu node instead of of_find_compatible_node
*v0.0x1c.0:
1) support rk3368.
+*v0.0x1d.0:
+ 1) enable aclk_rga for rk3368, otherwise, isp reset will cause system halted.
*/
-#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0x1c,0)
+#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0x1d,0)
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
if(CHIP_TYPE == 3368){
clk_prepare_enable(clk->cif_clk_out);
clk_prepare_enable(clk->pclk_dphyrx);
+ clk_prepare_enable(clk->aclk_rga);
}else{
clk_prepare_enable(clk->pd_isp);
clk_prepare_enable(clk->clk_mipi_24m);
clk_disable_unprepare(clk->hclk_isp);
clk_disable_unprepare(clk->isp);
clk_disable_unprepare(clk->isp_jpe);
- clk_disable_unprepare(clk->pclkin_isp);
+ clk_disable_unprepare(clk->pclkin_isp);
if(CHIP_TYPE == 3368){
clk_disable_unprepare(clk->cif_clk_out);
clk_disable_unprepare(clk->pclk_dphyrx);
+ clk_disable_unprepare(clk->aclk_rga);
}else{
clk_disable_unprepare(clk->clk_mipi_24m);
clk_disable_unprepare(clk->pd_isp);
mrv_clk->cif_clk_out = devm_clk_get(&pdev->dev, "clk_cif_out");
mrv_clk->cif_clk_pll = devm_clk_get(&pdev->dev, "clk_cif_pll");
mrv_clk->pclk_dphyrx = devm_clk_get(&pdev->dev, "pclk_dphyrx");
-
+ mrv_clk->aclk_rga = devm_clk_get(&pdev->dev, "aclk_rga");
if (IS_ERR_OR_NULL(mrv_clk->aclk_isp) || IS_ERR_OR_NULL(mrv_clk->hclk_isp) ||
IS_ERR_OR_NULL(mrv_clk->isp) || IS_ERR_OR_NULL(mrv_clk->isp_jpe) || IS_ERR_OR_NULL(mrv_clk->pclkin_isp) ||
- IS_ERR_OR_NULL(mrv_clk->cif_clk_out) || IS_ERR_OR_NULL(mrv_clk->pclk_dphyrx)) {
+ IS_ERR_OR_NULL(mrv_clk->cif_clk_out) || IS_ERR_OR_NULL(mrv_clk->pclk_dphyrx)||IS_ERR_OR_NULL(mrv_clk->aclk_rga)) {
camsys_err("Get %s clock resouce failed!\n",miscdev_name);
err = -EINVAL;
goto clk_failed;
if (!IS_ERR_OR_NULL(mrv_clk->pclk_dphyrx)) {
clk_put(mrv_clk->pclk_dphyrx);
}
+ if (!IS_ERR_OR_NULL(mrv_clk->aclk_rga)) {
+ clk_put(mrv_clk->aclk_rga);
+ }
}
kfree(mrv_clk);