video: allow version string to be optional when using LOGO
authorTim Harvey <tharvey@gateworks.com>
Tue, 24 May 2016 21:59:59 +0000 (14:59 -0700)
committerAnatolij Gustschin <agust@denx.de>
Mon, 11 Jul 2016 20:26:40 +0000 (22:26 +0200)
The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the
U-Boot version string on top of the logo.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
README
drivers/video/cfb_console.c

diff --git a/README b/README
index 26d5ad2..e86934a 100644 (file)
--- a/README
+++ b/README
@@ -840,6 +840,9 @@ The following options need to be configured:
                        CONFIG_CONSOLE_EXTRA_INFO
                                                additional board info beside
                                                the logo
+                       CONFIG_HIDE_LOGO_VERSION
+                                               do not display bootloader
+                                               version string
 
                When CONFIG_CFB_CONSOLE_ANSI is defined, console will support
                a limited number of ANSI escape sequences (cursor control,
index ef4984b..30b53db 100644 (file)
@@ -1929,10 +1929,10 @@ static void plot_logo_or_black(void *screen, int x, int y, int black)
 static void *video_logo(void)
 {
        char info[128];
-       int space, len;
        __maybe_unused int y_off = 0;
        __maybe_unused ulong addr;
        __maybe_unused char *s;
+       __maybe_unused int len, space;
 
        splash_get_pos(&video_logo_xpos, &video_logo_ypos);
 
@@ -1978,6 +1978,7 @@ static void *video_logo(void)
 
        sprintf(info, " %s", version_string);
 
+#ifndef CONFIG_HIDE_LOGO_VERSION
        space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
        len = strlen(info);
 
@@ -2027,6 +2028,7 @@ static void *video_logo(void)
                }
        }
 #endif
+#endif
 
        return (video_fb_address + video_logo_height * VIDEO_LINE_LEN);
 }