2 #include "camsys_soc_priv.h"
6 static camsys_soc_priv_t* camsys_soc_p;
8 #include "camsys_soc_rk3288.c"
10 static int camsys_rk3288_cfg (camsys_soc_cfg_t cfg_cmd, void* cfg_para)
12 unsigned int *para_int;
16 case Clk_DriverStrength_Cfg:
18 para_int = (unsigned int*)cfg_para;
19 __raw_writel((((*para_int)&0x03)<<3)|(0x03<<3), RK_GRF_VIRT+0x01d4);
23 case Cif_IoDomain_Cfg:
25 para_int = (unsigned int*)cfg_para;
26 if (*para_int < 28000000) {
27 __raw_writel(((1<<1)|(1<<(1+16))),RK_GRF_VIRT+0x0380); // 1.8v IO
29 __raw_writel(((0<<1)|(1<<(1+16))),RK_GRF_VIRT+0x0380); // 3.3v IO
36 camsys_rk3288_mipihpy_cfg((camsys_mipiphy_soc_para_t*)cfg_para);
48 camsys_warn("cfg_cmd: 0x%x isn't support for %s",cfg_cmd,camsys_soc_p->name);
59 camsys_soc_priv_t* camsys_soc_get(void)
61 if (camsys_soc_p != NULL) {
68 int camsys_soc_init(void)
70 camsys_soc_p = kzalloc(sizeof(camsys_soc_priv_t),GFP_KERNEL);
71 if (camsys_soc_p == NULL) {
72 camsys_err("malloc camsys_soc_priv_t failed!");
76 if (soc_is_rk3288()) {
77 strlcpy(camsys_soc_p->name,"camsys_rk3288",31);
78 camsys_soc_p->soc_cfg = camsys_rk3288_cfg;
80 camsys_err("camsys isn't support soc: 0x%lx!",rockchip_soc_id);
86 if (camsys_soc_p != NULL) {
93 int camsys_soc_deinit(void)
95 if (camsys_soc_p != NULL) {