From bf71f49640d1f375a8b4ba3df8fc21f9c70d2056 Mon Sep 17 00:00:00 2001 From: zyc Date: Wed, 28 May 2014 13:54:41 +0800 Subject: [PATCH] camsys driver: v0.b.0 --- drivers/media/video/rk_camsys/camsys_internal.h | 4 +++- drivers/media/video/rk_camsys/camsys_marvin.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/rk_camsys/camsys_internal.h b/drivers/media/video/rk_camsys/camsys_internal.h index 957a772b42e1..ebf92d262aec 100755 --- a/drivers/media/video/rk_camsys/camsys_internal.h +++ b/drivers/media/video/rk_camsys/camsys_internal.h @@ -74,8 +74,10 @@ *v0.9.0: 1) set isp freq to 210M *v0.a.0: * 1) fix camsys_i2c_write and camsys_i2c_write can't support reg_size=0; +*v0.b.0: + 1) control ddr freq by marvin self other than by clk unit. */ -#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0xa,0) +#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0,0xb,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 ae4d295113e7..1801637d3527 100755 --- a/drivers/media/video/rk_camsys/camsys_marvin.c +++ b/drivers/media/video/rk_camsys/camsys_marvin.c @@ -1,6 +1,12 @@ #include "camsys_marvin.h" #include "camsys_soc_priv.h" +#include +#include + +extern int rockchip_set_system_status(unsigned long status); +extern int rockchip_clear_system_status(unsigned long status); + static const char miscdev_name[] = CAMSYS_MARVIN_DEVNAME; static int camsys_mrv_iomux_cb(camsys_extdev_t *extdev,void *ptr) @@ -129,6 +135,7 @@ static int camsys_mrv_clkin_cb(void *ptr, unsigned int on) camsys_mrv_clk_t *clk = (camsys_mrv_clk_t*)camsys_dev->clk; if (on && !clk->in_on) { + rockchip_set_system_status(SYS_STATUS_ISP); clk_prepare_enable(clk->aclk_isp); clk_prepare_enable(clk->hclk_isp); @@ -156,6 +163,7 @@ static int camsys_mrv_clkin_cb(void *ptr, unsigned int on) clk_disable_unprepare(clk->pclkin_isp); clk_disable_unprepare(clk->pd_isp); + rockchip_clear_system_status(SYS_STATUS_ISP); clk->in_on = false; camsys_trace(1, "%s clock in turn off",dev_name(camsys_dev->miscdev.this_device)); } -- 2.34.1