From e5e6dd7fe444b873d9113e2f4d716f63faf9ca70 Mon Sep 17 00:00:00 2001 From: Jimmy Rubin Date: Tue, 8 Jun 2010 16:28:18 +0200 Subject: Adding support for startup graphics This patch does the following: * Startup graphics only support for HREF+. * Displays a logo last in the u-boot sequence before the kernel is booted. * Informs the kernel not to display penguins. * Added pmem values to bootargs. ST Ericsson Change-ID: WP236570 Change-Id: Ib176c17a795ddd002e94344eb9c67739b1e2269e Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1048 Reviewed-by: Par-Olof HAKANSSON Reviewed-by: Jonas ABERG Tested-by: Jonas ABERG --- board/st/u8500/u8500.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'board/st/u8500/u8500.c') diff --git a/board/st/u8500/u8500.c b/board/st/u8500/u8500.c index a38e9b91b..5bd11a4dc 100644 --- a/board/st/u8500/u8500.c +++ b/board/st/u8500/u8500.c @@ -13,9 +13,13 @@ #include #include #include +#include #include "gpio.h" #include "common.h" +#ifdef CONFIG_VIDEO_LOGO +#include "mcde_display.h" +#endif #define NOMADIK_PER4_BASE (0x80150000) #define NOMADIK_BACKUPRAM0_BASE (NOMADIK_PER4_BASE + 0x00000) #define NOMADIK_BACKUPRAM1_BASE (NOMADIK_PER4_BASE + 0x01000) @@ -171,6 +175,52 @@ int dram_init(void) return 0; } +#ifdef CONFIG_VIDEO_LOGO +int dss_init(void) +{ + int ret = 0; + uchar byte; + puts("MCDE: "); + if (!cpu_is_u8500v11()) { + printf("Only HREF+ is supported \n"); + goto mcde_error; + } + (void) i2c_set_bus_num(0); + (void) i2c_read(CONFIG_SYS_I2C_GPIOE_ADDR, 0x80, 1, &byte, 1); + if (byte == 0x01) + board_id = 0; + else + board_id = 1; + + if (board_id != 0) { + ret = mcde_startup(); + if (ret) { + printf("startup failed\n"); + goto mcde_error; + } + ret = mcde_display_image(); + if (ret) { + printf("display_image failed\n"); + goto mcde_error; + } + + printf("ready \n"); + setenv("startup_graphics", "1"); + setenv("logo", "nologo"); + goto mcde_ok; + } else { + ret = 1; + printf("MOP500 is not supported \n"); + } +mcde_error: + setenv("startup_graphics", "0"); + setenv("logo", "0"); +mcde_ok: + return ret; + +} +#endif + unsigned int addr_vall_arr[] = { 0x8011F000, 0x0000FFFF, // Clocks for HSI TODO Enable reqd only 0x8011F008, 0x00001CFF, // Clocks for HSI TODO Enable reqd only @@ -305,6 +355,9 @@ int board_late_init(void) &byte_array[0], 2); } #endif /* CONFIG_MMC */ +#ifdef CONFIG_VIDEO_LOGO + dss_init(); +#endif return (0); } #endif /* BOARD_LATE_INIT */ -- cgit v1.2.3