Patchwork [U-Boot,2/3] video: lcd: Make splash_screen_prepare weak, remove config macro

login
register
mail settings
Submitter Robert Winkler
Date June 17, 2013, 6:31 p.m.
Message ID <1371493891-25234-3-git-send-email-robert.winkler@boundarydevices.com>
Download mbox | patch
Permalink /patch/252035/
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Comments

Robert Winkler - June 17, 2013, 6:31 p.m.
Remove CONFIG_SPLASH_SCREEN_PREPARE from README
Add doc/README.splashprepare to document functionality

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
---
 README                   |  8 --------
 common/splash.c          | 13 ++++---------
 doc/README.splashprepare |  8 ++++++++
 3 files changed, 12 insertions(+), 17 deletions(-)
 create mode 100644 doc/README.splashprepare
Igor Grinberg - June 18, 2013, 6:24 a.m.
On 06/17/13 21:31, Robert Winkler wrote:
> Remove CONFIG_SPLASH_SCREEN_PREPARE from README
> Add doc/README.splashprepare to document functionality
> 
> Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  README                   |  8 --------
>  common/splash.c          | 13 ++++---------
>  doc/README.splashprepare |  8 ++++++++
>  3 files changed, 12 insertions(+), 17 deletions(-)
>  create mode 100644 doc/README.splashprepare
> 
> diff --git a/README b/README
> index b72ab2f..0686073 100644
> --- a/README
> +++ b/README
> @@ -1605,14 +1605,6 @@ CBFS (Coreboot Filesystem) support
>  			=> vertically centered image
>  			   at x = dspWidth - bmpWidth - 9
>  
> -		CONFIG_SPLASH_SCREEN_PREPARE
> -
> -		If this option is set then the board_splash_screen_prepare()
> -		function, which must be defined in your code, is called as part
> -		of the splash screen display sequence. It gives the board an
> -		opportunity to prepare the splash image data before it is
> -		processed and sent to the frame buffer by U-Boot.
> -
>  - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
>  
>  		If this option is set, additionally to standard BMP
> diff --git a/common/splash.c b/common/splash.c
> index 98de2be..1882e5f 100644
> --- a/common/splash.c
> +++ b/common/splash.c
> @@ -21,16 +21,11 @@
>   */
>  
>  #include <splash.h>
> -#include <config.h>
>  
> -#ifdef CONFIG_SPLASH_SCREEN_PREPARE
> -int splash_screen_prepare(void)
> -{
> -	return board_splash_screen_prepare();
> -}
> -#else
> -int splash_screen_prepare(void)
> +int __splash_screen_prepare(void)
>  {
>  	return 0;
>  }
> -#endif
> +
> +int splash_screen_prepare(void)
> +	__attribute__ ((weak, alias("__splash_screen_prepare")));
> diff --git a/doc/README.splashprepare b/doc/README.splashprepare
> new file mode 100644
> index 0000000..61b4ec5
> --- /dev/null
> +++ b/doc/README.splashprepare
> @@ -0,0 +1,8 @@
> +---------------------------------------------------------------------
> +Splash Screen
> +---------------------------------------------------------------------
> +The splash_screen_prepare() function is a weak function defined in
> +common/splash.c. It is called as part of the splash screen display
> +sequence. It gives the board an opportunity to prepare the splash
> +image data before it is processed and sent to the frame buffer by
> +U-Boot.  Define your own version to use this feature.
>

Patch

diff --git a/README b/README
index b72ab2f..0686073 100644
--- a/README
+++ b/README
@@ -1605,14 +1605,6 @@  CBFS (Coreboot Filesystem) support
 			=> vertically centered image
 			   at x = dspWidth - bmpWidth - 9
 
-		CONFIG_SPLASH_SCREEN_PREPARE
-
-		If this option is set then the board_splash_screen_prepare()
-		function, which must be defined in your code, is called as part
-		of the splash screen display sequence. It gives the board an
-		opportunity to prepare the splash image data before it is
-		processed and sent to the frame buffer by U-Boot.
-
 - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
 
 		If this option is set, additionally to standard BMP
diff --git a/common/splash.c b/common/splash.c
index 98de2be..1882e5f 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -21,16 +21,11 @@ 
  */
 
 #include <splash.h>
-#include <config.h>
 
-#ifdef CONFIG_SPLASH_SCREEN_PREPARE
-int splash_screen_prepare(void)
-{
-	return board_splash_screen_prepare();
-}
-#else
-int splash_screen_prepare(void)
+int __splash_screen_prepare(void)
 {
 	return 0;
 }
-#endif
+
+int splash_screen_prepare(void)
+	__attribute__ ((weak, alias("__splash_screen_prepare")));
diff --git a/doc/README.splashprepare b/doc/README.splashprepare
new file mode 100644
index 0000000..61b4ec5
--- /dev/null
+++ b/doc/README.splashprepare
@@ -0,0 +1,8 @@ 
+---------------------------------------------------------------------
+Splash Screen
+---------------------------------------------------------------------
+The splash_screen_prepare() function is a weak function defined in
+common/splash.c. It is called as part of the splash screen display
+sequence. It gives the board an opportunity to prepare the splash
+image data before it is processed and sent to the frame buffer by
+U-Boot.  Define your own version to use this feature.