summaryrefslogtreecommitdiff
path: root/lib/initcall.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-07-04 09:25:51 -0600
committerTom Rini <trini@konsulko.com>2024-07-04 09:25:51 -0600
commite24053d8fb42c909b470e33f19ac71fd718133ce (patch)
treeb69fd2a2ee983403d9ea52b928632dbac3eaff03 /lib/initcall.c
parent0f073e022ddc5070e5df1d053e4bdc1874fbcc0f (diff)
parent4a8a54c3f4202482ec4f24a117afc38cf2c0c051 (diff)
Merge patch series "testb: Various tweaks and fixes for Labgrid"
Simon Glass <sjg@chromium.org> says: This series includes a number of mostly unrelated changes which are in service of running U-Boot on a lab using Labgrid.
Diffstat (limited to 'lib/initcall.c')
-rw-r--r--lib/initcall.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/initcall.c b/lib/initcall.c
index c8e2b0f6a38..2686b9aed5c 100644
--- a/lib/initcall.c
+++ b/lib/initcall.c
@@ -49,13 +49,14 @@ static int initcall_is_event(init_fnc_t func)
*/
int initcall_run_list(const init_fnc_t init_sequence[])
{
- ulong reloc_ofs = calc_reloc_ofs();
+ ulong reloc_ofs;
const init_fnc_t *ptr;
enum event_t type;
init_fnc_t func;
int ret = 0;
for (ptr = init_sequence; func = *ptr, func; ptr++) {
+ reloc_ofs = calc_reloc_ofs();
type = initcall_is_event(func);
if (type) {
@@ -84,7 +85,8 @@ int initcall_run_list(const init_fnc_t init_sequence[])
sprintf(buf, "event %d/%s", type,
event_type_name(type));
} else {
- sprintf(buf, "call %p", func);
+ sprintf(buf, "call %p",
+ (char *)func - reloc_ofs);
}
printf("initcall failed at %s (err=%dE)\n", buf, ret);