summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-04 18:43:04 +0300
committerTom Rini <trini@konsulko.com>2022-03-10 16:28:36 +0300
commit42fdcebf859f93139d58defd5abef44dedb9b17a (patch)
tree51cb886505b82fa87bd38ef898fcb153e0c2cd49 /common/board_f.c
parent5b896ed5856f768cdd55cdeb44c5f8f6b6a7a18a (diff)
downloadu-boot-42fdcebf859f93139d58defd5abef44dedb9b17a.tar.xz
event: Convert misc_init_f() to use events
This hook can be implmented using events, for the three boards that actually use it. Add the event type and event handlers. Drop CONFIG_MISC_INIT_F since we can just use CONFIG_EVENT to control this. Since sandbox always enables CONFIG_EVENT, we can drop the defconfig lines there too. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/board_f.c b/common/board_f.c
index e36bdbc988..0ef34c7575 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -818,6 +818,11 @@ __weak int clear_bss(void)
return 0;
}
+static int misc_init_f(void)
+{
+ return event_notify_null(EVT_MISC_INIT_F);
+}
+
static const init_fnc_t init_sequence_f[] = {
setup_mon_len,
#ifdef CONFIG_OF_CONTROL
@@ -877,9 +882,7 @@ static const init_fnc_t init_sequence_f[] = {
show_board_info,
#endif
INIT_FUNC_WATCHDOG_INIT
-#if defined(CONFIG_MISC_INIT_F)
misc_init_f,
-#endif
INIT_FUNC_WATCHDOG_RESET
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
init_func_i2c,