Lines Matching full:isp

5  * TI OMAP3 ISP - CCP2 module
22 #include "isp.h"
64 #define CCP2_PRINT_REGISTER(isp, name)\ argument
65 dev_dbg(isp->dev, "###CCP2 " #name "=0x%08x\n", \
66 isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_##name))
70 struct isp_device *isp = to_isp_device(ccp2); in ccp2_print_status() local
72 dev_dbg(isp->dev, "-------------CCP2 Register dump-------------\n"); in ccp2_print_status()
74 CCP2_PRINT_REGISTER(isp, SYSCONFIG); in ccp2_print_status()
75 CCP2_PRINT_REGISTER(isp, SYSSTATUS); in ccp2_print_status()
76 CCP2_PRINT_REGISTER(isp, LC01_IRQENABLE); in ccp2_print_status()
77 CCP2_PRINT_REGISTER(isp, LC01_IRQSTATUS); in ccp2_print_status()
78 CCP2_PRINT_REGISTER(isp, LC23_IRQENABLE); in ccp2_print_status()
79 CCP2_PRINT_REGISTER(isp, LC23_IRQSTATUS); in ccp2_print_status()
80 CCP2_PRINT_REGISTER(isp, LCM_IRQENABLE); in ccp2_print_status()
81 CCP2_PRINT_REGISTER(isp, LCM_IRQSTATUS); in ccp2_print_status()
82 CCP2_PRINT_REGISTER(isp, CTRL); in ccp2_print_status()
83 CCP2_PRINT_REGISTER(isp, LCx_CTRL(0)); in ccp2_print_status()
84 CCP2_PRINT_REGISTER(isp, LCx_CODE(0)); in ccp2_print_status()
85 CCP2_PRINT_REGISTER(isp, LCx_STAT_START(0)); in ccp2_print_status()
86 CCP2_PRINT_REGISTER(isp, LCx_STAT_SIZE(0)); in ccp2_print_status()
87 CCP2_PRINT_REGISTER(isp, LCx_SOF_ADDR(0)); in ccp2_print_status()
88 CCP2_PRINT_REGISTER(isp, LCx_EOF_ADDR(0)); in ccp2_print_status()
89 CCP2_PRINT_REGISTER(isp, LCx_DAT_START(0)); in ccp2_print_status()
90 CCP2_PRINT_REGISTER(isp, LCx_DAT_SIZE(0)); in ccp2_print_status()
91 CCP2_PRINT_REGISTER(isp, LCx_DAT_PING_ADDR(0)); in ccp2_print_status()
92 CCP2_PRINT_REGISTER(isp, LCx_DAT_PONG_ADDR(0)); in ccp2_print_status()
93 CCP2_PRINT_REGISTER(isp, LCx_DAT_OFST(0)); in ccp2_print_status()
94 CCP2_PRINT_REGISTER(isp, LCM_CTRL); in ccp2_print_status()
95 CCP2_PRINT_REGISTER(isp, LCM_VSIZE); in ccp2_print_status()
96 CCP2_PRINT_REGISTER(isp, LCM_HSIZE); in ccp2_print_status()
97 CCP2_PRINT_REGISTER(isp, LCM_PREFETCH); in ccp2_print_status()
98 CCP2_PRINT_REGISTER(isp, LCM_SRC_ADDR); in ccp2_print_status()
99 CCP2_PRINT_REGISTER(isp, LCM_SRC_OFST); in ccp2_print_status()
100 CCP2_PRINT_REGISTER(isp, LCM_DST_ADDR); in ccp2_print_status()
101 CCP2_PRINT_REGISTER(isp, LCM_DST_OFST); in ccp2_print_status()
103 dev_dbg(isp->dev, "--------------------------------------------\n"); in ccp2_print_status()
108 * @ccp2: pointer to ISP CCP2 device
112 struct isp_device *isp = to_isp_device(ccp2); in ccp2_reset() local
116 isp_reg_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_SYSCONFIG, in ccp2_reset()
118 while (!(isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_SYSSTATUS) & in ccp2_reset()
122 dev_warn(isp->dev, in ccp2_reset()
131 * @ccp2: pointer to ISP CCP2 device
135 struct isp_device *isp = to_isp_device(ccp2); in ccp2_pwr_cfg() local
137 isp_reg_writel(isp, ISPCCP2_SYSCONFIG_MSTANDBY_MODE_SMART | in ccp2_pwr_cfg()
138 ((isp->revision == ISP_REVISION_15_0 && isp->autoidle) ? in ccp2_pwr_cfg()
145 * @ccp2: pointer to ISP CCP2 device
150 struct isp_device *isp = to_isp_device(ccp2); in ccp2_if_enable() local
162 isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCx_CTRL(i), in ccp2_if_enable()
167 isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL, in ccp2_if_enable()
179 * @ccp2: pointer to ISP CCP2 device
184 struct isp_device *isp = to_isp_device(ccp2); in ccp2_mem_enable() local
190 isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL, in ccp2_mem_enable()
193 isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_CTRL, in ccp2_mem_enable()
200 * @ccp2: Pointer to ISP CCP2 device
210 struct isp_device *isp = to_isp_device(ccp2); in ccp2_phyif_config() local
213 val = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL) | in ccp2_phyif_config()
224 isp_reg_writel(isp, val, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL); in ccp2_phyif_config()
226 val = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL); in ccp2_phyif_config()
229 dev_warn(isp->dev, "OMAP3 CCP2 bus not available\n"); in ccp2_phyif_config()
240 * @ccp2: Pointer to ISP CCP2 device
244 * values depend on the ISP revision:
249 * The exact divisor value used might differ from the requested value, as ISP
255 struct isp_device *isp = to_isp_device(ccp2); in ccp2_vp_config() local
259 val = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL); in ccp2_vp_config()
262 if (isp->revision == ISP_REVISION_15_0) { in ccp2_vp_config()
273 isp_reg_writel(isp, val, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL); in ccp2_vp_config()
278 * @ccp2: Pointer to ISP CCP2 device
279 * @config: Pointer to ISP LCx config structure.
288 struct isp_device *isp = to_isp_device(ccp2); in ccp2_lcx_config() local
301 val = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCx_CTRL(0)) in ccp2_lcx_config()
304 if (isp->revision == ISP_REVISION_15_0) { in ccp2_lcx_config()
320 isp_reg_writel(isp, val, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCx_CTRL(0)); in ccp2_lcx_config()
323 isp_reg_writel(isp, config->data_start << ISPCCP2_LCx_DAT_SHIFT, in ccp2_lcx_config()
327 isp_reg_writel(isp, config->data_size << ISPCCP2_LCx_DAT_SHIFT, in ccp2_lcx_config()
338 isp_reg_writel(isp, val, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LC01_IRQSTATUS); in ccp2_lcx_config()
339 isp_reg_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LC01_IRQENABLE, val); in ccp2_lcx_config()
344 * @ccp2: Pointer to ISP CCP2 device
389 struct isp_device *isp = to_isp_device(ccp2); in ccp2_adjust_bandwidth() local
419 dev_dbg(isp->dev, "%s: minimum clock divisor = %u\n", __func__, in ccp2_adjust_bandwidth()
427 * @ccp2: Pointer to ISP CCP2 device
428 * @config: Pointer to ISP mem interface config structure
437 struct isp_device *isp = to_isp_device(ccp2); in ccp2_mem_configure() local
450 isp_reg_writel(isp, ISPCCP2_LCM_HSIZE_SKIP_MIN | in ccp2_mem_configure()
455 isp_reg_writel(isp, config->vsize_count << ISPCCP2_LCM_VSIZE_SHIFT, in ccp2_mem_configure()
463 isp_reg_writel(isp, config->src_ofst, OMAP3_ISP_IOMEM_CCP2, in ccp2_mem_configure()
491 isp_reg_writel(isp, val, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_CTRL); in ccp2_mem_configure()
501 isp_reg_writel(isp, hwords << ISPCCP2_LCM_PREFETCH_SHIFT, in ccp2_mem_configure()
505 isp_reg_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_CTRL, in ccp2_mem_configure()
510 isp_reg_writel(isp, ISPCCP2_LCM_IRQSTATUS_OCPERROR_IRQ | in ccp2_mem_configure()
515 isp_reg_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_IRQENABLE, in ccp2_mem_configure()
522 * @ccp2: Pointer to ISP CCP2 device
529 struct isp_device *isp = to_isp_device(ccp2); in ccp2_set_inaddr() local
531 isp_reg_writel(isp, addr, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_SRC_ADDR); in ccp2_set_inaddr()
557 * omap3isp_ccp2_isr - Handle ISP CCP2 interrupts
558 * @ccp2: Pointer to ISP CCP2 device
565 struct isp_device *isp = to_isp_device(ccp2); in omap3isp_ccp2_isr() local
576 lcx_irqstatus = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, in omap3isp_ccp2_isr()
578 isp_reg_writel(isp, lcx_irqstatus, OMAP3_ISP_IOMEM_CCP2, in omap3isp_ccp2_isr()
581 lcm_irqstatus = isp_reg_readl(isp, OMAP3_ISP_IOMEM_CCP2, in omap3isp_ccp2_isr()
583 isp_reg_writel(isp, lcm_irqstatus, OMAP3_ISP_IOMEM_CCP2, in omap3isp_ccp2_isr()
588 dev_dbg(isp->dev, "CCP2 err:%x\n", lcx_irqstatus); in omap3isp_ccp2_isr()
594 dev_dbg(isp->dev, "CCP2 OCP err:%x\n", lcm_irqstatus); in omap3isp_ccp2_isr()
616 * @ccp2 : Pointer to ISP CCP2 device
635 * @ccp2 : Pointer to ISP CCP2 device
806 * @sd: ISP CCP2 V4L2 subdevice
837 struct isp_device *isp = to_isp_device(ccp2); in ccp2_s_stream() local
878 omap3isp_sbl_enable(isp, OMAP3_ISP_SBL_CSI1_READ); in ccp2_s_stream()
890 omap3isp_sbl_disable(isp, OMAP3_ISP_SBL_CSI1_READ); in ccp2_s_stream()
929 * ISP ccp2 video device node
934 * @video : Pointer to isp video structure
940 struct isp_ccp2_device *ccp2 = &video->isp->isp_ccp2; in ccp2_video_queue()
1021 * @ccp2: Pointer to ISP CCP2 device
1031 * @ccp2: Pointer to ISP CCP2 device
1059 * ISP ccp2 initialisation and cleanup
1064 * @ccp2: Pointer to ISP CCP2 device
1079 strscpy(sd->name, "OMAP3 ISP CCP2", sizeof(sd->name)); in ccp2_init_entities()
1080 sd->grp_id = 1 << 16; /* group ID for isp subdevs */ in ccp2_init_entities()
1109 ccp2->video_in.isp = to_isp_device(ccp2); in ccp2_init_entities()
1126 * @isp : Pointer to ISP device
1129 int omap3isp_ccp2_init(struct isp_device *isp) in omap3isp_ccp2_init() argument
1131 struct isp_ccp2_device *ccp2 = &isp->isp_ccp2; in omap3isp_ccp2_init()
1147 if (isp->revision == ISP_REVISION_2_0) { in omap3isp_ccp2_init()
1148 ccp2->vdds_csib = devm_regulator_get(isp->dev, "vdds_csib"); in omap3isp_ccp2_init()
1151 dev_dbg(isp->dev, in omap3isp_ccp2_init()
1155 dev_dbg(isp->dev, in omap3isp_ccp2_init()
1159 ccp2->phy = &isp->isp_csiphy2; in omap3isp_ccp2_init()
1160 } else if (isp->revision == ISP_REVISION_15_0) { in omap3isp_ccp2_init()
1161 ccp2->phy = &isp->isp_csiphy1; in omap3isp_ccp2_init()
1174 * @isp : Pointer to ISP device
1176 void omap3isp_ccp2_cleanup(struct isp_device *isp) in omap3isp_ccp2_cleanup() argument
1178 struct isp_ccp2_device *ccp2 = &isp->isp_ccp2; in omap3isp_ccp2_cleanup()