#include <malloc.h>
#include <asm/global_data.h>
#include <linux/list.h>
+#include <relocate.h>
DECLARE_GLOBAL_DATA_PTR;
/* init hooks */
"misc_init_f",
+
+ /* fdt hooks */
+ "ft_fixup",
+
+ /* main loop events */
+ "main_loop",
};
_Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size");
ret = notify_static(&event);
if (ret)
- return log_msg_ret("dyn", ret);
+ return log_msg_ret("sta", ret);
if (CONFIG_IS_ENABLED(EVENT_DYNAMIC)) {
ret = notify_dynamic(&event);
}
}
+#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)
{
struct event_state *state = gd_event_state();
struct event_spy *spy;
- if (!CONFIG_IS_ENABLED(EVENT_DYNAMIC))
- return -ENOSYS;
spy = malloc(sizeof(*spy));
if (!spy)
return log_msg_ret("alloc", -ENOMEM);