summaryrefslogtreecommitdiff
path: root/common/lcd.c
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2013-01-30 21:39:57 +0000
committerTom Rini <trini@ti.com>2013-03-08 16:41:13 -0500
commit581bb41980a38c6ddac40f07ec1c8dcd37aca8f6 (patch)
treeaef7512edbe8dfcff5f6636fc1e851590860cab2 /common/lcd.c
parentbcc6cc9b3777f0c7246ff441f1d275552109713e (diff)
downloadu-boot-imx-581bb41980a38c6ddac40f07ec1c8dcd37aca8f6.zip
u-boot-imx-581bb41980a38c6ddac40f07ec1c8dcd37aca8f6.tar.gz
u-boot-imx-581bb41980a38c6ddac40f07ec1c8dcd37aca8f6.tar.bz2
lcd: add option for board specific splash screen preparation
Currently there is no logical place to put the code that prepares the splash image data. The splash image data should be ready in memory before bmp_display() is called, and after the environment is ready (since lcd.c looks for the splash image in an address specified by the environment variable "splashimage"). Our window of opportunity in board_init_r() is therefore: between env_relocate() and bmp_display(), and from the available options only the lcd related functions in drv_lcd_init() seem appropriate for such lcd oriented code. Add the option to prepare the splash image data in lcd_logo() right before it is sent to be displayed. Cc: Anatolij Gustschin <agust@denx.de> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'common/lcd.c')
-rw-r--r--common/lcd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/lcd.c b/common/lcd.c
index 66d4f94..ba6975b 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -1034,6 +1034,18 @@ 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
@@ -1045,6 +1057,9 @@ static void *lcd_logo(void)
int x = 0, y = 0;
do_splash = 0;
+ if (splash_screen_prepare())
+ return (void *)gd->fb_base;
+
addr = simple_strtoul (s, NULL, 16);
#ifdef CONFIG_SPLASH_SCREEN_ALIGN
s = getenv("splashpos");