From c15700c56ad0f46f09ce094d4e1c89196e5dd9fc Mon Sep 17 00:00:00 2001 From: Mikael Larsson Date: Fri, 15 Oct 2010 16:00:20 +0200 Subject: U8500: Load splash image from TOC This patch removes splash image from u-boot binary and loads it from a toc entry called SPLASH instead. Depends-On: I2e182df7fa056a5df2deb05a4ebab844eedbb85d I715045aba01c1c747f9bd15f02c6d057f66ff968 I93e63a092fd6f229f530e55ec4b98e8e09db1c06 ST-Ericsson ID: ER268766 Change-Id: I4ee7885618d18d526dfca55d7c45b769cd9b52c9 Signed-off-by: Mikael Larsson Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/6879 Reviewed-by: Michael BRANDT Reviewed-by: Rikard OLSSON --- board/st/u8500/mcde_display.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'board') diff --git a/board/st/u8500/mcde_display.c b/board/st/u8500/mcde_display.c index 70d1cb9b0..e0f924550 100644 --- a/board/st/u8500/mcde_display.c +++ b/board/st/u8500/mcde_display.c @@ -20,13 +20,8 @@ #include #include #include "common.h" - - -#ifdef CONFIG_SYS_VIDEO_USE_GIMP_HEADER -#include -#else -#include -#endif +#include +#include #define DEBUG 0 #define dbg_printk(format, arg...) \ @@ -327,6 +322,9 @@ int mcde_display_image(void) u32 xpos = 0; u32 ypos = 0; int ret; + struct mmc *emmc_dev; + u32 address = CONFIG_SYS_VIDEO_FB_ADRS; + #ifdef CONFIG_SYS_VIDEO_USE_GIMP_HEADER u32 i = 0; u8 pixels[3]; @@ -341,6 +339,18 @@ int mcde_display_image(void) return -ret; } + emmc_dev = find_mmc_device(CONFIG_EMMC_DEV_NUM); + if (emmc_dev == NULL) { + printf("mcde_display_image: emmc not found.\n"); + return 1; + } + + if (toc_load_toc_entry(&emmc_dev->block_dev, MCDE_TOC_SPLASH_NAME, 0, + 0, address)) { + printf("mcde_display_image: no splash image found.\n"); + return 1; + } + #ifdef CONFIG_SYS_VIDEO_USE_GIMP_HEADER /* Add the image data */ sp = (u16 *)CONFIG_SYS_VIDEO_FB_ADRS; @@ -354,7 +364,7 @@ int mcde_display_image(void) } mcde_ovly_set_source_buf(ovly, CONFIG_SYS_VIDEO_FB_ADRS); #else - mcde_ovly_set_source_buf(ovly, (u32)&mcde_video_logo[0]); + mcde_ovly_set_source_buf(ovly, (u32)address); #endif mcde_ovly_set_source_info(ovly, (MCDE_VIDEO_LOGO_WIDTH*2), main_display.default_pixel_format); -- cgit v1.2.3