
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com --- common/lcd.c | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/common/lcd.c b/common/lcd.c index 74a5c77..b5e81f1 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -78,7 +78,7 @@ static inline void lcd_putc_xy (ushort x, ushort y, uchar c);
static int lcd_init (void *lcdbase);
-static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]); +static int lcd_clear (int draw_logo); extern void lcd_ctrl_init (void *lcdbase); extern void lcd_enable (void); static void *lcd_logo (void); @@ -379,7 +379,12 @@ int drv_lcd_init (void) }
/*----------------------------------------------------------------------*/ -static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +{ + return lcd_clear(1); +} + +static int lcd_clear(int draw_logo) { #if LCD_BPP == LCD_MONOCHROME /* Setting the palette */ @@ -414,9 +419,13 @@ static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) COLOR_MASK(lcd_getbgcolor()), lcd_line_length*panel_info.vl_row); #endif - /* Paint the logo and retrieve LCD base address */ - debug ("[LCD] Drawing the logo...\n"); - lcd_console_address = lcd_logo (); + if (draw_logo) { + /* Paint the logo and retrieve LCD base address */ + debug ("[LCD] Drawing the logo...\n"); + lcd_console_address = lcd_logo (); + } else { + lcd_console_address = lcd_base; + }
console_col = 0; console_row = 0; @@ -425,7 +434,7 @@ static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) }
U_BOOT_CMD( - cls, 1, 1, lcd_clear, + cls, 1, 1, do_lcd_clear, "clear screen", "" ); @@ -439,7 +448,7 @@ static int lcd_init (void *lcdbase)
lcd_ctrl_init (lcdbase); lcd_is_enabled = 1; - lcd_clear (NULL, 1, 1, NULL); /* dummy args */ + lcd_clear (1); lcd_enable ();
/* Initialize the console */