提交 b82fe6dd 编写于 作者: F Fabio Estevam 提交者: Tomi Valkeinen

video: fbdev: imxfb: Provide a reset mechanism

Currently when we boot the kernel on a mx25pdk the LCDC controller
does not show the Linux logo on boot.

This problem is well explained by Sascha Hauer:

"Unfortunately this LCD controller does not have an enable bit. The
controller starts directly when the clocks are enabled. If the clocks
are enabled when the controller is not yet programmed with proper
register values then it just goes into some undefined state. What I
suspect is that the clocks already were enabled before driver probe,
presumably by the bootloader, so the controller is already in undefined
state when entering Linux. Now by dis/enabling the ipg clock you
effectively reset the controller. Since you have programmed it with
valid register values in the mean time it starts working after this
reset."

So do as suggested and force a reset of the LCDC hardware by
enabling and disabling the IPG clock.

With this change the Linux logo can be seen on boot on a mx25pdk.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 c3a2da26
......@@ -902,6 +902,21 @@ static int imxfb_probe(struct platform_device *pdev)
goto failed_getclock;
}
/*
* The LCDC controller does not have an enable bit. The
* controller starts directly when the clocks are enabled.
* If the clocks are enabled when the controller is not yet
* programmed with proper register values (enabled at the
* bootloader, for example) then it just goes into some undefined
* state.
* To avoid this issue, let's enable and disable LCDC IPG clock
* so that we force some kind of 'reset' to the LCDC block.
*/
ret = clk_prepare_enable(fbi->clk_ipg);
if (ret)
goto failed_getclock;
clk_disable_unprepare(fbi->clk_ipg);
fbi->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
if (IS_ERR(fbi->clk_ahb)) {
ret = PTR_ERR(fbi->clk_ahb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册