summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStephane Ayotte <sayotte@tycoint.com>2015-11-03 11:14:49 -0500
committerAnatolij Gustschin <agust@denx.de>2015-11-19 21:46:30 +0100
commit05bfe1321024e2ae0039dc16f17d2165610fb4fd (patch)
tree8acdfb2da304d98e3bee65bfbb5dc92499597062 /common
parent736d1746fb7b8f7cd70657a4a72db2b6bd8de40e (diff)
downloadu-boot-imx-05bfe1321024e2ae0039dc16f17d2165610fb4fd.zip
u-boot-imx-05bfe1321024e2ae0039dc16f17d2165610fb4fd.tar.gz
u-boot-imx-05bfe1321024e2ae0039dc16f17d2165610fb4fd.tar.bz2
LCD: Add an option to skip registration as an stdio output
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>
Diffstat (limited to 'common')
-rw-r--r--common/lcd.c13
1 files changed, 13 insertions, 0 deletions
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));