aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Clément Tosi <ptosi@google.com>2022-03-15 14:46:08 +0000
committerPierre-Clément Tosi <ptosi@google.com>2022-03-30 14:42:18 +0000
commit497fc93947fb6a65539e2f576d0f3234515383ef (patch)
tree5dab034f829b50a90d017a21371d0e69ba65e79c
parentfdc89c79761de7af3309e5453b5ea6fbcf8d3513 (diff)
downloadu-boot-497fc93947fb6a65539e2f576d0f3234515383ef.tar.gz
firmware: psci: Add DM_FLAG_PRE_RELOC
The PSCI framework provides an API for rebooting the system and, when available, is very likely to be the preferred (if not only) way of doing so. In particular, it allows the PSCI driver to implement a sysreset that U-Boot code can use during panic(). With the current DM configuration, even if the 'psci' device tree node is available from boot, its driver will only be instantiated after relocation (during DM setup), resulting in calls to panic() before that point being unable to rely on the sysreset PSCI provides. Make the PSCI driver be probed in initf_dm() i.e. before relocation and after only the strict minimum setup code has run in U-Boot so that code that follows (until relocation and post-relocation before DM setup) can properly reboot during panic(), instead of reverting to hang() when no sysreset device seems to be available. Bug: 222444309 Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> Change-Id: I69cfcd107688687e5646dec215bcf77922a485ec
-rw-r--r--drivers/firmware/psci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 94862fa194..5a6c209d55 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -255,4 +255,5 @@ U_BOOT_DRIVER(psci) = {
.id = UCLASS_FIRMWARE,
.of_match = psci_of_match,
.bind = psci_bind,
+ .flags = DM_FLAG_PRE_RELOC,
};