public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] video:lcd:cfb_console: cm_t35: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEO
@ 2013-06-03 17:20 Robert Winkler
  2013-06-04  6:10 ` Igor Grinberg
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Winkler @ 2013-06-03 17:20 UTC (permalink / raw)
  To: u-boot

Also change splash_screen_prepare to a weak function.

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
---
 board/compulab/cm_t35/cm_t35.c |  2 +-
 common/lcd.c                   | 10 ++++------
 drivers/video/cfb_console.c    | 14 ++++++++++++++
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index b0b80e5..95098af 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -120,7 +120,7 @@ static inline int splash_load_from_nand(void)
 }
 #endif /* CONFIG_CMD_NAND */
 
-int board_splash_screen_prepare(void)
+int splash_screen_prepare(void)
 {
 	char *env_splashimage_value;
 	u32 bmp_load_addr;
diff --git a/common/lcd.c b/common/lcd.c
index edae835..90f1143 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -1069,15 +1069,13 @@ 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)
+int __splash_screen_prepare(void)
 {
 	return 0;
 }
+
+int splash_screen_prepare(void)
+	__attribute__ ((weak, alias("__splash_screen_prepare")));
 #endif
 
 static void *lcd_logo(void)
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 0793f07..9180998 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1966,6 +1966,16 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
 #endif
 }
 
+#ifdef CONFIG_SPLASH_SCREEN_PREPARE
+int __splash_screen_prepare(void)
+{
+	return 0;
+}
+
+int splash_screen_prepare(void)
+	__attribute__ ((weak, alias("__splash_screen_prepare")));
+#endif
+
 static void *video_logo(void)
 {
 	char info[128];
@@ -1996,6 +2006,10 @@ static void *video_logo(void)
 	s = getenv("splashimage");
 	if (s != NULL) {
 
+#ifdef CONFIG_SPLASH_SCREEN_PREPARE
+		splash_screen_prepare();
+#endif
+
 		addr = simple_strtoul(s, NULL, 16);
 
 
-- 
1.8.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-10  7:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 17:20 [U-Boot] [PATCH] video:lcd:cfb_console: cm_t35: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEO Robert Winkler
2013-06-04  6:10 ` Igor Grinberg
2013-06-04 15:10   ` Robert Winkler
2013-06-04 18:11     ` Robert Winkler
2013-06-05  8:31       ` Igor Grinberg
2013-06-06 19:06         ` Robert Winkler
2013-06-09  7:35           ` Igor Grinberg
2013-06-10  7:02           ` Nikita Kiryanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox