Thread (7 messages) 7 messages, 4 authors, 2012-04-23
STALE5151d REVIEWED: 4 (0M)

[PATCH V2] i.MX28: Shut down the LCD controller to avoid BootROM sampling bug

From: Marek Vasut <marex@denx.de>
Date: 2012-04-19 18:31:02
Also in: linux-arm-kernel
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

From: Marek Vasut <marek.vasut@gmail.com>

If there's some traffic on the LCD controller pads, the BootROM has trouble with
sampling the bootmode from these pads. The BootROM usually ends in a loop.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Chen Peter-B29397 <redacted>
Cc: Detlev Zundel <redacted>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Li Frank-B20596 <redacted>
Cc: Lin Tony-B19295 <redacted>
Cc: Linux FBDEV <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <redacted>
Cc: Shawn Guo <redacted>
Cc: Stefano Babic <redacted>
Cc: Subodh Nijsure <redacted>
Cc: Tony Lin <redacted>
Cc: Wolfgang Denk <redacted>
Acked-by: Shawn Guo <redacted>
Acked-by: Wolfgang Denk <redacted>
Acked-by: Wolfram Sang <redacted>
Tested-by: Wolfgang Denk <redacted>
---
 drivers/video/mxsfb.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

V2: Make shutdown() call static
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 4a89f88..dcf29bf 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -880,6 +880,18 @@ static int __devexit mxsfb_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void mxsfb_shutdown(struct platform_device *pdev)
+{
+	struct fb_info *fb_info = platform_get_drvdata(pdev);
+	struct mxsfb_info *host = to_imxfb_host(fb_info);
+
+	/*
+	 * Force stop the LCD controller as keeping it running during reboot
+	 * might interfere with the BootROM's boot mode pads sampling.
+	 */
+	writel(CTRL_RUN, host->base + LCDC_CTRL + REG_CLR);
+}
+
 static struct platform_device_id mxsfb_devtype[] = {
 	{
 		.name = "imx23-fb",
@@ -896,6 +908,7 @@ MODULE_DEVICE_TABLE(platform, mxsfb_devtype);
 static struct platform_driver mxsfb_driver = {
 	.probe = mxsfb_probe,
 	.remove = __devexit_p(mxsfb_remove),
+	.shutdown = mxsfb_shutdown,
 	.id_table = mxsfb_devtype,
 	.driver = {
 		   .name = DRIVER_NAME,
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help