diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 3 | ||||
-rw-r--r-- | common/event.c | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c index 22b5deaa8c2..4e3cf1f4ecc 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -612,6 +612,9 @@ static init_fnc_t init_sequence_r[] = { */ #endif initr_reloc_global_data, +#if CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT) + event_manual_reloc, +#endif #if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) initr_unlock_ram_in_cache, #endif diff --git a/common/event.c b/common/event.c index 063647447d5..af1ed4121d8 100644 --- a/common/event.c +++ b/common/event.c @@ -17,6 +17,7 @@ #include <malloc.h> #include <asm/global_data.h> #include <linux/list.h> +#include <relocate.h> DECLARE_GLOBAL_DATA_PTR; @@ -148,6 +149,20 @@ void event_show_spy_list(void) } } +#if CONFIG_IS_ENABLED(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) { |