X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fbootstage.h;h=3b2216b8a8c8316df3dec35153947087623a905c;hb=b278c4095b59c40ff512c5433b735b000e547554;hp=9113852ca26f57a10a7595d4b58cf2a5af123447;hpb=94fd1316b75896b668d22ce846785d92c0340100;p=u-boot diff --git a/include/bootstage.h b/include/bootstage.h index 9113852ca2..3b2216b8a8 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -187,6 +187,7 @@ enum bootstage_id { * rough boot timing information. */ BOOTSTAGE_ID_AWAKE, + BOOTSTAGE_ID_START_SPL, BOOTSTAGE_ID_START_UBOOT_F, BOOTSTAGE_ID_START_UBOOT_R, BOOTSTAGE_ID_USB_START, @@ -198,11 +199,15 @@ enum bootstage_id { BOOTSTAGE_ID_MAIN_LOOP, BOOTSTAGE_KERNELREAD_START, BOOTSTAGE_KERNELREAD_STOP, + BOOTSTAGE_ID_BOARD_INIT, + BOOTSTAGE_ID_BOARD_INIT_DONE, BOOTSTAGE_ID_CPU_AWAKE, BOOTSTAGE_ID_MAIN_CPU_AWAKE, BOOTSTAGE_ID_MAIN_CPU_READY, + BOOTSTAGE_ID_ACCUM_LCD, + /* a few spare for the user, from here */ BOOTSTAGE_ID_USER, BOOTSTAGE_ID_COUNT = BOOTSTAGE_ID_USER + CONFIG_BOOTSTAGE_USER_COUNT, @@ -216,6 +221,7 @@ enum bootstage_id { */ ulong timer_get_boot_us(void); +#ifndef CONFIG_SPL_BUILD /* * Board code can implement show_boot_progress() if needed. * @@ -223,8 +229,11 @@ ulong timer_get_boot_us(void); * has occurred. */ void show_boot_progress(int val); +#else +#define show_boot_progress(val) do {} while (0) +#endif -#ifdef CONFIG_BOOTSTAGE +#if defined(CONFIG_BOOTSTAGE) && !defined(CONFIG_SPL_BUILD) /* This is the full bootstage implementation */ /** @@ -284,6 +293,27 @@ void bootstage_report(void); */ int bootstage_fdt_add_report(void); +/* + * Stash bootstage data into memory + * + * @param base Base address of memory buffer + * @param size Size of memory buffer + * @return 0 if stashed ok, -1 if out of space + */ +int bootstage_stash(void *base, int size); + +/** + * Read bootstage data from memory + * + * Bootstage data is read from memory and placed in the bootstage table + * in the user records. + * + * @param base Base address of memory buffer + * @param size Size of memory buffer (-1 if unknown) + * @return 0 if unstashed ok, -1 if bootstage info not found, or out of space + */ +int bootstage_unstash(void *base, int size); + #else /* * This is a dummy implementation which just calls show_boot_progress(), @@ -307,7 +337,15 @@ static inline ulong bootstage_mark_name(enum bootstage_id id, const char *name) return 0; } +static inline int bootstage_stash(void *base, int size) +{ + return 0; /* Pretend to succeed */ +} +static inline int bootstage_unstash(void *base, int size) +{ + return 0; /* Pretend to succeed */ +} #endif /* CONFIG_BOOTSTAGE */ #endif