summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-22 05:05:31 -0600
committerTom Rini <trini@konsulko.com>2017-06-05 14:13:07 -0400
commit5ac44a55437b2b8e86248ed886e86df9d55a514e (patch)
tree644a3416bd83f86b26bef22d1eca74994834c4bf /common/board_r.c
parent25e7dc6a6a798451973b2a3d7c02edc3658b270d (diff)
bootstage: Init as early as possible
At present we don't allow use of bootstage before driver model is running. This means we cannot time the init of driver model itself. Now that bootstage requires its own board-specific timer, we can move its init to earlier in the sequence, both before and after relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/board_r.c b/common/board_r.c
index bd77d646a1..bde98773d0 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -328,7 +328,6 @@ static int initr_dm(void)
static int initr_bootstage(void)
{
- /* We cannot do this before initr_dm() */
bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
return 0;
@@ -727,6 +726,7 @@ static init_fnc_t init_sequence_r[] = {
#endif
initr_barrier,
initr_malloc,
+ initr_bootstage, /* Needs malloc() but has its own timer */
initr_console_record,
#ifdef CONFIG_SYS_NONCACHED_MEMORY
initr_noncached,
@@ -738,7 +738,6 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_DM
initr_dm,
#endif
- initr_bootstage,
#if defined(CONFIG_ARM) || defined(CONFIG_NDS32)
board_init, /* Setup chipselects */
#endif