Lines Matching refs:vdoa
93 struct vdoa_data *vdoa; member
102 struct vdoa_data *vdoa = data; in vdoa_irq_handler() local
107 writel(0, vdoa->regs + VDOAIE); in vdoa_irq_handler()
109 curr_ctx = vdoa->curr_ctx; in vdoa_irq_handler()
111 dev_warn(vdoa->dev, in vdoa_irq_handler()
116 val = readl(vdoa->regs + VDOAIST); in vdoa_irq_handler()
117 writel(val, vdoa->regs + VDOAIST); in vdoa_irq_handler()
119 val = readl(vdoa->regs + VDOASR) & VDOASR_ERRW; in vdoa_irq_handler()
120 dev_err(vdoa->dev, "AXI %s error\n", val ? "write" : "read"); in vdoa_irq_handler()
122 dev_warn(vdoa->dev, "Spurious interrupt\n"); in vdoa_irq_handler()
132 struct vdoa_data *vdoa = ctx->vdoa; in vdoa_wait_for_completion() local
139 dev_err(vdoa->dev, in vdoa_wait_for_completion()
151 struct vdoa_data *vdoa = ctx->vdoa; in vdoa_device_run() local
154 if (vdoa->curr_ctx) in vdoa_device_run()
155 vdoa_wait_for_completion(vdoa->curr_ctx); in vdoa_device_run()
157 vdoa->curr_ctx = ctx; in vdoa_device_run()
170 writel(val, vdoa->regs + VDOAC); in vdoa_device_run()
173 vdoa->regs + VDOAFP); in vdoa_device_run()
176 writel(val, vdoa->regs + VDOAIEBA00); in vdoa_device_run()
179 vdoa->regs + VDOASL); in vdoa_device_run()
186 writel(val, vdoa->regs + VDOAIUBO); in vdoa_device_run()
189 writel(val, vdoa->regs + VDOAVEBA0); in vdoa_device_run()
191 writel(val, vdoa->regs + VDOAVUBO); in vdoa_device_run()
194 writel(VDOAIE_EITERR | VDOAIE_EIEOT, vdoa->regs + VDOAIE); in vdoa_device_run()
195 writel(VDOASRR_START, vdoa->regs + VDOASRR); in vdoa_device_run()
199 struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa) in vdoa_context_create() argument
208 err = clk_prepare_enable(vdoa->vdoa_clk); in vdoa_context_create()
215 ctx->vdoa = vdoa; in vdoa_context_create()
223 struct vdoa_data *vdoa = ctx->vdoa; in vdoa_context_destroy() local
225 if (vdoa->curr_ctx == ctx) { in vdoa_context_destroy()
226 vdoa_wait_for_completion(vdoa->curr_ctx); in vdoa_context_destroy()
227 vdoa->curr_ctx = NULL; in vdoa_context_destroy()
230 clk_disable_unprepare(vdoa->vdoa_clk); in vdoa_context_destroy()
286 struct vdoa_data *vdoa; in vdoa_probe() local
296 vdoa = devm_kzalloc(&pdev->dev, sizeof(*vdoa), GFP_KERNEL); in vdoa_probe()
297 if (!vdoa) in vdoa_probe()
300 vdoa->dev = &pdev->dev; in vdoa_probe()
302 vdoa->vdoa_clk = devm_clk_get(vdoa->dev, NULL); in vdoa_probe()
303 if (IS_ERR(vdoa->vdoa_clk)) { in vdoa_probe()
304 dev_err(vdoa->dev, "Failed to get clock\n"); in vdoa_probe()
305 return PTR_ERR(vdoa->vdoa_clk); in vdoa_probe()
309 vdoa->regs = devm_ioremap_resource(vdoa->dev, res); in vdoa_probe()
310 if (IS_ERR(vdoa->regs)) in vdoa_probe()
311 return PTR_ERR(vdoa->regs); in vdoa_probe()
318 "vdoa", vdoa); in vdoa_probe()
320 dev_err(vdoa->dev, "Failed to get irq\n"); in vdoa_probe()
324 platform_set_drvdata(pdev, vdoa); in vdoa_probe()