initcall: Support manual relocation

Move the manual-relocation code to the initcall file. Make sure to avoid
manually relocating event types. Only true function pointers should be
relocated.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-08-31 13:16:54 -04:00
committed by Tom Rini
parent c9eff0a6b6
commit dd802467f4
3 changed files with 19 additions and 4 deletions
+10
View File
@@ -97,3 +97,13 @@ int initcall_run_list(const init_fnc_t init_sequence[])
return 0;
}
void initcall_manual_reloc(init_fnc_t init_sequence[])
{
init_fnc_t *ptr;
for (ptr = init_sequence; *ptr; ptr++) {
if (!initcall_is_event(*ptr))
MANUAL_RELOC(*ptr);
}
}