diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2022-11-05 13:11:54 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-11-07 08:48:13 +0100 |
commit | fdcfd76ee4fec9d348f29320ad413099b5fe1b6d (patch) | |
tree | 082bf59617b2ce001eedc3f1c983a6e2f07b8aae | |
parent | 9b38ebb7589ec631a4e36e1d312cc314f3960316 (diff) | |
download | barebox-fdcfd76ee4fec9d348f29320ad413099b5fe1b6d.tar.gz barebox-fdcfd76ee4fec9d348f29320ad413099b5fe1b6d.tar.xz |
ARM: psci: client: don't hardcode method smc in fixup
When barebox is booted as QEMU -kernel, PSCI will have method = "hvc",
because QEMU will act as Hypervisor. barebox handles this correctly and
will use hvc instead of smc, but of_psci_fixup() always fixes up
method = "smc" thereby breaking kernel boot.
Fix this by forwarding the method read from barebox DT into the kernel
DT.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20221105121154.3716964-2-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/cpu/psci-client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/cpu/psci-client.c b/arch/arm/cpu/psci-client.c index 613280ad3f..f9b1c684bf 100644 --- a/arch/arm/cpu/psci-client.c +++ b/arch/arm/cpu/psci-client.c @@ -108,9 +108,9 @@ static u32 invoke_psci_fn_smc(ulong function, ulong arg0, ulong arg1, ulong arg2 return res.a0; } -static int of_psci_do_fixup(struct device_node *root, void *context) +static int of_psci_do_fixup(struct device_node *root, void *method) { - return of_psci_fixup(root, *(u32 *)context, "smc"); + return of_psci_fixup(root, version, (const void *)method); } static int __init psci_probe(struct device_d *dev) @@ -156,7 +156,7 @@ static int __init psci_probe(struct device_d *dev) version >> 16, version & 0xffff); if (actual_version != of_version) - of_register_fixup(of_psci_do_fixup, &version); + of_register_fixup(of_psci_do_fixup, (void *)method); ret = poweroff_handler_register_fn(psci_poweroff); if (ret) |