public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 001/159] LCD: Add an option to skip registration as an stdio output
@ 2015-12-07  3:04 Lin Huang
  2015-12-07  3:04 ` [U-Boot] [PATCH 002/159] arm: mx6: Reduce SPL malloc pool size Lin Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lin Huang @ 2015-12-07  3:04 UTC (permalink / raw)
  To: u-boot

From: Stephane Ayotte <sayotte@tycoint.com>

This patch adds an option to skip the registration of LCD stdio output for
boards that want to show different text on LCD than on serial output (or
the active stdout selected by the environment variable).

Signed-off-by: Stephane Ayotte <sayotte@tycoint.com>
---
 common/lcd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/common/lcd.c b/common/lcd.c
index d29308a..ed68be9 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -143,6 +143,16 @@ __weak int lcd_get_size(int *line_length)
 	return *line_length * panel_info.vl_row;
 }
 
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the lcd console initialization.
+ */
+__weak int board_lcd_console_skip(void)
+{
+	/* As default, don't skip cfb init */
+	return 0;
+}
+
 int drv_lcd_init(void)
 {
 	struct stdio_dev lcddev;
@@ -152,6 +162,9 @@ int drv_lcd_init(void)
 
 	lcd_init(lcd_base);
 
+	if (board_lcd_console_skip())
+		return 0;
+
 	/* Device initialization */
 	memset(&lcddev, 0, sizeof(lcddev));
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-07  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07  3:04 [U-Boot] [PATCH 001/159] LCD: Add an option to skip registration as an stdio output Lin Huang
2015-12-07  3:04 ` [U-Boot] [PATCH 002/159] arm: mx6: Reduce SPL malloc pool size Lin Huang
2015-12-07  8:14   ` Stefano Babic
2015-12-07  3:04 ` [U-Boot] [PATCH 003/159] cgtqmx6eval: Add SPI NOR flash support Lin Huang
2015-12-07  3:12 ` [U-Boot] [PATCH 001/159] LCD: Add an option to skip registration as an stdio output Lin Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox