diff options
author | Anatolij Gustschin <agust@denx.de> | 2013-07-01 22:04:05 (GMT) |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2013-07-08 18:21:24 (GMT) |
commit | ff8fb56b6f7edafc1bcba8ef008b3f368cabe60d (patch) | |
tree | 2db117f992892120bab9ab04b212700642adf0e7 /drivers/video | |
parent | 327598945b13000065ca6ba3fe96c9bd45320999 (diff) | |
download | u-boot-fsl-qoriq-ff8fb56b6f7edafc1bcba8ef008b3f368cabe60d.tar.xz |
video: consolidate splash screen alignment code
Code for checking "splashpos" environment variable is
duplicated in drivers, move it to the common function.
Call this function also in the bmp display command to
consider "splashpos" settings.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/cfb_console.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 785bbcf..e384b71 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -222,11 +222,7 @@ #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) #include <watchdog.h> #include <bmp_layout.h> - -#ifdef CONFIG_SPLASH_SCREEN_ALIGN -#define BMP_ALIGN_CENTER 0x7FFF -#endif - +#include <splash.h> #endif /* @@ -1976,23 +1972,7 @@ static void *video_logo(void) __maybe_unused ulong addr; __maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s = getenv("splashpos"); - if (s != NULL) { - if (s[0] == 'm') - video_logo_xpos = BMP_ALIGN_CENTER; - else - video_logo_xpos = simple_strtol(s, NULL, 0); - - s = strchr(s + 1, ','); - if (s != NULL) { - if (s[1] == 'm') - video_logo_ypos = BMP_ALIGN_CENTER; - else - video_logo_ypos = simple_strtol(s + 1, NULL, 0); - } - } -#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + splash_get_pos(&video_logo_xpos, &video_logo_ypos); #ifdef CONFIG_SPLASH_SCREEN s = getenv("splashimage"); |