From 770605e4f9874230728f5a592820c619b1565ebc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 13 Feb 2012 13:51:18 +0000 Subject: bootstage: Replace show_boot_progress/error() with bootstage_...() These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass --- include/bootstage.h | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'include/bootstage.h') diff --git a/include/bootstage.h b/include/bootstage.h index 8f7fcd7d77..b56d95351c 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -178,9 +178,35 @@ enum bootstage_id { * has occurred. */ void show_boot_progress(int val); -static inline void show_boot_error(int val) + +#ifdef CONFIG_BOOTSTAGE +/* This is the full bootstage implementation */ + +/* + * Mark a time stamp for the current boot stage. + */ +ulong bootstage_mark(enum bootstage_id id); + +ulong bootstage_error(enum bootstage_id id); + +#else +/* + * This is a dummy implementation which just calls show_boot_progress(), + * and won't even do that unless CONFIG_SHOW_BOOT_PROGRESS is defined + */ + +static inline ulong bootstage_mark(enum bootstage_id id) +{ + show_boot_progress(id); + return 0; +} + +static inline ulong bootstage_error(enum bootstage_id id) { - show_boot_progress(-val); + show_boot_progress(-id); + return 0; } +#endif /* CONFIG_BOOTSTAGE */ + #endif -- cgit v1.2.1