diff options
author | Simon Glass <sjg@chromium.org> | 2022-03-04 08:43:04 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-10 08:28:36 -0500 |
commit | 42fdcebf859f93139d58defd5abef44dedb9b17a (patch) | |
tree | 51cb886505b82fa87bd38ef898fcb153e0c2cd49 /arch | |
parent | 5b896ed5856f768cdd55cdeb44c5f8f6b6a7a18a (diff) | |
download | u-boot-42fdcebf859f93139d58defd5abef44dedb9b17a.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 12aace9a202..0f5a87309d2 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) { |