Lines Matching full:pc

64 	struct imx8qxp_pc *pc;  member
76 static inline u32 imx8qxp_pc_read(struct imx8qxp_pc *pc, unsigned int offset) in imx8qxp_pc_read() argument
78 return readl(pc->base + offset); in imx8qxp_pc_read()
82 imx8qxp_pc_write(struct imx8qxp_pc *pc, unsigned int offset, u32 value) in imx8qxp_pc_write() argument
84 writel(value, pc->base + offset); in imx8qxp_pc_write()
88 imx8qxp_pc_write_set(struct imx8qxp_pc *pc, unsigned int offset, u32 value) in imx8qxp_pc_write_set() argument
90 imx8qxp_pc_write(pc, offset + PC_REG_SET, value); in imx8qxp_pc_write_set()
94 imx8qxp_pc_write_clr(struct imx8qxp_pc *pc, unsigned int offset, u32 value) in imx8qxp_pc_write_clr() argument
96 imx8qxp_pc_write(pc, offset + PC_REG_CLR, value); in imx8qxp_pc_write_clr()
114 struct imx8qxp_pc *pc = ch->pc; in imx8qxp_pc_bridge_attach() local
117 DRM_DEV_ERROR(pc->dev, in imx8qxp_pc_bridge_attach()
133 struct imx8qxp_pc *pc = ch->pc; in imx8qxp_pc_bridge_mode_set() local
137 ret = pm_runtime_get_sync(pc->dev); in imx8qxp_pc_bridge_mode_set()
139 DRM_DEV_ERROR(pc->dev, in imx8qxp_pc_bridge_mode_set()
142 ret = clk_prepare_enable(pc->clk_apb); in imx8qxp_pc_bridge_mode_set()
144 DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", in imx8qxp_pc_bridge_mode_set()
148 imx8qxp_pc_write_clr(pc, PC_CTRL_REG, in imx8qxp_pc_bridge_mode_set()
152 imx8qxp_pc_write_clr(pc, PC_CTRL_REG, in imx8qxp_pc_bridge_mode_set()
156 imx8qxp_pc_write_set(pc, PC_CTRL_REG, in imx8qxp_pc_bridge_mode_set()
160 imx8qxp_pc_write_set(pc, PC_CTRL_REG, PC_VSYNC_MASK_ENABLE); in imx8qxp_pc_bridge_mode_set()
163 val = imx8qxp_pc_read(pc, PC_CTRL_REG); in imx8qxp_pc_bridge_mode_set()
171 imx8qxp_pc_write(pc, PC_CTRL_REG, val); in imx8qxp_pc_bridge_mode_set()
174 imx8qxp_pc_write_set(pc, PC_CTRL_REG, PC_DISP_BYPASS(ch->stream_id)); in imx8qxp_pc_bridge_mode_set()
176 clk_disable_unprepare(pc->clk_apb); in imx8qxp_pc_bridge_mode_set()
184 struct imx8qxp_pc *pc = ch->pc; in imx8qxp_pc_bridge_atomic_disable() local
187 ret = pm_runtime_put(pc->dev); in imx8qxp_pc_bridge_atomic_disable()
189 DRM_DEV_ERROR(pc->dev, "failed to put runtime PM: %d\n", ret); in imx8qxp_pc_bridge_atomic_disable()
272 struct imx8qxp_pc *pc; in imx8qxp_pc_bridge_probe() local
280 pc = devm_kzalloc(dev, sizeof(*pc), GFP_KERNEL); in imx8qxp_pc_bridge_probe()
281 if (!pc) in imx8qxp_pc_bridge_probe()
284 pc->base = devm_platform_ioremap_resource(pdev, 0); in imx8qxp_pc_bridge_probe()
285 if (IS_ERR(pc->base)) in imx8qxp_pc_bridge_probe()
286 return PTR_ERR(pc->base); in imx8qxp_pc_bridge_probe()
288 pc->dev = dev; in imx8qxp_pc_bridge_probe()
290 pc->clk_apb = devm_clk_get(dev, "apb"); in imx8qxp_pc_bridge_probe()
291 if (IS_ERR(pc->clk_apb)) { in imx8qxp_pc_bridge_probe()
292 ret = PTR_ERR(pc->clk_apb); in imx8qxp_pc_bridge_probe()
298 platform_set_drvdata(pdev, pc); in imx8qxp_pc_bridge_probe()
310 ch = &pc->ch[i]; in imx8qxp_pc_bridge_probe()
311 ch->pc = pc; in imx8qxp_pc_bridge_probe()
348 if (i == 1 && pc->ch[0].next_bridge) in imx8qxp_pc_bridge_probe()
349 drm_bridge_remove(&pc->ch[0].bridge); in imx8qxp_pc_bridge_probe()
357 struct imx8qxp_pc *pc = platform_get_drvdata(pdev); in imx8qxp_pc_bridge_remove() local
362 ch = &pc->ch[i]; in imx8qxp_pc_bridge_remove()
377 struct imx8qxp_pc *pc = platform_get_drvdata(pdev); in imx8qxp_pc_runtime_suspend() local
380 ret = clk_prepare_enable(pc->clk_apb); in imx8qxp_pc_runtime_suspend()
382 DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", in imx8qxp_pc_runtime_suspend()
386 imx8qxp_pc_write_clr(pc, PC_SW_RESET_REG, PC_FULL_RESET_N); in imx8qxp_pc_runtime_suspend()
388 clk_disable_unprepare(pc->clk_apb); in imx8qxp_pc_runtime_suspend()
399 struct imx8qxp_pc *pc = platform_get_drvdata(pdev); in imx8qxp_pc_runtime_resume() local
402 ret = clk_prepare_enable(pc->clk_apb); in imx8qxp_pc_runtime_resume()
404 DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", in imx8qxp_pc_runtime_resume()
410 imx8qxp_pc_write_set(pc, PC_SW_RESET_REG, PC_FULL_RESET_N); in imx8qxp_pc_runtime_resume()
412 clk_disable_unprepare(pc->clk_apb); in imx8qxp_pc_runtime_resume()