diff options
author | Simon Glass | 2022-03-04 08:43:05 -0700 |
---|---|---|
committer | Tom Rini | 2022-03-10 08:28:36 -0500 |
commit | 7fe32b3442f0d0e77a0768dcc1ee65fb352a080a (patch) | |
tree | 96a205669eeb9145d15eaec2f9bac5a53ea3c791 /arch/riscv/cpu | |
parent | 42fdcebf859f93139d58defd5abef44dedb9b17a (diff) |
event: Convert arch_cpu_init_dm() to use events
Instead of a special function, send an event after driver model is inited
and adjust the boards which use this function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/riscv/cpu')
-rw-r--r-- | arch/riscv/cpu/cpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c index 8d90c5e6b8a..3ffcbbd23fa 100644 --- a/arch/riscv/cpu/cpu.c +++ b/arch/riscv/cpu/cpu.c @@ -7,9 +7,11 @@ #include <cpu.h> #include <dm.h> #include <dm/lists.h> +#include <event.h> #include <init.h> #include <log.h> #include <asm/encoding.h> +#include <asm/system.h> #include <dm/uclass-internal.h> #include <linux/bitops.h> @@ -81,7 +83,7 @@ static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1) } #endif -int arch_cpu_init_dm(void) +int riscv_cpu_setup(void *ctx, struct event *event) { int ret; @@ -133,6 +135,7 @@ int arch_cpu_init_dm(void) return 0; } +EVENT_SPY(EVT_DM_POST_INIT, riscv_cpu_setup); int arch_early_init_r(void) { |