Lines Matching refs:ccdc_cfg
68 } ccdc_cfg = { variable
110 return __raw_readl(ccdc_cfg.base_addr + offset); in regr()
115 __raw_writel(val, ccdc_cfg.base_addr + offset); in regw()
145 dev_dbg(ccdc_cfg.dev, "\nStarting ccdc_setwin..."); in ccdc_setwin()
184 dev_dbg(ccdc_cfg.dev, "\nEnd of ccdc_setwin..."); in ccdc_setwin()
192 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to ALAW...\n", val); in ccdc_readregs()
194 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to CLAMP...\n", val); in ccdc_readregs()
196 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to DCSUB...\n", val); in ccdc_readregs()
198 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to BLKCMP...\n", val); in ccdc_readregs()
200 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to FPC_ADDR...\n", val); in ccdc_readregs()
202 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to FPC...\n", val); in ccdc_readregs()
204 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to FMTCFG...\n", val); in ccdc_readregs()
206 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to COLPTN...\n", val); in ccdc_readregs()
208 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to FMT_HORZ...\n", val); in ccdc_readregs()
210 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to FMT_VERT...\n", val); in ccdc_readregs()
212 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to HSIZE_OFF...\n", val); in ccdc_readregs()
214 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to SDOFST...\n", val); in ccdc_readregs()
216 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to VP_OUT...\n", val); in ccdc_readregs()
218 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to SYN_MODE...\n", val); in ccdc_readregs()
220 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to HORZ_INFO...\n", val); in ccdc_readregs()
222 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to VERT_START...\n", val); in ccdc_readregs()
224 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to VERT_LINES...\n", val); in ccdc_readregs()
233 dev_dbg(ccdc_cfg.dev, "\nInvalid data line select"); in validate_ccdc_param()
243 &ccdc_cfg.bayer.config_params; in ccdc_update_raw_params()
279 dev_dbg(ccdc_cfg.dev, in ccdc_update_raw_params()
292 dev_dbg(ccdc_cfg.dev, "\n copy_from_user failed"); in ccdc_update_raw_params()
302 &ccdc_cfg.bayer.config_params; in ccdc_close()
337 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_open()
353 if (ccdc_cfg.if_type != VPFE_RAW_BAYER) in ccdc_set_params()
358 dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying" in ccdc_set_params()
376 struct ccdc_params_ycbcr *params = &ccdc_cfg.ycbcr; in ccdc_config_ycbcr()
379 dev_dbg(ccdc_cfg.dev, "\nStarting ccdc_config_ycbcr..."); in ccdc_config_ycbcr()
407 if (ccdc_cfg.if_type == VPFE_BT656_10BIT) in ccdc_config_ycbcr()
429 if (ccdc_cfg.if_type == VPFE_BT656_10BIT) in ccdc_config_ycbcr()
449 dev_dbg(ccdc_cfg.dev, "\nEnd of ccdc_config_ycbcr...\n"); in ccdc_config_ycbcr()
460 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to DCSUB...\n", val); in ccdc_config_black_clamp()
462 dev_dbg(ccdc_cfg.dev, "\nWriting 0x0000 to CLAMP...\n"); in ccdc_config_black_clamp()
477 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to CLAMP...\n", val); in ccdc_config_black_clamp()
480 dev_dbg(ccdc_cfg.dev, "\nWriting 0x00000000 to DCSUB...\n"); in ccdc_config_black_clamp()
510 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC_ADDR...\n", in ccdc_config_fpc()
516 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC...\n", val); in ccdc_config_fpc()
520 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC...\n", val); in ccdc_config_fpc()
529 struct ccdc_params_raw *params = &ccdc_cfg.bayer; in ccdc_config_raw()
531 &ccdc_cfg.bayer.config_params; in ccdc_config_raw()
535 dev_dbg(ccdc_cfg.dev, "\nStarting ccdc_config_raw..."); in ccdc_config_raw()
565 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to ALAW...\n", val); in ccdc_config_raw()
602 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FMTCFG...\n", val); in ccdc_config_raw()
606 dev_dbg(ccdc_cfg.dev, "\nWriting 0xBB11BB11 to COLPTN...\n"); in ccdc_config_raw()
616 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FMT_HORZ...\n", val); in ccdc_config_raw()
624 dev_dbg(ccdc_cfg.dev, "\nparams->win.height 0x%x ...\n", in ccdc_config_raw()
628 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FMT_VERT...\n", val); in ccdc_config_raw()
630 dev_dbg(ccdc_cfg.dev, "\nbelow regw(val, FMT_VERT)..."); in ccdc_config_raw()
651 dev_dbg(ccdc_cfg.dev, "\nWriting 0x4B6D to SDOFST..\n"); in ccdc_config_raw()
657 dev_dbg(ccdc_cfg.dev, "\nWriting 0x0249 to SDOFST..\n"); in ccdc_config_raw()
661 dev_dbg(ccdc_cfg.dev, "\nWriting 0x0000 to SDOFST...\n"); in ccdc_config_raw()
682 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to VP_OUT...\n", val); in ccdc_config_raw()
684 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to SYN_MODE...\n", syn_mode); in ccdc_config_raw()
687 dev_dbg(ccdc_cfg.dev, "\nend of ccdc_config_raw..."); in ccdc_config_raw()
693 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_configure()
702 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_set_buftype()
703 ccdc_cfg.bayer.buf_type = buf_type; in ccdc_set_buftype()
705 ccdc_cfg.ycbcr.buf_type = buf_type; in ccdc_set_buftype()
711 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_get_buftype()
712 return ccdc_cfg.bayer.buf_type; in ccdc_get_buftype()
713 return ccdc_cfg.ycbcr.buf_type; in ccdc_get_buftype()
719 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) { in ccdc_enum_pix()
735 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) { in ccdc_set_pixel_format()
736 ccdc_cfg.bayer.pix_fmt = CCDC_PIXFMT_RAW; in ccdc_set_pixel_format()
738 ccdc_cfg.bayer.config_params.alaw.enable = 1; in ccdc_set_pixel_format()
743 ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_YCBYCR; in ccdc_set_pixel_format()
745 ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_CBYCRY; in ccdc_set_pixel_format()
754 struct ccdc_a_law *alaw = &ccdc_cfg.bayer.config_params.alaw; in ccdc_get_pixel_format()
757 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_get_pixel_format()
763 if (ccdc_cfg.ycbcr.pix_order == CCDC_PIXORDER_YCBYCR) in ccdc_get_pixel_format()
773 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_set_image_window()
774 ccdc_cfg.bayer.win = *win; in ccdc_set_image_window()
776 ccdc_cfg.ycbcr.win = *win; in ccdc_set_image_window()
782 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_get_image_window()
783 *win = ccdc_cfg.bayer.win; in ccdc_get_image_window()
785 *win = ccdc_cfg.ycbcr.win; in ccdc_get_image_window()
791 &ccdc_cfg.bayer.config_params; in ccdc_get_line_length()
794 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) { in ccdc_get_line_length()
797 len = ccdc_cfg.bayer.win.width; in ccdc_get_line_length()
799 len = ccdc_cfg.bayer.win.width * 2; in ccdc_get_line_length()
801 len = ccdc_cfg.ycbcr.win.width * 2; in ccdc_get_line_length()
807 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_set_frame_format()
808 ccdc_cfg.bayer.frm_fmt = frm_fmt; in ccdc_set_frame_format()
810 ccdc_cfg.ycbcr.frm_fmt = frm_fmt; in ccdc_set_frame_format()
816 if (ccdc_cfg.if_type == VPFE_RAW_BAYER) in ccdc_get_frame_format()
817 return ccdc_cfg.bayer.frm_fmt; in ccdc_get_frame_format()
819 return ccdc_cfg.ycbcr.frm_fmt; in ccdc_get_frame_format()
835 ccdc_cfg.if_type = params->if_type; in ccdc_set_hw_if_params()
842 ccdc_cfg.ycbcr.vd_pol = params->vdpol; in ccdc_set_hw_if_params()
843 ccdc_cfg.ycbcr.hd_pol = params->hdpol; in ccdc_set_hw_if_params()
984 ccdc_cfg.base_addr = ioremap_nocache(res->start, resource_size(res)); in dm644x_ccdc_probe()
985 if (!ccdc_cfg.base_addr) { in dm644x_ccdc_probe()
991 ccdc_cfg.mclk = clk_get(&pdev->dev, "master"); in dm644x_ccdc_probe()
992 if (IS_ERR(ccdc_cfg.mclk)) { in dm644x_ccdc_probe()
993 status = PTR_ERR(ccdc_cfg.mclk); in dm644x_ccdc_probe()
996 if (clk_enable(ccdc_cfg.mclk)) { in dm644x_ccdc_probe()
1002 ccdc_cfg.sclk = clk_get(&pdev->dev, "slave"); in dm644x_ccdc_probe()
1003 if (IS_ERR(ccdc_cfg.sclk)) { in dm644x_ccdc_probe()
1004 status = PTR_ERR(ccdc_cfg.sclk); in dm644x_ccdc_probe()
1007 if (clk_enable(ccdc_cfg.sclk)) { in dm644x_ccdc_probe()
1011 ccdc_cfg.dev = &pdev->dev; in dm644x_ccdc_probe()
1015 clk_put(ccdc_cfg.sclk); in dm644x_ccdc_probe()
1017 clk_put(ccdc_cfg.mclk); in dm644x_ccdc_probe()
1019 iounmap(ccdc_cfg.base_addr); in dm644x_ccdc_probe()
1031 clk_put(ccdc_cfg.mclk); in dm644x_ccdc_remove()
1032 clk_put(ccdc_cfg.sclk); in dm644x_ccdc_remove()
1033 iounmap(ccdc_cfg.base_addr); in dm644x_ccdc_remove()
1048 clk_disable(ccdc_cfg.mclk); in dm644x_ccdc_suspend()
1049 clk_disable(ccdc_cfg.sclk); in dm644x_ccdc_suspend()
1057 clk_enable(ccdc_cfg.mclk); in dm644x_ccdc_resume()
1058 clk_enable(ccdc_cfg.sclk); in dm644x_ccdc_resume()