summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-05-04 16:50:45 -0600
committerBin Meng <[email protected]>2023-05-11 10:25:29 +0800
commit55171aedda88d12666e2a1bbc661dea1bec65337 (patch)
tree7907d04ffe5835764d28c410e9bff18cff34db63 /drivers
parent44dc33042f8465764bddeba4e4b362dd5372b74a (diff)
dm: Emit the arch_cpu_init_dm() even only before relocation
The original function was only called once, before relocation. The new one is called again after relocation. This was not the intent of the original call. Fix this by renaming and updating the calling logic. With this, chromebook_link64 makes it through SPL. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/root.c4
-rw-r--r--drivers/cpu/microblaze_cpu.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c
index c4fb48548bb..6775fb0b657 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -436,8 +436,8 @@ int dm_init_and_scan(bool pre_reloc_only)
return ret;
}
}
- if (CONFIG_IS_ENABLED(DM_EVENT)) {
- ret = event_notify_null(EVT_DM_POST_INIT);
+ if (CONFIG_IS_ENABLED(DM_EVENT) && !(gd->flags & GD_FLG_RELOC)) {
+ ret = event_notify_null(EVT_DM_POST_INIT_F);
if (ret)
return log_msg_ret("ev", ret);
}
diff --git a/drivers/cpu/microblaze_cpu.c b/drivers/cpu/microblaze_cpu.c
index b9d07928223..c97a89fbd5c 100644
--- a/drivers/cpu/microblaze_cpu.c
+++ b/drivers/cpu/microblaze_cpu.c
@@ -29,7 +29,7 @@ static int microblaze_cpu_probe_all(void *ctx, struct event *event)
return 0;
}
-EVENT_SPY(EVT_DM_POST_INIT, microblaze_cpu_probe_all);
+EVENT_SPY(EVT_DM_POST_INIT_F, microblaze_cpu_probe_all);
static void microblaze_set_cpuinfo_pvr(struct microblaze_cpuinfo *ci)
{