aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.h
diff options
context:
space:
mode:
authorOvidiu Panait <ovpanait@gmail.com>2022-05-15 21:40:29 +0300
committerTom Rini <trini@konsulko.com>2022-06-06 18:01:20 -0400
commitcebc8161708e357758c407eaa79a8cd66ee68fde (patch)
treed48954c6b4b3c371a700114b17bba8d1978dddd5 /include/event.h
parent12c90955a7e82687acaed3cb53d096bc669e82ca (diff)
downloadu-boot-cebc8161708e357758c407eaa79a8cd66ee68fde.tar.gz
event: fix static events for CONFIG_NEEDS_MANUAL_RELOC
Static events do not currently work post-relocation for boards that enable CONFIG_NEEDS_MANUAL_RELOC. Relocate event handler pointers for all event spies to fix this. Tested on Microblaze. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Diffstat (limited to 'include/event.h')
-rw-r--r--include/event.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/event.h b/include/event.h
index 7765f072503..c00c4fb68dc 100644
--- a/include/event.h
+++ b/include/event.h
@@ -145,6 +145,16 @@ int event_register(const char *id, enum event_t type, event_handler_t func,
void event_show_spy_list(void);
/**
+ * event_manual_reloc() - Relocate event handler pointers
+ *
+ * Relocate event handler pointers for all static event spies. It is called
+ * during the generic board init sequence, after relocation.
+ *
+ * Return: 0 if OK
+ */
+int event_manual_reloc(void);
+
+/**
* event_notify() - notify spies about an event
*
* It is possible to pass in union event_data here but that may not be