MA-18519 drm/imx: lcdifv3: Enable axi clock before access register
authorJindong Yue <jindong.yue@nxp.com>
Wed, 6 Jan 2021 09:08:01 +0000 (17:08 +0800)
committerJindong Yue <jindong.yue@nxp.com>
Thu, 6 May 2021 04:24:08 +0000 (12:24 +0800)
Without axi clock, lcdif register access will cause system hang.
This issue happens when this driver built as module.

Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/gpu/imx/lcdifv3/lcdifv3-common.c

index 77f4051..7bdb00e 100644 (file)
@@ -743,6 +743,7 @@ static int imx_lcdifv3_probe(struct platform_device *pdev)
                /* TODO: Maybe the clock enable should
                 *       be done in reset driver.
                 */
+               clk_prepare_enable(lcdifv3->clk_disp_axi);
                clk_prepare_enable(lcdifv3->clk_disp_apb);
 
                writel(CTRL_SW_RESET, lcdifv3->base + LCDIFV3_CTRL_CLR);
@@ -751,6 +752,7 @@ static int imx_lcdifv3_probe(struct platform_device *pdev)
                if (ret)
                        dev_warn(dev, "lcdif1 reset failed: %d\n", ret);
 
+               clk_disable_unprepare(lcdifv3->clk_disp_axi);
                clk_disable_unprepare(lcdifv3->clk_disp_apb);
        }