diff options
author | Simon Glass | 2022-03-04 08:43:04 -0700 |
---|---|---|
committer | Tom Rini | 2022-03-10 08:28:36 -0500 |
commit | 42fdcebf859f93139d58defd5abef44dedb9b17a (patch) | |
tree | 51cb886505b82fa87bd38ef898fcb153e0c2cd49 /board/google | |
parent | 5b896ed5856f768cdd55cdeb44c5f8f6b6a7a18a (diff) |
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 'board/google')
-rw-r--r-- | board/google/chromebook_coral/coral.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c index 182cf7517a9..9e23f5cd31e 100644 --- a/board/google/chromebook_coral/coral.c +++ b/board/google/chromebook_coral/coral.c @@ -10,6 +10,7 @@ #include <command.h> #include <cros_ec.h> #include <dm.h> +#include <event.h> #include <init.h> #include <log.h> #include <sysinfo.h> @@ -32,11 +33,12 @@ struct cros_gpio_info { int flags; }; -int misc_init_f(void) +static int coral_check_ll_boot(void *ctx, struct event *event) { if (!ll_boot_init()) { printf("Running as secondary loader"); - if (gd->arch.coreboot_table) { + if (CONFIG_IS_ENABLED(COREBOOT_SYSINFO) && + gd->arch.coreboot_table) { int ret; printf(" (found coreboot table at %lx)", @@ -55,6 +57,7 @@ int misc_init_f(void) return 0; } +EVENT_SPY(EVT_MISC_INIT_F, coral_check_ll_boot); int arch_misc_init(void) { |