diff options
author | Tom Rini <trini@ti.com> | 2013-07-10 08:42:25 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-10 08:42:25 -0400 |
commit | 2f4998ab4429af4b805f8566268c3b761aa4babd (patch) | |
tree | 781c234b704484f833779e29ab6f9330ebf00e9f /common/lcd.c | |
parent | c479c1361ade3cf2346f41a922b85373ddff8a26 (diff) | |
parent | ff8fb56b6f7edafc1bcba8ef008b3f368cabe60d (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-video
Diffstat (limited to 'common/lcd.c')
-rw-r--r-- | common/lcd.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/common/lcd.c b/common/lcd.c index 3a60484eea6..50ea4d6cacc 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -43,6 +43,8 @@ #include <lcd.h> #include <watchdog.h> +#include <splash.h> + #if defined(CONFIG_CPU_PXA25X) || defined(CONFIG_CPU_PXA27X) || \ defined(CONFIG_CPU_MONAHANS) #define CONFIG_CPU_PXA @@ -1072,18 +1074,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } #endif -#ifdef CONFIG_SPLASH_SCREEN_PREPARE -static inline int splash_screen_prepare(void) -{ - return board_splash_screen_prepare(); -} -#else -static inline int splash_screen_prepare(void) -{ - return 0; -} -#endif - static void *lcd_logo(void) { #ifdef CONFIG_SPLASH_SCREEN @@ -1096,26 +1086,11 @@ static void *lcd_logo(void) do_splash = 0; if (splash_screen_prepare()) - return (void *)gd->fb_base; + return (void *)lcd_base; addr = simple_strtoul (s, NULL, 16); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s = getenv("splashpos"); - if (s != NULL) { - if (s[0] == 'm') - x = BMP_ALIGN_CENTER; - else - x = simple_strtol(s, NULL, 0); - - s = strchr(s + 1, ','); - if (s != NULL) { - if (s[1] == 'm') - y = BMP_ALIGN_CENTER; - else - y = simple_strtol (s + 1, NULL, 0); - } - } -#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + + splash_get_pos(&x, &y); if (bmp_display(addr, x, y) == 0) return (void *)lcd_base; @@ -1193,7 +1168,7 @@ static int lcd_dt_simplefb_configure_node(void *blob, int off) u32 stride; fdt32_t cells[2]; int ret; - const char format[] = + static const char format[] = #if LCD_BPP == LCD_COLOR16 "r5g6b5"; #else @@ -1239,8 +1214,8 @@ static int lcd_dt_simplefb_configure_node(void *blob, int off) int lcd_dt_simplefb_add_node(void *blob) { - const char compat[] = "simple-framebuffer"; - const char disabled[] = "disabled"; + static const char compat[] = "simple-framebuffer"; + static const char disabled[] = "disabled"; int off, ret; off = fdt_add_subnode(blob, 0, "framebuffer"); |