diff --git a/common/autoboot.c b/common/autoboot.c index 0a254498d40..46802f91f70 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -381,7 +382,11 @@ static int abortboot_single_key(int bootdelay) int abort = 0; unsigned long ts; + printf("BEFORE AUTOBOOT PRINTF"); + printf("%d %s\n", timer_get_boot_us(), __func__); printf("Hit any key to stop autoboot: %2d ", bootdelay); + printf("%d %s\n", timer_get_boot_us(), __func__); + printf("AFTER AUTOBOOT PRINTF"); /* * Check if key already pressed @@ -392,27 +397,6 @@ static int abortboot_single_key(int bootdelay) abort = 1; /* don't auto boot */ } - while ((bootdelay > 0) && (!abort)) { - --bootdelay; - /* delay 1000 ms */ - ts = get_timer(0); - do { - if (tstc()) { /* we got a key press */ - int key; - - abort = 1; /* don't auto boot */ - bootdelay = 0; /* no more delay */ - key = getchar();/* consume input */ - if (IS_ENABLED(CONFIG_AUTOBOOT_USE_MENUKEY)) - menukey = key; - break; - } - udelay(10000); - } while (!abort && get_timer(ts) < 1000); - - printf("\b\b\b%2d ", bootdelay); - } - putc('\n'); return abort; diff --git a/common/board_f.c b/common/board_f.c index bff465d9cb2..8d36b37c31f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -891,6 +891,7 @@ static int initf_upl(void) static void initcall_run_f(void) { + ulong previous=0; /* * Please do not add logic to this function (variables, if (), etc.). * For simplicity it should remain an ordered list of function calls. @@ -919,6 +920,7 @@ static void initcall_run_f(void) #if CONFIG_IS_ENABLED(BOARD_EARLY_INIT_F) INITCALL(board_early_init_f); #endif + bootstage_mark_name(BOOTSTAGE_ID_START_FUCK_R, "fuck_init_r"); #if defined(CONFIG_PPC) || defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K) /* get CPU and bus clocks according to the environment variable */ INITCALL(get_clocks); /* get CPU and bus clocks (etc.) */ @@ -1079,6 +1081,7 @@ void board_init_f(ulong boot_flags) */ static void initcall_run_f_r(void) { + ulong previous=0; #if CONFIG_IS_ENABLED(X86_64) INITCALL(init_cache_f_r); #endif diff --git a/common/board_r.c b/common/board_r.c index b90a4d9ff69..fd44ac1973d 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -299,6 +299,13 @@ static int initr_dm_devices(void) return 0; } +static int initr_fuckstage(void) +{ + bootstage_mark_name(BOOTSTAGE_ID_START_FUCK_R, "fuck_init_r"); + + return 0; +} + static int initr_bootstage(void) { bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r"); @@ -611,10 +618,12 @@ static int run_main_loop(void) static void initcall_run_r(void) { + ulong previous=0; /* * Please do not add logic to this function (variables, if (), etc.). * For simplicity it should remain an ordered list of function calls. */ +// INITCALL(initr_fuckstage); /* Needs malloc() but has its own timer */ INITCALL(initr_trace); INITCALL(initr_reloc); INITCALL(event_init); diff --git a/include/bootstage.h b/include/bootstage.h index 3300ca0248a..97af15a3d10 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -184,6 +184,7 @@ enum bootstage_id { BOOTSTAGE_ID_END_VPL, BOOTSTAGE_ID_START_UBOOT_F, BOOTSTAGE_ID_START_UBOOT_R, + BOOTSTAGE_ID_START_FUCK_R, BOOTSTAGE_ID_USB_START, BOOTSTAGE_ID_ETH_START, BOOTSTAGE_ID_BOOTP_START, diff --git a/include/initcall.h b/include/initcall.h index 220a55ad84d..c9bba708c6a 100644 --- a/include/initcall.h +++ b/include/initcall.h @@ -13,13 +13,14 @@ _Static_assert(EVT_COUNT < 256, "Can only support 256 event types with 8 bits"); #define INITCALL(_call) \ - do { \ - if (_call()) { \ - printf("%s(): initcall %s() failed\n", __func__, \ - #_call); \ - hang(); \ - } \ - } while (0) + do { \ +printf("%d before %s\n", timer_get_boot_us(), #_call); \ + if (_call()) { \ + printf("%s(): initcall %s() failed\n", __func__, \ + #_call); \ + hang(); \ + } \ + } while (0) #define INITCALL_EVT(_evt) \ do { \