Lines Matching refs:venc
85 struct venc_state *venc = to_state(sd); in venc_read() local
87 return readl(venc->venc_base + offset); in venc_read()
92 struct venc_state *venc = to_state(sd); in venc_write() local
94 writel(val, (venc->venc_base + offset)); in venc_write()
111 struct venc_state *venc = to_state(sd); in vdaccfg_write() local
113 writel(val, venc->vdaccfg_reg); in vdaccfg_write()
115 val = readl(venc->vdaccfg_reg); in vdaccfg_write()
148 struct venc_state *venc = to_state(sd); in venc_enabledigitaloutput() local
181 if (venc->venc_type != VPBE_VERSION_3) in venc_enabledigitaloutput()
232 struct venc_state *venc = to_state(sd); in venc_set_ntsc() local
233 struct venc_platform_data *pdata = venc->pdata; in venc_set_ntsc()
242 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_STD, V4L2_STD_525_60); in venc_set_ntsc()
245 if (venc->venc_type == VPBE_VERSION_3) { in venc_set_ntsc()
249 } else if (venc->venc_type == VPBE_VERSION_2) { in venc_set_ntsc()
279 struct venc_state *venc = to_state(sd); in venc_set_pal() local
285 if (venc->pdata->setup_clock(VPBE_ENC_STD, V4L2_STD_625_50) < 0) in venc_set_pal()
288 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_STD, V4L2_STD_625_50); in venc_set_pal()
291 if (venc->venc_type == VPBE_VERSION_3) { in venc_set_pal()
295 } else if (venc->venc_type == VPBE_VERSION_2) { in venc_set_pal()
331 struct venc_state *venc = to_state(sd); in venc_set_480p59_94() local
332 struct venc_platform_data *pdata = venc->pdata; in venc_set_480p59_94()
335 if (venc->venc_type != VPBE_VERSION_1 && in venc_set_480p59_94()
336 venc->venc_type != VPBE_VERSION_2) in venc_set_480p59_94()
343 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 27000000); in venc_set_480p59_94()
346 if (venc->venc_type == VPBE_VERSION_2) in venc_set_480p59_94()
351 if (venc->venc_type == VPBE_VERSION_1) { in venc_set_480p59_94()
379 struct venc_state *venc = to_state(sd); in venc_set_576p50() local
380 struct venc_platform_data *pdata = venc->pdata; in venc_set_576p50()
384 if (venc->venc_type != VPBE_VERSION_1 && in venc_set_576p50()
385 venc->venc_type != VPBE_VERSION_2) in venc_set_576p50()
391 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 27000000); in venc_set_576p50()
394 if (venc->venc_type == VPBE_VERSION_2) in venc_set_576p50()
400 if (venc->venc_type == VPBE_VERSION_1) { in venc_set_576p50()
426 struct venc_state *venc = to_state(sd); in venc_set_720p60_internal() local
427 struct venc_platform_data *pdata = venc->pdata; in venc_set_720p60_internal()
432 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 74250000); in venc_set_720p60_internal()
455 struct venc_state *venc = to_state(sd); in venc_set_1080i30_internal() local
456 struct venc_platform_data *pdata = venc->pdata; in venc_set_1080i30_internal()
461 venc_enable_vpss_clock(venc->venc_type, VPBE_ENC_DV_TIMINGS, 74250000); in venc_set_1080i30_internal()
495 struct venc_state *venc = to_state(sd); in venc_s_dv_timings() local
506 (venc->venc_type == VPBE_VERSION_2)) { in venc_s_dv_timings()
513 (venc->venc_type == VPBE_VERSION_2)) { in venc_s_dv_timings()
526 struct venc_state *venc = to_state(sd); in venc_s_routing() local
533 venc->output = output; in venc_s_routing()
575 struct venc_state *venc = to_state(sd); in venc_initialize() local
579 venc->output = 0; in venc_initialize()
580 venc->std = V4L2_STD_525_60; in venc_initialize()
582 ret = venc_s_routing(sd, 0, venc->output, 0); in venc_initialize()
588 ret = venc_s_std_output(sd, venc->std); in venc_initialize()
600 struct venc_state **venc = data; in venc_device_get() local
603 *venc = platform_get_drvdata(pdev); in venc_device_get()
611 struct venc_state *venc; in venc_sub_dev_init() local
614 err = bus_for_each_dev(&platform_bus_type, NULL, &venc, in venc_sub_dev_init()
616 if (venc == NULL) in venc_sub_dev_init()
619 v4l2_subdev_init(&venc->sd, &venc_ops); in venc_sub_dev_init()
621 strcpy(venc->sd.name, venc_name); in venc_sub_dev_init()
622 if (v4l2_device_register_subdev(v4l2_dev, &venc->sd) < 0) { in venc_sub_dev_init()
627 if (venc_initialize(&venc->sd)) { in venc_sub_dev_init()
633 return &venc->sd; in venc_sub_dev_init()
640 struct venc_state *venc; in venc_probe() local
644 venc = kzalloc(sizeof(struct venc_state), GFP_KERNEL); in venc_probe()
645 if (venc == NULL) in venc_probe()
653 venc->venc_type = pdev_id->driver_data; in venc_probe()
654 venc->pdev = &pdev->dev; in venc_probe()
655 venc->pdata = pdev->dev.platform_data; in venc_probe()
656 if (NULL == venc->pdata) { in venc_probe()
657 dev_err(venc->pdev, "Unable to get platform data for" in venc_probe()
664 dev_err(venc->pdev, in venc_probe()
671 dev_err(venc->pdev, "Unable to reserve VENC MMIO region\n"); in venc_probe()
676 venc->venc_base = ioremap_nocache(res->start, resource_size(res)); in venc_probe()
677 if (!venc->venc_base) { in venc_probe()
678 dev_err(venc->pdev, "Unable to map VENC IO space\n"); in venc_probe()
683 if (venc->venc_type != VPBE_VERSION_1) { in venc_probe()
686 dev_err(venc->pdev, in venc_probe()
694 dev_err(venc->pdev, in venc_probe()
700 venc->vdaccfg_reg = ioremap_nocache(res->start, in venc_probe()
702 if (!venc->vdaccfg_reg) { in venc_probe()
703 dev_err(venc->pdev, in venc_probe()
709 spin_lock_init(&venc->lock); in venc_probe()
710 platform_set_drvdata(pdev, venc); in venc_probe()
711 dev_notice(venc->pdev, "VENC sub device probe success\n"); in venc_probe()
717 iounmap(venc->venc_base); in venc_probe()
722 kfree(venc); in venc_probe()
728 struct venc_state *venc = platform_get_drvdata(pdev); in venc_remove() local
732 iounmap((void *)venc->venc_base); in venc_remove()
734 if (venc->venc_type != VPBE_VERSION_1) { in venc_remove()
736 iounmap((void *)venc->vdaccfg_reg); in venc_remove()
739 kfree(venc); in venc_remove()