diff options
author | Tom Rini | 2021-05-03 16:48:58 -0400 |
---|---|---|
committer | Tom Rini | 2021-07-07 10:17:54 -0400 |
commit | cb80ff20f2c8392f19248418f9a19a0474661860 (patch) | |
tree | a4a4ca65c3d6bb8331c0ba9746f300d9709abf7c /common | |
parent | c48b781581f6c3b24cb40241e90296b0e7f7a30f (diff) |
bootstage: Eliminate when not enabled
When we do not have bootstage enabled, rather than include an empty
dummy function, we just don't reference it. This saves us space in some
tight builds. This also shows a few cases where show_boot_progress was
incorrectly guarded before.
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/init/board_init.c | 2 | ||||
-rw-r--r-- | common/spl/spl.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/common/init/board_init.c b/common/init/board_init.c index 3f183ee1132..0965b96fa3a 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -166,7 +166,9 @@ void board_init_f_init_reserve(ulong base) board_init_f_init_stack_protection(); } +#if CONFIG_IS_ENABLED(BOOTSTAGE) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} +#endif diff --git a/common/spl/spl.c b/common/spl/spl.c index a0a608fd772..eba77cace6d 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -58,10 +58,12 @@ binman_sym_declare(ulong, spl, size); /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); +#if CONFIG_IS_ENABLED(BOOTSTAGE) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} +#endif #if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \ defined(CONFIG_SPL_ATF) |