video: fbdev: imxfb: Provide a reset mechanism
authorFabio Estevam <fabio.estevam@nxp.com>
Tue, 19 Jan 2016 13:10:57 +0000 (11:10 -0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 29 Jan 2016 12:20:16 +0000 (14:20 +0200)
commitb82fe6ddd782f847332aeabf8cab980852f61629
tree97d53f9e7ef82d6640e12fa63fe3bf9ec4e5d4b3
parentc3a2da26e6216033456c1d5375cd1d2629d1fd09
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: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/imxfb.c