Commit cbcd6970ad802b8b6c5acf79d42a870256b62fbb
Committed by
Tom Rini
1 parent
b383d6c05e
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
bootstage: Fix up code style and comments
There are several code style and comment nits. Fix them and also remove the comment about passing bootstage to the kernel being TBD. This is already supported. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 8 additions and 6 deletions Side-by-side Diff
common/bootstage.c
... | ... | @@ -8,8 +8,6 @@ |
8 | 8 | /* |
9 | 9 | * This module records the progress of boot and arbitrary commands, and |
10 | 10 | * permits accurate timestamping of each. |
11 | - * | |
12 | - * TBD: Pass timings to kernel in the FDT | |
13 | 11 | */ |
14 | 12 | |
15 | 13 | #include <common.h> |
... | ... | @@ -84,6 +82,7 @@ |
84 | 82 | |
85 | 83 | /* Tell the board about this progress */ |
86 | 84 | show_boot_progress(flags & BOOTSTAGEF_ERROR ? -id : id); |
85 | + | |
87 | 86 | return mark; |
88 | 87 | } |
89 | 88 | |
... | ... | @@ -105,6 +104,7 @@ |
105 | 104 | |
106 | 105 | if (id == BOOTSTAGE_ID_ALLOC) |
107 | 106 | flags = BOOTSTAGEF_ALLOC; |
107 | + | |
108 | 108 | return bootstage_add_record(id, name, flags, timer_get_boot_us()); |
109 | 109 | } |
110 | 110 | |
... | ... | @@ -142,6 +142,7 @@ |
142 | 142 | |
143 | 143 | rec->start_us = timer_get_boot_us(); |
144 | 144 | rec->name = name; |
145 | + | |
145 | 146 | return rec->start_us; |
146 | 147 | } |
147 | 148 | |
... | ... | @@ -153,6 +154,7 @@ |
153 | 154 | |
154 | 155 | duration = (uint32_t)timer_get_boot_us() - rec->start_us; |
155 | 156 | rec->time_us += duration; |
157 | + | |
156 | 158 | return duration; |
157 | 159 | } |
158 | 160 |
include/bootstage.h
... | ... | @@ -217,7 +217,7 @@ |
217 | 217 | #if defined(USE_HOSTCC) |
218 | 218 | #define show_boot_progress(val) do {} while (0) |
219 | 219 | #else |
220 | -/* | |
220 | +/** | |
221 | 221 | * Board code can implement show_boot_progress() if needed. |
222 | 222 | * |
223 | 223 | * @param val Progress state (enum bootstage_id), or -id if an error |
... | ... | @@ -235,7 +235,7 @@ |
235 | 235 | * |
236 | 236 | * Call this after relocation has happened and after malloc has been initted. |
237 | 237 | * We need to copy any pointers in bootstage records that were added pre- |
238 | - * relocation, since memory can be overritten later. | |
238 | + * relocation, since memory can be overwritten later. | |
239 | 239 | * @return Always returns 0, to indicate success |
240 | 240 | */ |
241 | 241 | int bootstage_relocate(void); |
... | ... | @@ -251,7 +251,7 @@ |
251 | 251 | ulong bootstage_add_record(enum bootstage_id id, const char *name, |
252 | 252 | int flags, ulong mark); |
253 | 253 | |
254 | -/* | |
254 | +/** | |
255 | 255 | * Mark a time stamp for the current boot stage. |
256 | 256 | */ |
257 | 257 | ulong bootstage_mark(enum bootstage_id id); |
... | ... | @@ -310,7 +310,7 @@ |
310 | 310 | */ |
311 | 311 | int bootstage_fdt_add_report(void); |
312 | 312 | |
313 | -/* | |
313 | +/** | |
314 | 314 | * Stash bootstage data into memory |
315 | 315 | * |
316 | 316 | * @param base Base address of memory buffer |