bootstage: Init as early as possible
[oweals/u-boot.git] / common / board_r.c
index bd77d646a1325b959ce8791174b12f40c00c22cd..bde98773d0efb579ebb827ebe3f5a58932dcc16c 100644 (file)
@@ -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