*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"
#include "camsys_marvin.h"
#include "camsys_soc_priv.h"
+#include <linux/rockchip/common.h>
+#include <dt-bindings/clock/rk_system_status.h>
+
+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)
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);
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));
}