mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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>
This commit is contained in:
parent
736d1746fb
commit
05bfe13210
1 changed files with 13 additions and 0 deletions
13
common/lcd.c
13
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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue