csi2 410 drivers/media/i2c/smiapp-pll.c lane_op_clock_ratio = pll->csi2.lanes; csi2 422 drivers/media/i2c/smiapp-pll.c * (pll->csi2.lanes / lane_op_clock_ratio); csi2 35 drivers/media/i2c/smiapp-pll.h } csi2; csi2 3053 drivers/media/i2c/smiapp/smiapp-core.c sensor->pll.csi2.lanes = sensor->hwcfg->lanes; csi2 360 drivers/media/pci/intel/ipu3/ipu3-cio2.c u8 lanes, csi2bus = q->csi2.port; csi2 369 drivers/media/pci/intel/ipu3/ipu3-cio2.c lanes = q->csi2.lanes; csi2 498 drivers/media/pci/intel/ipu3/ipu3-cio2.c base + CIO2_REG_PXM_FRF_CFG(q->csi2.port)); csi2 1391 drivers/media/pci/intel/ipu3/ipu3-cio2.c struct csi2_bus_info csi2; csi2 1405 drivers/media/pci/intel/ipu3/ipu3-cio2.c if (cio2->queue[s_asd->csi2.port].sensor) csi2 1408 drivers/media/pci/intel/ipu3/ipu3-cio2.c q = &cio2->queue[s_asd->csi2.port]; csi2 1410 drivers/media/pci/intel/ipu3/ipu3-cio2.c q->csi2 = s_asd->csi2; csi2 1412 drivers/media/pci/intel/ipu3/ipu3-cio2.c q->csi_rx_base = cio2->base + CIO2_REG_PIPE_BASE(q->csi2.port); csi2 1427 drivers/media/pci/intel/ipu3/ipu3-cio2.c cio2->queue[s_asd->csi2.port].sensor = NULL; csi2 1443 drivers/media/pci/intel/ipu3/ipu3-cio2.c q = &cio2->queue[s_asd->csi2.port]; csi2 1507 drivers/media/pci/intel/ipu3/ipu3-cio2.c s_asd->csi2.port = vep.base.port; csi2 1508 drivers/media/pci/intel/ipu3/ipu3-cio2.c s_asd->csi2.lanes = vep.bus.mipi_csi2.num_data_lanes; csi2 329 drivers/media/pci/intel/ipu3/ipu3-cio2.h struct csi2_bus_info csi2; csi2 2079 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.clk.pos = vep->bus.mipi_csi2.clock_lane; csi2 2080 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.clk.pol = csi2 2083 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.clk.pol, csi2 2084 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.clk.pos); csi2 2086 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.num_data_lanes = vep->bus.mipi_csi2.num_data_lanes; csi2 2088 drivers/media/platform/omap3isp/isp.c for (i = 0; i < buscfg->bus.csi2.num_data_lanes; i++) { csi2 2089 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.data[i].pos = csi2 2091 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.data[i].pol = csi2 2095 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.data[i].pol, csi2 2096 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.lanecfg.data[i].pos); csi2 2102 drivers/media/platform/omap3isp/isp.c buscfg->bus.csi2.crc = 1; csi2 28 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, u8 enable) csi2 30 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_ctrl_cfg *currctrl = &csi2->ctrl; csi2 32 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_CTRL, ISPCSI2_CTRL_IF_EN, csi2 44 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, csi2 49 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTRL); csi2 74 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTRL); csi2 165 drivers/media/platform/omap3isp/ispcsi2.c static u16 csi2_ctx_map_format(struct isp_csi2_device *csi2) csi2 167 drivers/media/platform/omap3isp/ispcsi2.c const struct v4l2_mbus_framefmt *fmt = &csi2->formats[CSI2_PAD_SINK]; csi2 192 drivers/media/platform/omap3isp/ispcsi2.c if (!(csi2->output & CSI2_OUTPUT_CCDC) && csi2 193 drivers/media/platform/omap3isp/ispcsi2.c !(csi2->output & CSI2_OUTPUT_MEMORY)) { csi2 201 drivers/media/platform/omap3isp/ispcsi2.c destidx = csi2->frame_skip ? 0 : !!(csi2->output & CSI2_OUTPUT_CCDC); csi2 202 drivers/media/platform/omap3isp/ispcsi2.c is_3630 = csi2->isp->revision == ISP_REVISION_15_0; csi2 204 drivers/media/platform/omap3isp/ispcsi2.c return __csi2_fmt_map[fmtidx][destidx][csi2->dpcm_decompress][is_3630]; csi2 217 drivers/media/platform/omap3isp/ispcsi2.c static void csi2_set_outaddr(struct isp_csi2_device *csi2, u32 addr) csi2 219 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 220 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_ctx_cfg *ctx = &csi2->contexts[0]; csi2 225 drivers/media/platform/omap3isp/ispcsi2.c csi2->regs1, ISPCSI2_CTX_DAT_PING_ADDR(ctx->ctxnum)); csi2 227 drivers/media/platform/omap3isp/ispcsi2.c csi2->regs1, ISPCSI2_CTX_DAT_PONG_ADDR(ctx->ctxnum)); csi2 248 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, u8 ctxnum, u8 enable) csi2 250 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_ctx_cfg *ctx = &csi2->contexts[ctxnum]; csi2 254 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL1(ctxnum)); csi2 257 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->frame_skip) csi2 258 drivers/media/platform/omap3isp/ispcsi2.c skip = csi2->frame_skip; csi2 259 drivers/media/platform/omap3isp/ispcsi2.c else if (csi2->output & CSI2_OUTPUT_MEMORY) csi2 270 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL1(ctxnum)); csi2 280 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, csi2 286 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL1(ctx->ctxnum)); csi2 303 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL1(ctx->ctxnum)); csi2 306 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL2(ctx->ctxnum)); csi2 326 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL2(ctx->ctxnum)); csi2 329 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL3(ctx->ctxnum)); csi2 333 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL3(ctx->ctxnum)); csi2 336 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, csi2 340 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, csi2 344 drivers/media/platform/omap3isp/ispcsi2.c csi2->regs1, ISPCSI2_CTX_DAT_PING_ADDR(ctx->ctxnum)); csi2 347 drivers/media/platform/omap3isp/ispcsi2.c csi2->regs1, ISPCSI2_CTX_DAT_PONG_ADDR(ctx->ctxnum)); csi2 355 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, csi2 360 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_TIMING); csi2 381 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_TIMING); csi2 389 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, int enable) csi2 394 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, ISPCSI2_CTX_IRQSTATUS_FE_IRQ, csi2->regs1, csi2 397 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_set(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), csi2 400 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_clr(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), csi2 410 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, int enable) csi2 440 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_PHY_IRQSTATUS); csi2 442 drivers/media/platform/omap3isp/ispcsi2.c reg |= isp_reg_readl(isp, csi2->regs1, ISPCSI2_PHY_IRQENABLE); csi2 445 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_PHY_IRQENABLE); csi2 453 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2, int enable) csi2 464 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_IRQSTATUS); csi2 466 drivers/media/platform/omap3isp/ispcsi2.c reg |= isp_reg_readl(isp, csi2->regs1, ISPCSI2_IRQENABLE); csi2 470 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_IRQENABLE); csi2 480 drivers/media/platform/omap3isp/ispcsi2.c int omap3isp_csi2_reset(struct isp_csi2_device *csi2) csi2 482 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 487 drivers/media/platform/omap3isp/ispcsi2.c if (!csi2->available) csi2 490 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->phy->entity) csi2 493 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, csi2 497 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_SYSSTATUS) & csi2 512 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_set(isp, csi2->regs1, ISPCSI2_PHY_CFG, csi2 517 drivers/media/platform/omap3isp/ispcsi2.c reg = isp_reg_readl(isp, csi2->phy->phy_regs, ISPCSIPHY_REG1) csi2 531 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, csi2 538 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, csi2 546 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_configure(struct isp_csi2_device *csi2) csi2 548 drivers/media/platform/omap3isp/ispcsi2.c struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); csi2 550 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 551 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_timing_cfg *timing = &csi2->timing[0]; csi2 561 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->contexts[0].enabled || csi2->ctrl.if_enable) csi2 564 drivers/media/platform/omap3isp/ispcsi2.c pad = media_entity_remote_pad(&csi2->pads[CSI2_PAD_SINK]); csi2 568 drivers/media/platform/omap3isp/ispcsi2.c csi2->frame_skip = 0; csi2 569 drivers/media/platform/omap3isp/ispcsi2.c v4l2_subdev_call(sensor, sensor, g_skip_frames, &csi2->frame_skip); csi2 571 drivers/media/platform/omap3isp/ispcsi2.c csi2->ctrl.vp_out_ctrl = csi2 576 drivers/media/platform/omap3isp/ispcsi2.c csi2->ctrl.vp_out_ctrl); csi2 577 drivers/media/platform/omap3isp/ispcsi2.c csi2->ctrl.frame_mode = ISP_CSI2_FRAME_IMMEDIATE; csi2 578 drivers/media/platform/omap3isp/ispcsi2.c csi2->ctrl.ecc_enable = buscfg->bus.csi2.crc; csi2 591 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->formats[CSI2_PAD_SINK].code != csi2 592 drivers/media/platform/omap3isp/ispcsi2.c csi2->formats[CSI2_PAD_SOURCE].code) csi2 593 drivers/media/platform/omap3isp/ispcsi2.c csi2->dpcm_decompress = true; csi2 595 drivers/media/platform/omap3isp/ispcsi2.c csi2->dpcm_decompress = false; csi2 597 drivers/media/platform/omap3isp/ispcsi2.c csi2->contexts[0].format_id = csi2_ctx_map_format(csi2); csi2 599 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->video_out.bpl_padding == 0) csi2 600 drivers/media/platform/omap3isp/ispcsi2.c csi2->contexts[0].data_offset = 0; csi2 602 drivers/media/platform/omap3isp/ispcsi2.c csi2->contexts[0].data_offset = csi2->video_out.bpl_value; csi2 611 drivers/media/platform/omap3isp/ispcsi2.c csi2->contexts[0].eof_enabled = 1; csi2 612 drivers/media/platform/omap3isp/ispcsi2.c csi2->contexts[0].eol_enabled = 1; csi2 614 drivers/media/platform/omap3isp/ispcsi2.c csi2_irq_complexio1_set(isp, csi2, 1); csi2 615 drivers/media/platform/omap3isp/ispcsi2.c csi2_irq_ctx_set(isp, csi2, 1); csi2 616 drivers/media/platform/omap3isp/ispcsi2.c csi2_irq_status_set(isp, csi2, 1); csi2 619 drivers/media/platform/omap3isp/ispcsi2.c csi2_timing_config(isp, csi2, timing); csi2 620 drivers/media/platform/omap3isp/ispcsi2.c csi2_recv_config(isp, csi2, &csi2->ctrl); csi2 621 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_config(isp, csi2, &csi2->contexts[0]); csi2 633 drivers/media/platform/omap3isp/ispcsi2.c static void csi2_print_status(struct isp_csi2_device *csi2) csi2 635 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 637 drivers/media/platform/omap3isp/ispcsi2.c if (!csi2->available) csi2 642 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, SYSCONFIG); csi2 643 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, SYSSTATUS); csi2 644 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, IRQENABLE); csi2 645 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, IRQSTATUS); csi2 646 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTRL); csi2 647 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, DBG_H); csi2 648 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, GNQ); csi2 649 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_CFG); csi2 650 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_IRQSTATUS); csi2 651 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, SHORT_PACKET); csi2 652 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_IRQENABLE); csi2 653 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, DBG_P); csi2 654 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, TIMING); csi2 655 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL1(0)); csi2 656 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL2(0)); csi2 657 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_OFST(0)); csi2 658 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_PING_ADDR(0)); csi2 659 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_PONG_ADDR(0)); csi2 660 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_IRQENABLE(0)); csi2 661 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_IRQSTATUS(0)); csi2 662 drivers/media/platform/omap3isp/ispcsi2.c CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL3(0)); csi2 675 drivers/media/platform/omap3isp/ispcsi2.c static void csi2_isr_buffer(struct isp_csi2_device *csi2) csi2 677 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 680 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, 0, 0); csi2 682 drivers/media/platform/omap3isp/ispcsi2.c buffer = omap3isp_video_buffer_next(&csi2->video_out); csi2 691 drivers/media/platform/omap3isp/ispcsi2.c csi2_set_outaddr(csi2, buffer->dma); csi2 692 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, 0, 1); csi2 695 drivers/media/platform/omap3isp/ispcsi2.c static void csi2_isr_ctx(struct isp_csi2_device *csi2, csi2 698 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 702 drivers/media/platform/omap3isp/ispcsi2.c status = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); csi2 703 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, status, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); csi2 718 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->frame_skip) { csi2 719 drivers/media/platform/omap3isp/ispcsi2.c csi2->frame_skip--; csi2 720 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->frame_skip == 0) { csi2 721 drivers/media/platform/omap3isp/ispcsi2.c ctx->format_id = csi2_ctx_map_format(csi2); csi2 722 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_config(isp, csi2, ctx); csi2 723 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, n, 1); csi2 728 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->output & CSI2_OUTPUT_MEMORY) csi2 729 drivers/media/platform/omap3isp/ispcsi2.c csi2_isr_buffer(csi2); csi2 735 drivers/media/platform/omap3isp/ispcsi2.c void omap3isp_csi2_isr(struct isp_csi2_device *csi2) csi2 737 drivers/media/platform/omap3isp/ispcsi2.c struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); csi2 739 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 741 drivers/media/platform/omap3isp/ispcsi2.c if (!csi2->available) csi2 744 drivers/media/platform/omap3isp/ispcsi2.c csi2_irqstatus = isp_reg_readl(isp, csi2->regs1, ISPCSI2_IRQSTATUS); csi2 745 drivers/media/platform/omap3isp/ispcsi2.c isp_reg_writel(isp, csi2_irqstatus, csi2->regs1, ISPCSI2_IRQSTATUS); csi2 749 drivers/media/platform/omap3isp/ispcsi2.c cpxio1_irqstatus = isp_reg_readl(isp, csi2->regs1, csi2 752 drivers/media/platform/omap3isp/ispcsi2.c csi2->regs1, ISPCSI2_PHY_IRQSTATUS); csi2 778 drivers/media/platform/omap3isp/ispcsi2.c if (omap3isp_module_sync_is_stopping(&csi2->wait, &csi2->stopping)) csi2 783 drivers/media/platform/omap3isp/ispcsi2.c csi2_isr_ctx(csi2, &csi2->contexts[0]); csi2 801 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = &isp->isp_csi2a; csi2 803 drivers/media/platform/omap3isp/ispcsi2.c csi2_set_outaddr(csi2, buffer->dma); csi2 811 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->video_out.dmaqueue_flags & ISP_VIDEO_DMAQUEUE_UNDERRUN) { csi2 813 drivers/media/platform/omap3isp/ispcsi2.c csi2_if_enable(isp, csi2, 1); csi2 814 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, 0, 1); csi2 815 drivers/media/platform/omap3isp/ispcsi2.c isp_video_dmaqueue_flags_clr(&csi2->video_out); csi2 830 drivers/media/platform/omap3isp/ispcsi2.c __csi2_get_format(struct isp_csi2_device *csi2, struct v4l2_subdev_pad_config *cfg, csi2 834 drivers/media/platform/omap3isp/ispcsi2.c return v4l2_subdev_get_try_format(&csi2->subdev, cfg, pad); csi2 836 drivers/media/platform/omap3isp/ispcsi2.c return &csi2->formats[pad]; csi2 840 drivers/media/platform/omap3isp/ispcsi2.c csi2_try_format(struct isp_csi2_device *csi2, struct v4l2_subdev_pad_config *cfg, csi2 870 drivers/media/platform/omap3isp/ispcsi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SINK, which); csi2 899 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 909 drivers/media/platform/omap3isp/ispcsi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SINK, csi2 936 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 945 drivers/media/platform/omap3isp/ispcsi2.c csi2_try_format(csi2, cfg, fse->pad, &format, fse->which); csi2 955 drivers/media/platform/omap3isp/ispcsi2.c csi2_try_format(csi2, cfg, fse->pad, &format, fse->which); csi2 972 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 975 drivers/media/platform/omap3isp/ispcsi2.c format = __csi2_get_format(csi2, cfg, fmt->pad, fmt->which); csi2 993 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 996 drivers/media/platform/omap3isp/ispcsi2.c format = __csi2_get_format(csi2, cfg, fmt->pad, fmt->which); csi2 1000 drivers/media/platform/omap3isp/ispcsi2.c csi2_try_format(csi2, cfg, fmt->pad, &fmt->format, fmt->which); csi2 1005 drivers/media/platform/omap3isp/ispcsi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SOURCE, csi2 1008 drivers/media/platform/omap3isp/ispcsi2.c csi2_try_format(csi2, cfg, CSI2_PAD_SOURCE, format, fmt->which); csi2 1047 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 1048 drivers/media/platform/omap3isp/ispcsi2.c struct isp_device *isp = csi2->isp; csi2 1049 drivers/media/platform/omap3isp/ispcsi2.c struct isp_video *video_out = &csi2->video_out; csi2 1053 drivers/media/platform/omap3isp/ispcsi2.c if (omap3isp_csiphy_acquire(csi2->phy, &sd->entity) < 0) csi2 1055 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->output & CSI2_OUTPUT_MEMORY) csi2 1057 drivers/media/platform/omap3isp/ispcsi2.c csi2_configure(csi2); csi2 1058 drivers/media/platform/omap3isp/ispcsi2.c csi2_print_status(csi2); csi2 1066 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->output & CSI2_OUTPUT_MEMORY && csi2 1070 drivers/media/platform/omap3isp/ispcsi2.c atomic_set(&csi2->stopping, 0); csi2 1071 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, 0, 1); csi2 1072 drivers/media/platform/omap3isp/ispcsi2.c csi2_if_enable(isp, csi2, 1); csi2 1077 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->state == ISP_PIPELINE_STREAM_STOPPED) csi2 1079 drivers/media/platform/omap3isp/ispcsi2.c if (omap3isp_module_sync_idle(&sd->entity, &csi2->wait, csi2 1080 drivers/media/platform/omap3isp/ispcsi2.c &csi2->stopping)) csi2 1083 drivers/media/platform/omap3isp/ispcsi2.c csi2_ctx_enable(isp, csi2, 0, 0); csi2 1084 drivers/media/platform/omap3isp/ispcsi2.c csi2_if_enable(isp, csi2, 0); csi2 1085 drivers/media/platform/omap3isp/ispcsi2.c csi2_irq_ctx_set(isp, csi2, 0); csi2 1086 drivers/media/platform/omap3isp/ispcsi2.c omap3isp_csiphy_release(csi2->phy); csi2 1092 drivers/media/platform/omap3isp/ispcsi2.c csi2->state = enable; csi2 1137 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 1138 drivers/media/platform/omap3isp/ispcsi2.c struct isp_csi2_ctrl_cfg *ctrl = &csi2->ctrl; csi2 1153 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->output & ~CSI2_OUTPUT_MEMORY) csi2 1155 drivers/media/platform/omap3isp/ispcsi2.c csi2->output |= CSI2_OUTPUT_MEMORY; csi2 1157 drivers/media/platform/omap3isp/ispcsi2.c csi2->output &= ~CSI2_OUTPUT_MEMORY; csi2 1163 drivers/media/platform/omap3isp/ispcsi2.c if (csi2->output & ~CSI2_OUTPUT_CCDC) csi2 1165 drivers/media/platform/omap3isp/ispcsi2.c csi2->output |= CSI2_OUTPUT_CCDC; csi2 1167 drivers/media/platform/omap3isp/ispcsi2.c csi2->output &= ~CSI2_OUTPUT_CCDC; csi2 1177 drivers/media/platform/omap3isp/ispcsi2.c (csi2->output & CSI2_OUTPUT_MEMORY) ? false : true; csi2 1178 drivers/media/platform/omap3isp/ispcsi2.c ctrl->vp_clk_enable = !!(csi2->output & CSI2_OUTPUT_CCDC); csi2 1189 drivers/media/platform/omap3isp/ispcsi2.c void omap3isp_csi2_unregister_entities(struct isp_csi2_device *csi2) csi2 1191 drivers/media/platform/omap3isp/ispcsi2.c v4l2_device_unregister_subdev(&csi2->subdev); csi2 1192 drivers/media/platform/omap3isp/ispcsi2.c omap3isp_video_unregister(&csi2->video_out); csi2 1195 drivers/media/platform/omap3isp/ispcsi2.c int omap3isp_csi2_register_entities(struct isp_csi2_device *csi2, csi2 1201 drivers/media/platform/omap3isp/ispcsi2.c csi2->subdev.dev = vdev->mdev->dev; csi2 1202 drivers/media/platform/omap3isp/ispcsi2.c ret = v4l2_device_register_subdev(vdev, &csi2->subdev); csi2 1206 drivers/media/platform/omap3isp/ispcsi2.c ret = omap3isp_video_register(&csi2->video_out, vdev); csi2 1213 drivers/media/platform/omap3isp/ispcsi2.c omap3isp_csi2_unregister_entities(csi2); csi2 1226 drivers/media/platform/omap3isp/ispcsi2.c static int csi2_init_entities(struct isp_csi2_device *csi2) csi2 1228 drivers/media/platform/omap3isp/ispcsi2.c struct v4l2_subdev *sd = &csi2->subdev; csi2 1229 drivers/media/platform/omap3isp/ispcsi2.c struct media_pad *pads = csi2->pads; csi2 1238 drivers/media/platform/omap3isp/ispcsi2.c v4l2_set_subdevdata(sd, csi2); csi2 1253 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; csi2 1254 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.ops = &csi2_ispvideo_ops; csi2 1255 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.bpl_alignment = 32; csi2 1256 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.bpl_zero_padding = 1; csi2 1257 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.bpl_max = 0x1ffe0; csi2 1258 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.isp = csi2->isp; csi2 1259 drivers/media/platform/omap3isp/ispcsi2.c csi2->video_out.capture_mem = PAGE_ALIGN(4096 * 4096) * 3; csi2 1261 drivers/media/platform/omap3isp/ispcsi2.c ret = omap3isp_video_init(&csi2->video_out, "CSI2a"); csi2 1268 drivers/media/platform/omap3isp/ispcsi2.c media_entity_cleanup(&csi2->subdev.entity); csi2 145 drivers/media/platform/omap3isp/ispcsi2.h void omap3isp_csi2_isr(struct isp_csi2_device *csi2); csi2 146 drivers/media/platform/omap3isp/ispcsi2.h int omap3isp_csi2_reset(struct isp_csi2_device *csi2); csi2 149 drivers/media/platform/omap3isp/ispcsi2.h void omap3isp_csi2_unregister_entities(struct isp_csi2_device *csi2); csi2 150 drivers/media/platform/omap3isp/ispcsi2.h int omap3isp_csi2_register_entities(struct isp_csi2_device *csi2, csi2 177 drivers/media/platform/omap3isp/ispcsiphy.c lanes = &buscfg->bus.csi2.lanecfg; csi2 178 drivers/media/platform/omap3isp/ispcsiphy.c num_data_lanes = buscfg->bus.csi2.num_data_lanes; csi2 276 drivers/media/platform/omap3isp/ispcsiphy.c rval = omap3isp_csi2_reset(phy->csi2); csi2 332 drivers/media/platform/omap3isp/ispcsiphy.c phy2->csi2 = &isp->isp_csi2a; csi2 342 drivers/media/platform/omap3isp/ispcsiphy.c phy1->csi2 = &isp->isp_csi2c; csi2 25 drivers/media/platform/omap3isp/ispcsiphy.h struct isp_csi2_device *csi2; csi2 126 drivers/media/platform/omap3isp/omap3isp.h struct isp_csi2_cfg csi2; csi2 1258 drivers/media/platform/qcom/camss/camss-csid.c if (!csiphy->cfg.csi2) csi2 1263 drivers/media/platform/qcom/camss/camss-csid.c lane_cfg = &csiphy->cfg.csi2->lane_cfg; csi2 88 drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; csi2 128 drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; csi2 140 drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; csi2 122 drivers/media/platform/qcom/camss/camss-csiphy.c u8 num_lanes = csiphy->cfg.csi2->lane_cfg.num_data; csi2 242 drivers/media/platform/qcom/camss/camss-csiphy.c u8 lane_mask = csiphy_get_lane_mask(&cfg->csi2->lane_cfg); csi2 42 drivers/media/platform/qcom/camss/camss-csiphy.h struct csiphy_csi2_cfg *csi2; csi2 430 drivers/media/platform/qcom/camss/camss.c struct csiphy_lanes_cfg *lncfg = &csd->interface.csi2.lane_cfg; csi2 747 drivers/media/platform/qcom/camss/camss.c csiphy->cfg.csi2 = &csd->interface.csi2; csi2 90 drivers/media/platform/qcom/camss/camss.h struct csiphy_csi2_cfg csi2; csi2 121 drivers/staging/media/imx/imx6-mipi-csi2.c static void csi2_enable(struct csi2_dev *csi2, bool enable) csi2 124 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x1, csi2->base + CSI2_PHY_SHUTDOWNZ); csi2 125 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x1, csi2->base + CSI2_DPHY_RSTZ); csi2 126 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x1, csi2->base + CSI2_RESETN); csi2 128 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_PHY_SHUTDOWNZ); csi2 129 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_DPHY_RSTZ); csi2 130 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_RESETN); csi2 134 drivers/staging/media/imx/imx6-mipi-csi2.c static void csi2_set_lanes(struct csi2_dev *csi2) csi2 136 drivers/staging/media/imx/imx6-mipi-csi2.c int lanes = csi2->bus.num_data_lanes; csi2 138 drivers/staging/media/imx/imx6-mipi-csi2.c writel(lanes - 1, csi2->base + CSI2_N_LANES); csi2 141 drivers/staging/media/imx/imx6-mipi-csi2.c static void dw_mipi_csi2_phy_write(struct csi2_dev *csi2, csi2 145 drivers/staging/media/imx/imx6-mipi-csi2.c writel(PHY_TESTCLR, csi2->base + CSI2_PHY_TST_CTRL0); csi2 146 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_PHY_TST_CTRL1); csi2 147 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_PHY_TST_CTRL0); csi2 150 drivers/staging/media/imx/imx6-mipi-csi2.c writel(PHY_TESTCLK, csi2->base + CSI2_PHY_TST_CTRL0); csi2 153 drivers/staging/media/imx/imx6-mipi-csi2.c writel(PHY_TESTEN | test_code, csi2->base + CSI2_PHY_TST_CTRL1); csi2 154 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_PHY_TST_CTRL0); csi2 157 drivers/staging/media/imx/imx6-mipi-csi2.c writel(test_data, csi2->base + CSI2_PHY_TST_CTRL1); csi2 158 drivers/staging/media/imx/imx6-mipi-csi2.c writel(PHY_TESTCLK, csi2->base + CSI2_PHY_TST_CTRL0); csi2 161 drivers/staging/media/imx/imx6-mipi-csi2.c writel(0x0, csi2->base + CSI2_PHY_TST_CTRL0); csi2 194 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_dphy_init(struct csi2_dev *csi2) csi2 200 drivers/staging/media/imx/imx6-mipi-csi2.c ctrl = v4l2_ctrl_find(csi2->src_sd->ctrl_handler, csi2 212 drivers/staging/media/imx/imx6-mipi-csi2.c dw_mipi_csi2_phy_write(csi2, 0x44, sel); csi2 221 drivers/staging/media/imx/imx6-mipi-csi2.c static int __maybe_unused csi2_dphy_wait_ulp(struct csi2_dev *csi2) csi2 227 drivers/staging/media/imx/imx6-mipi-csi2.c ret = readl_poll_timeout(csi2->base + CSI2_PHY_STATE, reg, csi2 230 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "ULP timeout, phy_state = 0x%08x\n", reg); csi2 235 drivers/staging/media/imx/imx6-mipi-csi2.c ret = readl_poll_timeout(csi2->base + CSI2_ERR1, reg, csi2 238 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "stable bus timeout, err1 = 0x%08x\n", reg); csi2 246 drivers/staging/media/imx/imx6-mipi-csi2.c static void csi2_dphy_wait_stopstate(struct csi2_dev *csi2) csi2 251 drivers/staging/media/imx/imx6-mipi-csi2.c mask = PHY_STOPSTATECLK | (((1 << csi2->bus.num_data_lanes) - 1) << csi2 254 drivers/staging/media/imx/imx6-mipi-csi2.c ret = readl_poll_timeout(csi2->base + CSI2_PHY_STATE, reg, csi2 257 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_warn(&csi2->sd, "LP-11 wait timeout, likely a sensor driver bug, expect capture failures.\n"); csi2 258 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_warn(&csi2->sd, "phy_state = 0x%08x\n", reg); csi2 263 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_dphy_wait_clock_lane(struct csi2_dev *csi2) csi2 268 drivers/staging/media/imx/imx6-mipi-csi2.c ret = readl_poll_timeout(csi2->base + CSI2_PHY_STATE, reg, csi2 271 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "clock lane timeout, phy_state = 0x%08x\n", csi2 280 drivers/staging/media/imx/imx6-mipi-csi2.c static void csi2ipu_gasket_init(struct csi2_dev *csi2) csi2 284 drivers/staging/media/imx/imx6-mipi-csi2.c switch (csi2->format_mbus.code) { csi2 293 drivers/staging/media/imx/imx6-mipi-csi2.c writel(reg, csi2->base + CSI2IPU_GASKET); csi2 296 drivers/staging/media/imx/imx6-mipi-csi2.c static int csi2_start(struct csi2_dev *csi2) csi2 300 drivers/staging/media/imx/imx6-mipi-csi2.c ret = clk_prepare_enable(csi2->pix_clk); csi2 305 drivers/staging/media/imx/imx6-mipi-csi2.c csi2ipu_gasket_init(csi2); csi2 308 drivers/staging/media/imx/imx6-mipi-csi2.c ret = csi2_dphy_init(csi2); csi2 313 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_set_lanes(csi2); csi2 314 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_enable(csi2, true); csi2 317 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_dphy_wait_stopstate(csi2); csi2 320 drivers/staging/media/imx/imx6-mipi-csi2.c ret = v4l2_subdev_call(csi2->src_sd, video, s_stream, 1); csi2 326 drivers/staging/media/imx/imx6-mipi-csi2.c ret = csi2_dphy_wait_clock_lane(csi2); csi2 333 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_subdev_call(csi2->src_sd, video, s_stream, 0); csi2 335 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_enable(csi2, false); csi2 337 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->pix_clk); csi2 341 drivers/staging/media/imx/imx6-mipi-csi2.c static void csi2_stop(struct csi2_dev *csi2) csi2 344 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_subdev_call(csi2->src_sd, video, s_stream, 0); csi2 346 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_enable(csi2, false); csi2 347 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->pix_clk); csi2 356 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 359 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_lock(&csi2->lock); csi2 361 drivers/staging/media/imx/imx6-mipi-csi2.c if (!csi2->src_sd) { csi2 367 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->sink_linked[i]) csi2 379 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->stream_count != !enable) csi2 382 drivers/staging/media/imx/imx6-mipi-csi2.c dev_dbg(csi2->dev, "stream %s\n", enable ? "ON" : "OFF"); csi2 384 drivers/staging/media/imx/imx6-mipi-csi2.c ret = csi2_start(csi2); csi2 386 drivers/staging/media/imx/imx6-mipi-csi2.c csi2_stop(csi2); csi2 391 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->stream_count += enable ? 1 : -1; csi2 392 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->stream_count < 0) csi2 393 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->stream_count = 0; csi2 395 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_unlock(&csi2->lock); csi2 404 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 408 drivers/staging/media/imx/imx6-mipi-csi2.c dev_dbg(csi2->dev, "link setup %s -> %s", remote->entity->name, csi2 413 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_lock(&csi2->lock); csi2 417 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->sink_linked[local->index - 1]) { csi2 421 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sink_linked[local->index - 1] = true; csi2 423 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sink_linked[local->index - 1] = false; csi2 427 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->src_sd) { csi2 431 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->src_sd = remote_sd; csi2 433 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->src_sd = NULL; csi2 438 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_unlock(&csi2->lock); csi2 443 drivers/staging/media/imx/imx6-mipi-csi2.c __csi2_get_fmt(struct csi2_dev *csi2, struct v4l2_subdev_pad_config *cfg, csi2 447 drivers/staging/media/imx/imx6-mipi-csi2.c return v4l2_subdev_get_try_format(&csi2->sd, cfg, pad); csi2 449 drivers/staging/media/imx/imx6-mipi-csi2.c return &csi2->format_mbus; csi2 456 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 459 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_lock(&csi2->lock); csi2 461 drivers/staging/media/imx/imx6-mipi-csi2.c fmt = __csi2_get_fmt(csi2, cfg, sdformat->pad, sdformat->which); csi2 465 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_unlock(&csi2->lock); csi2 474 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 481 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_lock(&csi2->lock); csi2 483 drivers/staging/media/imx/imx6-mipi-csi2.c if (csi2->stream_count > 0) { csi2 490 drivers/staging/media/imx/imx6-mipi-csi2.c sdformat->format = csi2->format_mbus; csi2 492 drivers/staging/media/imx/imx6-mipi-csi2.c fmt = __csi2_get_fmt(csi2, cfg, sdformat->pad, sdformat->which); csi2 496 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_unlock(&csi2->lock); csi2 505 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 509 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->pad[i].flags = (i == CSI2_SINK_PAD) ? csi2 514 drivers/staging/media/imx/imx6-mipi-csi2.c ret = imx_media_init_mbus_fmt(&csi2->format_mbus, csi2 519 drivers/staging/media/imx/imx6-mipi-csi2.c return media_entity_pads_init(&sd->entity, CSI2_NUM_PADS, csi2->pad); csi2 551 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 554 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "remote is not available\n"); csi2 559 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "invalid bus type, must be MIPI CSI2\n"); csi2 563 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->bus = vep->bus.mipi_csi2; csi2 565 drivers/staging/media/imx/imx6-mipi-csi2.c dev_dbg(csi2->dev, "data lanes: %d\n", csi2->bus.num_data_lanes); csi2 566 drivers/staging/media/imx/imx6-mipi-csi2.c dev_dbg(csi2->dev, "flags: 0x%08x\n", csi2->bus.flags); csi2 574 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2; csi2 578 drivers/staging/media/imx/imx6-mipi-csi2.c csi2 = devm_kzalloc(&pdev->dev, sizeof(*csi2), GFP_KERNEL); csi2 579 drivers/staging/media/imx/imx6-mipi-csi2.c if (!csi2) csi2 582 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->dev = &pdev->dev; csi2 584 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_subdev_init(&csi2->sd, &csi2_subdev_ops); csi2 585 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_set_subdevdata(&csi2->sd, &pdev->dev); csi2 586 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.internal_ops = &csi2_internal_ops; csi2 587 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.entity.ops = &csi2_entity_ops; csi2 588 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.dev = &pdev->dev; csi2 589 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.owner = THIS_MODULE; csi2 590 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; csi2 591 drivers/staging/media/imx/imx6-mipi-csi2.c strscpy(csi2->sd.name, DEVICE_NAME, sizeof(csi2->sd.name)); csi2 592 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE; csi2 593 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->sd.grp_id = IMX_MEDIA_GRP_ID_CSI2; csi2 595 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->pllref_clk = devm_clk_get(&pdev->dev, "ref"); csi2 596 drivers/staging/media/imx/imx6-mipi-csi2.c if (IS_ERR(csi2->pllref_clk)) { csi2 597 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to get pll reference clock\n"); csi2 598 drivers/staging/media/imx/imx6-mipi-csi2.c ret = PTR_ERR(csi2->pllref_clk); csi2 602 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->dphy_clk = devm_clk_get(&pdev->dev, "dphy"); csi2 603 drivers/staging/media/imx/imx6-mipi-csi2.c if (IS_ERR(csi2->dphy_clk)) { csi2 604 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to get dphy clock\n"); csi2 605 drivers/staging/media/imx/imx6-mipi-csi2.c ret = PTR_ERR(csi2->dphy_clk); csi2 609 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->pix_clk = devm_clk_get(&pdev->dev, "pix"); csi2 610 drivers/staging/media/imx/imx6-mipi-csi2.c if (IS_ERR(csi2->pix_clk)) { csi2 611 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to get pixel clock\n"); csi2 612 drivers/staging/media/imx/imx6-mipi-csi2.c ret = PTR_ERR(csi2->pix_clk); csi2 618 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to get platform resources\n"); csi2 622 drivers/staging/media/imx/imx6-mipi-csi2.c csi2->base = devm_ioremap(&pdev->dev, res->start, PAGE_SIZE); csi2 623 drivers/staging/media/imx/imx6-mipi-csi2.c if (!csi2->base) csi2 626 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_init(&csi2->lock); csi2 628 drivers/staging/media/imx/imx6-mipi-csi2.c ret = clk_prepare_enable(csi2->pllref_clk); csi2 630 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to enable pllref_clk\n"); csi2 634 drivers/staging/media/imx/imx6-mipi-csi2.c ret = clk_prepare_enable(csi2->dphy_clk); csi2 636 drivers/staging/media/imx/imx6-mipi-csi2.c v4l2_err(&csi2->sd, "failed to enable dphy_clk\n"); csi2 640 drivers/staging/media/imx/imx6-mipi-csi2.c platform_set_drvdata(pdev, &csi2->sd); csi2 643 drivers/staging/media/imx/imx6-mipi-csi2.c &csi2->sd, sizeof(struct v4l2_async_subdev), csi2 651 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->dphy_clk); csi2 653 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->pllref_clk); csi2 655 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_destroy(&csi2->lock); csi2 662 drivers/staging/media/imx/imx6-mipi-csi2.c struct csi2_dev *csi2 = sd_to_dev(sd); csi2 665 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->dphy_clk); csi2 666 drivers/staging/media/imx/imx6-mipi-csi2.c clk_disable_unprepare(csi2->pllref_clk); csi2 667 drivers/staging/media/imx/imx6-mipi-csi2.c mutex_destroy(&csi2->lock); csi2 24 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_if_enable(struct iss_csi2_device *csi2, u8 enable) csi2 26 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_ctrl_cfg *currctrl = &csi2->ctrl; csi2 28 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_update(csi2->iss, csi2->regs1, CSI2_CTRL, CSI2_CTRL_IF_EN, csi2 39 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_recv_config(struct iss_csi2_device *csi2, csi2 88 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTRL, reg); csi2 194 drivers/staging/media/omap4iss/iss_csi2.c static u16 csi2_ctx_map_format(struct iss_csi2_device *csi2) csi2 196 drivers/staging/media/omap4iss/iss_csi2.c const struct v4l2_mbus_framefmt *fmt = &csi2->formats[CSI2_PAD_SINK]; csi2 228 drivers/staging/media/omap4iss/iss_csi2.c if (!(csi2->output & CSI2_OUTPUT_IPIPEIF) && csi2 229 drivers/staging/media/omap4iss/iss_csi2.c !(csi2->output & CSI2_OUTPUT_MEMORY)) { csi2 237 drivers/staging/media/omap4iss/iss_csi2.c destidx = csi2->frame_skip ? 0 : !!(csi2->output & CSI2_OUTPUT_IPIPEIF); csi2 239 drivers/staging/media/omap4iss/iss_csi2.c return __csi2_fmt_map[fmtidx][destidx][csi2->dpcm_decompress]; csi2 252 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_set_outaddr(struct iss_csi2_device *csi2, u32 addr) csi2 254 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_ctx_cfg *ctx = &csi2->contexts[0]; csi2 258 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_PING_ADDR(ctx->ctxnum), csi2 260 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_PONG_ADDR(ctx->ctxnum), csi2 281 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_ctx_enable(struct iss_csi2_device *csi2, u8 ctxnum, u8 enable) csi2 283 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_ctx_cfg *ctx = &csi2->contexts[ctxnum]; csi2 286 drivers/staging/media/omap4iss/iss_csi2.c reg = iss_reg_read(csi2->iss, csi2->regs1, CSI2_CTX_CTRL1(ctxnum)); csi2 291 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->frame_skip) csi2 292 drivers/staging/media/omap4iss/iss_csi2.c skip = csi2->frame_skip; csi2 293 drivers/staging/media/omap4iss/iss_csi2.c else if (csi2->output & CSI2_OUTPUT_MEMORY) csi2 304 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_CTRL1(ctxnum), reg); csi2 313 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_ctx_config(struct iss_csi2_device *csi2, csi2 330 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_CTRL1(ctx->ctxnum), reg); csi2 342 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_CTRL2(ctx->ctxnum), reg); csi2 345 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_CTRL3(ctx->ctxnum), csi2 349 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_update(csi2->iss, csi2->regs1, CSI2_CTX_DAT_OFST(ctx->ctxnum), csi2 352 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_PING_ADDR(ctx->ctxnum), csi2 354 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_PONG_ADDR(ctx->ctxnum), csi2 362 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_timing_config(struct iss_csi2_device *csi2, csi2 367 drivers/staging/media/omap4iss/iss_csi2.c reg = iss_reg_read(csi2->iss, csi2->regs1, CSI2_TIMING); csi2 388 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_TIMING, reg); csi2 395 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_irq_ctx_set(struct iss_csi2_device *csi2, int enable) csi2 401 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_IRQSTATUS(i), csi2 404 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_set(csi2->iss, csi2->regs1, csi2 407 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_clr(csi2->iss, csi2->regs1, csi2 416 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_irq_complexio1_set(struct iss_csi2_device *csi2, int enable) csi2 447 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_COMPLEXIO_IRQSTATUS, reg); csi2 449 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_set(csi2->iss, csi2->regs1, CSI2_COMPLEXIO_IRQENABLE, csi2 452 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_COMPLEXIO_IRQENABLE, csi2 460 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_irq_status_set(struct iss_csi2_device *csi2, int enable) csi2 471 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_IRQSTATUS, reg); csi2 473 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_set(csi2->iss, csi2->regs1, CSI2_IRQENABLE, reg); csi2 475 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_IRQENABLE, 0); csi2 485 drivers/staging/media/omap4iss/iss_csi2.c int omap4iss_csi2_reset(struct iss_csi2_device *csi2) csi2 489 drivers/staging/media/omap4iss/iss_csi2.c if (!csi2->available) csi2 492 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->phy->phy_in_use) csi2 495 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_set(csi2->iss, csi2->regs1, CSI2_SYSCONFIG, csi2 499 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_read(csi2->iss, csi2->regs1, CSI2_SYSSTATUS) & csi2 502 drivers/staging/media/omap4iss/iss_csi2.c dev_err(csi2->iss->dev, "CSI2: Soft reset timeout!\n"); csi2 506 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_set(csi2->iss, csi2->regs1, CSI2_COMPLEXIO_CFG, csi2 510 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_read(csi2->iss, csi2->phy->phy_regs, REGISTER1) & csi2 513 drivers/staging/media/omap4iss/iss_csi2.c dev_err(csi2->iss->dev, "CSI2: CSI2_96M_FCLK reset timeout!\n"); csi2 517 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_update(csi2->iss, csi2->regs1, CSI2_SYSCONFIG, csi2 525 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_configure(struct iss_csi2_device *csi2) csi2 528 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_timing_cfg *timing = &csi2->timing[0]; csi2 538 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->contexts[0].enabled || csi2->ctrl.if_enable) csi2 541 drivers/staging/media/omap4iss/iss_csi2.c pad = media_entity_remote_pad(&csi2->pads[CSI2_PAD_SINK]); csi2 545 drivers/staging/media/omap4iss/iss_csi2.c csi2->frame_skip = 0; csi2 546 drivers/staging/media/omap4iss/iss_csi2.c v4l2_subdev_call(sensor, sensor, g_skip_frames, &csi2->frame_skip); csi2 548 drivers/staging/media/omap4iss/iss_csi2.c csi2->ctrl.vp_out_ctrl = pdata->bus.csi2.vpclk_div; csi2 549 drivers/staging/media/omap4iss/iss_csi2.c csi2->ctrl.frame_mode = ISS_CSI2_FRAME_IMMEDIATE; csi2 550 drivers/staging/media/omap4iss/iss_csi2.c csi2->ctrl.ecc_enable = pdata->bus.csi2.crc; csi2 562 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->formats[CSI2_PAD_SINK].code != csi2 563 drivers/staging/media/omap4iss/iss_csi2.c csi2->formats[CSI2_PAD_SOURCE].code) csi2 564 drivers/staging/media/omap4iss/iss_csi2.c csi2->dpcm_decompress = true; csi2 566 drivers/staging/media/omap4iss/iss_csi2.c csi2->dpcm_decompress = false; csi2 568 drivers/staging/media/omap4iss/iss_csi2.c csi2->contexts[0].format_id = csi2_ctx_map_format(csi2); csi2 570 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->video_out.bpl_padding == 0) csi2 571 drivers/staging/media/omap4iss/iss_csi2.c csi2->contexts[0].data_offset = 0; csi2 573 drivers/staging/media/omap4iss/iss_csi2.c csi2->contexts[0].data_offset = csi2->video_out.bpl_value; csi2 582 drivers/staging/media/omap4iss/iss_csi2.c csi2->contexts[0].eof_enabled = 1; csi2 583 drivers/staging/media/omap4iss/iss_csi2.c csi2->contexts[0].eol_enabled = 1; csi2 585 drivers/staging/media/omap4iss/iss_csi2.c csi2_irq_complexio1_set(csi2, 1); csi2 586 drivers/staging/media/omap4iss/iss_csi2.c csi2_irq_ctx_set(csi2, 1); csi2 587 drivers/staging/media/omap4iss/iss_csi2.c csi2_irq_status_set(csi2, 1); csi2 590 drivers/staging/media/omap4iss/iss_csi2.c csi2_timing_config(csi2, timing); csi2 591 drivers/staging/media/omap4iss/iss_csi2.c csi2_recv_config(csi2, &csi2->ctrl); csi2 592 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_config(csi2, &csi2->contexts[0]); csi2 604 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_print_status(struct iss_csi2_device *csi2) csi2 606 drivers/staging/media/omap4iss/iss_csi2.c struct iss_device *iss = csi2->iss; csi2 608 drivers/staging/media/omap4iss/iss_csi2.c if (!csi2->available) csi2 613 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, SYSCONFIG); csi2 614 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, SYSSTATUS); csi2 615 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, IRQENABLE); csi2 616 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, IRQSTATUS); csi2 617 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTRL); csi2 618 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, DBG_H); csi2 619 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, COMPLEXIO_CFG); csi2 620 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, COMPLEXIO_IRQSTATUS); csi2 621 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, SHORT_PACKET); csi2 622 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, COMPLEXIO_IRQENABLE); csi2 623 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, DBG_P); csi2 624 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, TIMING); csi2 625 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_CTRL1(0)); csi2 626 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_CTRL2(0)); csi2 627 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_DAT_OFST(0)); csi2 628 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_PING_ADDR(0)); csi2 629 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_PONG_ADDR(0)); csi2 630 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_IRQENABLE(0)); csi2 631 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_IRQSTATUS(0)); csi2 632 drivers/staging/media/omap4iss/iss_csi2.c CSI2_PRINT_REGISTER(iss, csi2->regs1, CTX_CTRL3(0)); csi2 645 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_isr_buffer(struct iss_csi2_device *csi2) csi2 649 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, 0, 0); csi2 651 drivers/staging/media/omap4iss/iss_csi2.c buffer = omap4iss_video_buffer_next(&csi2->video_out); csi2 660 drivers/staging/media/omap4iss/iss_csi2.c csi2_set_outaddr(csi2, buffer->iss_addr); csi2 661 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, 0, 1); csi2 664 drivers/staging/media/omap4iss/iss_csi2.c static void csi2_isr_ctx(struct iss_csi2_device *csi2, csi2 670 drivers/staging/media/omap4iss/iss_csi2.c status = iss_reg_read(csi2->iss, csi2->regs1, CSI2_CTX_IRQSTATUS(n)); csi2 671 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_CTX_IRQSTATUS(n), status); csi2 673 drivers/staging/media/omap4iss/iss_csi2.c if (omap4iss_module_sync_is_stopping(&csi2->wait, &csi2->stopping)) csi2 679 drivers/staging/media/omap4iss/iss_csi2.c to_iss_pipeline(&csi2->subdev.entity); csi2 683 drivers/staging/media/omap4iss/iss_csi2.c frame = iss_reg_read(csi2->iss, csi2->regs1, csi2 723 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->frame_skip) { csi2 724 drivers/staging/media/omap4iss/iss_csi2.c csi2->frame_skip--; csi2 725 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->frame_skip == 0) { csi2 726 drivers/staging/media/omap4iss/iss_csi2.c ctx->format_id = csi2_ctx_map_format(csi2); csi2 727 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_config(csi2, ctx); csi2 728 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, n, 1); csi2 733 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->output & CSI2_OUTPUT_MEMORY) csi2 734 drivers/staging/media/omap4iss/iss_csi2.c csi2_isr_buffer(csi2); csi2 740 drivers/staging/media/omap4iss/iss_csi2.c void omap4iss_csi2_isr(struct iss_csi2_device *csi2) csi2 742 drivers/staging/media/omap4iss/iss_csi2.c struct iss_pipeline *pipe = to_iss_pipeline(&csi2->subdev.entity); csi2 744 drivers/staging/media/omap4iss/iss_csi2.c struct iss_device *iss = csi2->iss; csi2 746 drivers/staging/media/omap4iss/iss_csi2.c if (!csi2->available) csi2 749 drivers/staging/media/omap4iss/iss_csi2.c csi2_irqstatus = iss_reg_read(csi2->iss, csi2->regs1, CSI2_IRQSTATUS); csi2 750 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_IRQSTATUS, csi2_irqstatus); csi2 754 drivers/staging/media/omap4iss/iss_csi2.c cpxio1_irqstatus = iss_reg_read(csi2->iss, csi2->regs1, csi2 756 drivers/staging/media/omap4iss/iss_csi2.c iss_reg_write(csi2->iss, csi2->regs1, CSI2_COMPLEXIO_IRQSTATUS, csi2 780 drivers/staging/media/omap4iss/iss_csi2.c csi2_isr_ctx(csi2, &csi2->contexts[0]); csi2 797 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = container_of(video, csi2 800 drivers/staging/media/omap4iss/iss_csi2.c csi2_set_outaddr(csi2, buffer->iss_addr); csi2 808 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->video_out.dmaqueue_flags & ISS_VIDEO_DMAQUEUE_UNDERRUN) { csi2 810 drivers/staging/media/omap4iss/iss_csi2.c csi2_if_enable(csi2, 1); csi2 811 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, 0, 1); csi2 812 drivers/staging/media/omap4iss/iss_csi2.c iss_video_dmaqueue_flags_clr(&csi2->video_out); csi2 827 drivers/staging/media/omap4iss/iss_csi2.c __csi2_get_format(struct iss_csi2_device *csi2, csi2 833 drivers/staging/media/omap4iss/iss_csi2.c return v4l2_subdev_get_try_format(&csi2->subdev, cfg, pad); csi2 835 drivers/staging/media/omap4iss/iss_csi2.c return &csi2->formats[pad]; csi2 839 drivers/staging/media/omap4iss/iss_csi2.c csi2_try_format(struct iss_csi2_device *csi2, csi2 871 drivers/staging/media/omap4iss/iss_csi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SINK, which); csi2 900 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 910 drivers/staging/media/omap4iss/iss_csi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SINK, csi2 937 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 946 drivers/staging/media/omap4iss/iss_csi2.c csi2_try_format(csi2, cfg, fse->pad, &format, fse->which); csi2 956 drivers/staging/media/omap4iss/iss_csi2.c csi2_try_format(csi2, cfg, fse->pad, &format, fse->which); csi2 974 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 977 drivers/staging/media/omap4iss/iss_csi2.c format = __csi2_get_format(csi2, cfg, fmt->pad, fmt->which); csi2 996 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 999 drivers/staging/media/omap4iss/iss_csi2.c format = __csi2_get_format(csi2, cfg, fmt->pad, fmt->which); csi2 1003 drivers/staging/media/omap4iss/iss_csi2.c csi2_try_format(csi2, cfg, fmt->pad, &fmt->format, fmt->which); csi2 1008 drivers/staging/media/omap4iss/iss_csi2.c format = __csi2_get_format(csi2, cfg, CSI2_PAD_SOURCE, csi2 1011 drivers/staging/media/omap4iss/iss_csi2.c csi2_try_format(csi2, cfg, CSI2_PAD_SOURCE, format, fmt->which); csi2 1021 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 1022 drivers/staging/media/omap4iss/iss_csi2.c struct iss_pipeline *pipe = to_iss_pipeline(&csi2->subdev.entity); csi2 1067 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 1068 drivers/staging/media/omap4iss/iss_csi2.c struct iss_device *iss = csi2->iss; csi2 1069 drivers/staging/media/omap4iss/iss_csi2.c struct iss_video *video_out = &csi2->video_out; csi2 1072 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->state == ISS_PIPELINE_STREAM_STOPPED) { csi2 1076 drivers/staging/media/omap4iss/iss_csi2.c omap4iss_subclk_enable(iss, csi2->subclk); csi2 1085 drivers/staging/media/omap4iss/iss_csi2.c if (omap4iss_csiphy_acquire(csi2->phy) < 0) csi2 1087 drivers/staging/media/omap4iss/iss_csi2.c csi2_configure(csi2); csi2 1088 drivers/staging/media/omap4iss/iss_csi2.c csi2_print_status(csi2); csi2 1096 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->output & CSI2_OUTPUT_MEMORY && csi2 1100 drivers/staging/media/omap4iss/iss_csi2.c atomic_set(&csi2->stopping, 0); csi2 1101 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, 0, 1); csi2 1102 drivers/staging/media/omap4iss/iss_csi2.c csi2_if_enable(csi2, 1); csi2 1107 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->state == ISS_PIPELINE_STREAM_STOPPED) csi2 1109 drivers/staging/media/omap4iss/iss_csi2.c if (omap4iss_module_sync_idle(&sd->entity, &csi2->wait, csi2 1110 drivers/staging/media/omap4iss/iss_csi2.c &csi2->stopping)) csi2 1112 drivers/staging/media/omap4iss/iss_csi2.c csi2_ctx_enable(csi2, 0, 0); csi2 1113 drivers/staging/media/omap4iss/iss_csi2.c csi2_if_enable(csi2, 0); csi2 1114 drivers/staging/media/omap4iss/iss_csi2.c csi2_irq_ctx_set(csi2, 0); csi2 1115 drivers/staging/media/omap4iss/iss_csi2.c omap4iss_csiphy_release(csi2->phy); csi2 1116 drivers/staging/media/omap4iss/iss_csi2.c omap4iss_subclk_disable(iss, csi2->subclk); csi2 1121 drivers/staging/media/omap4iss/iss_csi2.c csi2->state = enable; csi2 1167 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(sd); csi2 1168 drivers/staging/media/omap4iss/iss_csi2.c struct iss_csi2_ctrl_cfg *ctrl = &csi2->ctrl; csi2 1183 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->output & ~CSI2_OUTPUT_MEMORY) csi2 1185 drivers/staging/media/omap4iss/iss_csi2.c csi2->output |= CSI2_OUTPUT_MEMORY; csi2 1187 drivers/staging/media/omap4iss/iss_csi2.c csi2->output &= ~CSI2_OUTPUT_MEMORY; csi2 1193 drivers/staging/media/omap4iss/iss_csi2.c if (csi2->output & ~CSI2_OUTPUT_IPIPEIF) csi2 1195 drivers/staging/media/omap4iss/iss_csi2.c csi2->output |= CSI2_OUTPUT_IPIPEIF; csi2 1197 drivers/staging/media/omap4iss/iss_csi2.c csi2->output &= ~CSI2_OUTPUT_IPIPEIF; csi2 1206 drivers/staging/media/omap4iss/iss_csi2.c ctrl->vp_only_enable = csi2->output & CSI2_OUTPUT_MEMORY ? false : true; csi2 1207 drivers/staging/media/omap4iss/iss_csi2.c ctrl->vp_clk_enable = !!(csi2->output & CSI2_OUTPUT_IPIPEIF); csi2 1218 drivers/staging/media/omap4iss/iss_csi2.c void omap4iss_csi2_unregister_entities(struct iss_csi2_device *csi2) csi2 1220 drivers/staging/media/omap4iss/iss_csi2.c v4l2_device_unregister_subdev(&csi2->subdev); csi2 1221 drivers/staging/media/omap4iss/iss_csi2.c omap4iss_video_unregister(&csi2->video_out); csi2 1224 drivers/staging/media/omap4iss/iss_csi2.c int omap4iss_csi2_register_entities(struct iss_csi2_device *csi2, csi2 1230 drivers/staging/media/omap4iss/iss_csi2.c ret = v4l2_device_register_subdev(vdev, &csi2->subdev); csi2 1234 drivers/staging/media/omap4iss/iss_csi2.c ret = omap4iss_video_register(&csi2->video_out, vdev); csi2 1241 drivers/staging/media/omap4iss/iss_csi2.c omap4iss_csi2_unregister_entities(csi2); csi2 1254 drivers/staging/media/omap4iss/iss_csi2.c static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname) csi2 1256 drivers/staging/media/omap4iss/iss_csi2.c struct v4l2_subdev *sd = &csi2->subdev; csi2 1257 drivers/staging/media/omap4iss/iss_csi2.c struct media_pad *pads = csi2->pads; csi2 1268 drivers/staging/media/omap4iss/iss_csi2.c v4l2_set_subdevdata(sd, csi2); csi2 1282 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; csi2 1283 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.ops = &csi2_issvideo_ops; csi2 1284 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.bpl_alignment = 32; csi2 1285 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.bpl_zero_padding = 1; csi2 1286 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.bpl_max = 0x1ffe0; csi2 1287 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.iss = csi2->iss; csi2 1288 drivers/staging/media/omap4iss/iss_csi2.c csi2->video_out.capture_mem = PAGE_ALIGN(4096 * 4096) * 3; csi2 1290 drivers/staging/media/omap4iss/iss_csi2.c ret = omap4iss_video_init(&csi2->video_out, name); csi2 1297 drivers/staging/media/omap4iss/iss_csi2.c media_entity_cleanup(&csi2->subdev.entity); csi2 147 drivers/staging/media/omap4iss/iss_csi2.h void omap4iss_csi2_isr(struct iss_csi2_device *csi2); csi2 148 drivers/staging/media/omap4iss/iss_csi2.h int omap4iss_csi2_reset(struct iss_csi2_device *csi2); csi2 152 drivers/staging/media/omap4iss/iss_csi2.h void omap4iss_csi2_unregister_entities(struct iss_csi2_device *csi2); csi2 153 drivers/staging/media/omap4iss/iss_csi2.h int omap4iss_csi2_register_entities(struct iss_csi2_device *csi2, csi2 118 drivers/staging/media/omap4iss/iss_csiphy.c struct iss_csi2_device *csi2 = v4l2_get_subdevdata(csi2_subdev); csi2 128 drivers/staging/media/omap4iss/iss_csiphy.c lanes = &subdevs->bus.csi2.lanecfg; csi2 171 drivers/staging/media/omap4iss/iss_csiphy.c csi2->phy->used_data_lanes = 0; csi2 174 drivers/staging/media/omap4iss/iss_csiphy.c for (i = 0; i < csi2->phy->max_data_lanes; i++) { csi2 179 drivers/staging/media/omap4iss/iss_csiphy.c lanes->data[i].pos > (csi2->phy->max_data_lanes + 1)) csi2 186 drivers/staging/media/omap4iss/iss_csiphy.c csi2->phy->used_data_lanes++; csi2 190 drivers/staging/media/omap4iss/iss_csiphy.c lanes->clk.pos > (csi2->phy->max_data_lanes + 1)) csi2 197 drivers/staging/media/omap4iss/iss_csiphy.c / (2 * csi2->phy->used_data_lanes) csi2 210 drivers/staging/media/omap4iss/iss_csiphy.c mutex_lock(&csi2->phy->mutex); csi2 211 drivers/staging/media/omap4iss/iss_csiphy.c csi2->phy->dphy = csi2phy; csi2 212 drivers/staging/media/omap4iss/iss_csiphy.c csi2->phy->lanes = *lanes; csi2 213 drivers/staging/media/omap4iss/iss_csiphy.c mutex_unlock(&csi2->phy->mutex); csi2 224 drivers/staging/media/omap4iss/iss_csiphy.c rval = omap4iss_csi2_reset(phy->csi2); csi2 261 drivers/staging/media/omap4iss/iss_csiphy.c phy1->csi2 = &iss->csi2a; csi2 269 drivers/staging/media/omap4iss/iss_csiphy.c phy2->csi2 = &iss->csi2b; csi2 29 drivers/staging/media/omap4iss/iss_csiphy.h struct iss_csi2_device *csi2; csi2 57 include/linux/platform_data/media/omap4iss.h struct iss_csi2_platform_data csi2;