aboutsummaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorSimon Glass2022-03-04 08:43:00 -0700
committerTom Rini2022-03-10 08:28:36 -0500
commit87a5d1b5d012b0663517bfa36f5e01c8028f121a (patch)
tree4512a25b7200e1c84cb07aa64a17f98c46a1a13f /common/board_r.c
parent64defba4ea55736926c5152a245164ace58fa04e (diff)
event: Add basic support for events
Add a way to create and dispatch events without needing to allocate memory. Also add a way to 'spy' on events, thus allowing 'hooks' to be created. Use a linker list for static events, which we can use to replace functions like arch_cpu_init_f(). Allow an EVENT_DEBUG option which makes it easier to see what is going on at runtime, but uses more code space. Dynamic events allow the creation of a spy at runtime. This is not always necessary, but can be enabled with EVENT_DYNAMIC if needed. A 'test' event is the only option for now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index c24d9b4e220..b92c1bb0be1 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -594,6 +594,7 @@ static int run_main_loop(void)
static init_fnc_t init_sequence_r[] = {
initr_trace,
initr_reloc,
+ event_init,
/* TODO: could x86/PPC have this also perhaps? */
#if defined(CONFIG_ARM) || defined(CONFIG_RISCV)
initr_caches,