mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
camsys_drv: v0.0x1d.0
This commit is contained in:
parent
d93cf33990
commit
13549edf67
|
|
@ -113,8 +113,10 @@
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ static int camsys_mrv_clkin_cb(void *ptr, unsigned int on)
|
|||
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);
|
||||
|
|
@ -356,10 +357,11 @@ static int camsys_mrv_clkin_cb(void *ptr, unsigned int on)
|
|||
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);
|
||||
|
|
@ -564,11 +566,11 @@ int camsys_mrv_probe_cb(struct platform_device *pdev, camsys_dev_t *camsys_dev)
|
|||
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;
|
||||
|
|
@ -657,6 +659,9 @@ int camsys_mrv_probe_cb(struct platform_device *pdev, camsys_dev_t *camsys_dev)
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ typedef struct camsys_mrv_clk_s {
|
|||
struct clk *cif_clk_out;
|
||||
struct clk *cif_clk_pll;
|
||||
struct clk *pclk_dphyrx;
|
||||
struct clk *aclk_rga;
|
||||
|
||||
unsigned int out_on;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user