diff options
author | Simon Glass | 2023-08-21 21:16:55 -0600 |
---|---|---|
committer | Tom Rini | 2023-08-31 13:16:54 -0400 |
commit | dd802467f44b68d6ed9315ffe3002b17dc43b622 (patch) | |
tree | 4e44642f6b9e8a7113af38d59ecb8a40297cf361 /lib/initcall.c | |
parent | c9eff0a6b6ea2bcd54d30f8a02281681f3730223 (diff) |
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>
Diffstat (limited to 'lib/initcall.c')
-rw-r--r-- | lib/initcall.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/initcall.c b/lib/initcall.c index 33b7d761dc7..480490ea239 100644 --- a/lib/initcall.c +++ b/lib/initcall.c @@ -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); + } +} |