summaryrefslogtreecommitdiff
path: root/common/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/event.c')
-rw-r--r--common/event.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/common/event.c b/common/event.c
index 6653300e6cf..3080d9ed754 100644
--- a/common/event.c
+++ b/common/event.c
@@ -36,6 +36,8 @@ const char *const type_name[] = {
/* init hooks */
"misc_init_f",
+ "fsp_init_r",
+ "last_stage_init",
/* Fpga load hook */
"fpga_load",
@@ -50,7 +52,7 @@ const char *const type_name[] = {
_Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size");
#endif
-static const char *event_type_name(enum event_t type)
+const char *event_type_name(enum event_t type)
{
#if CONFIG_IS_ENABLED(EVENT_DEBUG)
return type_name[type];
@@ -72,7 +74,14 @@ static int notify_static(struct event *ev)
log_debug("Sending event %x/%s to spy '%s'\n", ev->type,
event_type_name(ev->type), event_spy_id(spy));
- ret = spy->func(NULL, ev);
+ if (spy->flags & EVSPYF_SIMPLE) {
+ const struct evspy_info_simple *simple;
+
+ simple = (struct evspy_info_simple *)spy;
+ ret = simple->func();
+ } else {
+ ret = spy->func(NULL, ev);
+ }
/*
* TODO: Handle various return codes to
@@ -159,20 +168,6 @@ void event_show_spy_list(void)
}
}
-#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)
-int event_manual_reloc(void)
-{
- struct evspy_info *spy, *end;
-
- spy = ll_entry_start(struct evspy_info, evspy_info);
- end = ll_entry_end(struct evspy_info, evspy_info);
- for (; spy < end; spy++)
- MANUAL_RELOC(spy->func);
-
- return 0;
-}
-#endif
-
#if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
static void spy_free(struct event_spy *spy)
{