summaryrefslogtreecommitdiff
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/sandbox/cpu/start.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 12aace9a20..0f5a87309d 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <efi_loader.h>
#include <errno.h>
+#include <event.h>
#include <init.h>
#include <log.h>
#include <os.h>
@@ -119,10 +120,11 @@ int sandbox_early_getopt_check(void)
os_exit(0);
}
-int misc_init_f(void)
+static int sandbox_misc_init_f(void *ctx, struct event *event)
{
return sandbox_early_getopt_check();
}
+EVENT_SPY(EVT_MISC_INIT_F, sandbox_misc_init_f);
static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg)
{