summaryrefslogtreecommitdiff
path: root/board/st/u8500/u8500.c
diff options
context:
space:
mode:
authorMikael Larsson <mikael.xt.larsson@stericsson.com>2010-10-14 09:19:16 +0200
committerMichael BRANDT <michael.brandt@stericsson.com>2010-10-26 15:10:46 +0200
commit1228c1a209bfc96c9ccf32d3aedbd523314877a3 (patch)
tree3dcc1653af71b7b60140c860e2eec2a679815e29 /board/st/u8500/u8500.c
parent72804305ab834ae203857d8efafab1cfc97fcc61 (diff)
Minimize time to splash
Moved splash start to just after emmc init to minimize time to splash. Changed behaviour so that all SW is loaded after splash and splash is not loaded if it is itp. ST-Ericsson ID: ER268766 Change-Id: I09f8efce997ebd97d6de1a5fbff707b2aef175a4 Signed-off-by: Mikael Larsson <mikael.xt.larsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/6515 Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com> Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'board/st/u8500/u8500.c')
-rw-r--r--board/st/u8500/u8500.c57
1 files changed, 47 insertions, 10 deletions
diff --git a/board/st/u8500/u8500.c b/board/st/u8500/u8500.c
index 078dadfa2..93cd79d39 100644
--- a/board/st/u8500/u8500.c
+++ b/board/st/u8500/u8500.c
@@ -15,6 +15,7 @@
#include <asm/arch/ab8500.h>
#include <tc35892.h>
#include "gpio.h"
+#include "itp.h"
#include "common.h"
#ifdef CONFIG_VIDEO_LOGO
@@ -69,6 +70,10 @@
int board_id; /* set in board_late_init() */
int errno;
+#ifdef CONFIG_VIDEO_LOGO
+static int mcde_error;
+#endif
+
/*
* Flag to indicate from where to where we have to copy the initialised data.
* In case we were loaded, its value is -1 and .data must be saved for an
@@ -269,10 +274,12 @@ int dram_init(void)
}
#ifdef CONFIG_VIDEO_LOGO
-int dss_init(void)
+static int dss_init(void)
{
- uchar byte;
- puts("MCDE: ");
+ puts("\nMCDE: ");
+
+ boottime_tag("splash");
+
if (!cpu_is_u8500v11() && !cpu_is_u8500v2()) {
printf("Only HREF+ or V2 is supported\n");
goto mcde_error;
@@ -287,19 +294,44 @@ int dss_init(void)
}
printf("ready\n");
- setenv("startup_graphics", "1");
- setenv("logo", "nologo");
return 0;
mcde_error:
- setenv("startup_graphics", "0");
- setenv("logo", "0");
-
return -EINVAL;
}
#endif
+
+/*
+ * board_early_access - for functionality that needs to run before
+ * board_late_init but after board_init and emmc init.
+ */
+int board_early_access(block_dev_desc_t *block_dev)
+{
+
+#ifdef CONFIG_ITP_LOAD
+ itp_read_config(block_dev);
+#endif
+
+#ifdef CONFIG_VIDEO_LOGO
+ /* only load splash if not itp */
+#ifdef CONFIG_ITP_LOAD
+ if (!itp_is_itp_in_config())
+ mcde_error = dss_init();
+#else
+ mcde_error = dss_init();
+#endif
+#endif
+
+#ifdef CONFIG_ITP_LOAD
+ if (itp_load_itp_and_modem(block_dev))
+ return 1;
+#endif
+
+ return 0;
+}
+
unsigned int addr_vall_arr[] = {
0x8011F000, 0x0000FFFF, // Clocks for HSI TODO Enable reqd only
0x8011F008, 0x00001CFF, // Clocks for HSI TODO Enable reqd only
@@ -463,8 +495,13 @@ int board_late_init(void)
}
#endif /* CONFIG_MMC */
#ifdef CONFIG_VIDEO_LOGO
- boottime_tag("splash");
- dss_init();
+ if (mcde_error) {
+ setenv("startup_graphics", "0");
+ setenv("logo", "0");
+ } else {
+ setenv("startup_graphics", "1");
+ setenv("logo", "nologo");
+ }
#endif
/*
* Create a memargs variable which points uses either the memargs256 or