From: zyc Date: Fri, 18 Jan 2013 02:51:11 +0000 (+0800) Subject: camera:support 3188 fpga success. X-Git-Tag: firefly_0821_release~7893 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d938f087a7accd99b320fbf77090c2cf1ec227c;p=firefly-linux-kernel-4.4.55.git camera:support 3188 fpga success. --- diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 0f739fc8289c..c0bde79c51c8 100755 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -202,6 +202,11 @@ ifeq ($(CONFIG_ARCH_RK30),y) obj-$(CONFIG_VIDEO_RKCIF_WORK_ONEFRAME) += rk30_camera_oneframe.o obj-$(CONFIG_VIDEO_RKCIF_WORK_PINGPONG) += rk30_camera_pingpong.o endif +ifeq ($(CONFIG_ARCH_RK3188),y) +obj-$(CONFIG_VIDEO_RKCIF_WORK_ONEFRAME) += rk30_camera_oneframe.o +obj-$(CONFIG_VIDEO_RKCIF_WORK_PINGPONG) += rk30_camera_pingpong.o +endif + ifeq ($(CONFIG_ARCH_RK2928),y) obj-$(CONFIG_VIDEO_RKCIF_WORK_ONEFRAME) += rk30_camera_oneframe.o obj-$(CONFIG_VIDEO_RKCIF_WORK_PINGPONG) += rk30_camera_pingpong.o diff --git a/drivers/media/video/rk30_camera_oneframe.c b/drivers/media/video/rk30_camera_oneframe.c index 2db874f26dcf..f4777f7d3f67 100755 --- a/drivers/media/video/rk30_camera_oneframe.c +++ b/drivers/media/video/rk30_camera_oneframe.c @@ -40,7 +40,7 @@ #include #include #include "../../video/rockchip/rga/rga.h" -#if defined(CONFIG_ARCH_RK30) +#if defined(CONFIG_ARCH_RK30)||defined(CONFIG_ARCH_RK3188) #include #include #include @@ -160,7 +160,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR); #define read_cif_reg(base,addr) __raw_readl(addr+(base)) #define mask_cif_reg(addr, msk, val) write_cif_reg(addr, (val)|((~(msk))&read_cif_reg(addr))) -#if defined(CONFIG_ARCH_RK30) +#if defined(CONFIG_ARCH_RK30) || defined(CONFIG_ARCH_RK3188) //CRU,PIXCLOCK #define CRU_PCLK_REG30 0xbc #define ENANABLE_INVERT_PCLK_CIF0 ((0x1<<24)|(0x1<<8)) @@ -932,7 +932,7 @@ static int rk_camera_scale_crop_rga(struct work_struct *work){ } #endif -#if (CONFIG_CAMERA_SCALE_CROP_MACHINE == RK_CAM_SCALE_CROP_IPP) +#if ((defined(CONFIG_VIDEO_RK29_DIGITALZOOM_IPP_ON)) && (CONFIG_CAMERA_SCALE_CROP_MACHINE == RK_CAM_SCALE_CROP_IPP)) static int rk_camera_scale_crop_ipp(struct work_struct *work) { @@ -2889,7 +2889,11 @@ static void rk_camera_cif_iomux(int cif_index) #if defined(CONFIG_ARCH_RK3066B) || defined(CONFIG_ARCH_RK3188) switch(cif_index){ case 0: - iomux_set(CIF0_CLKOUT); + #if defined(CONFIG_ARCH_RK3066B) + iomux_set(CIF0_CLKOUT); + #else + iomux_set(CIF_CLKOUT); + #endif write_grf_reg(GRF_IO_CON3, (CIF_DRIVER_STRENGTH_MASK|CIF_DRIVER_STRENGTH_8MA)); write_grf_reg(GRF_IO_CON4, (CIF_CLKOUT_AMP_MASK|CIF_CLKOUT_AMP_1V8)); #if (CONFIG_CAMERA_INPUT_FMT_SUPPORT & (RK_CAM_INPUT_FMT_RAW10|RK_CAM_INPUT_FMT_RAW12)) @@ -3113,8 +3117,7 @@ static int rk_camera_probe(struct platform_device *pdev) hrtimer_init(&(pcdev->fps_timer.timer), CLOCK_MONOTONIC, HRTIMER_MODE_REL); pcdev->fps_timer.timer.function = rk_camera_fps_func; pcdev->icd_cb.sensor_cb = NULL; - -#if (CONFIG_CAMERA_SCALE_CROP_MACHINE == RK_CAM_SCALE_CROP_IPP) +#if ((defined(CONFIG_VIDEO_RK29_DIGITALZOOM_IPP_ON)) && (CONFIG_CAMERA_SCALE_CROP_MACHINE == RK_CAM_SCALE_CROP_IPP)) pcdev->icd_cb.scale_crop_cb = rk_camera_scale_crop_ipp; #elif (CONFIG_CAMERA_SCALE_CROP_MACHINE == RK_CAM_SCALE_CROP_ARM) pcdev->icd_cb.scale_crop_cb = rk_camera_scale_crop_arm;