[PATCH master 4/4] ARM: psci: keep older PSCI versions in compatible fixup
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Oct 31 23:26:42 PDT 2022
The psci device tree binding mandates keeping older ARM PSCI compatibles
as less-specific compatible entries. Have the barebox fixup comply
with this.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/arm/cpu/psci-of.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/arch/arm/cpu/psci-of.c b/arch/arm/cpu/psci-of.c
index e08a04b36d05..0d25e8b2fdb2 100644
--- a/arch/arm/cpu/psci-of.c
+++ b/arch/arm/cpu/psci-of.c
@@ -10,18 +10,16 @@
static int of_psci_version_fixup(struct device_node *psci,
unsigned long psci_version)
{
- const char *compat;
-
- if (psci_version >= ARM_PSCI_VER_1_0) {
- compat = "arm,psci-1.0";
- } else if (psci_version >= ARM_PSCI_VER_0_2) {
- compat = "arm,psci-0.2";
- } else {
- pr_err("Unsupported PSCI version %ld\n", psci_version);
- return -EINVAL;
- }
+ if (psci_version >= ARM_PSCI_VER_1_0)
+ return of_property_write_strings(psci, "compatible",
+ "arm,psci-1.0", "arm,psci-0.2", "arm,psci", NULL);
+
+ if (psci_version >= ARM_PSCI_VER_0_2)
+ return of_property_write_strings(psci, "compatible",
+ "arm,psci-0.2", "arm,psci", NULL);
- return of_property_write_string(psci, "compatible", compat);
+ pr_err("Unsupported PSCI version %ld\n", psci_version);
+ return -EINVAL;
}
int of_psci_fixup(struct device_node *root, unsigned long psci_version)
--
2.30.2
More information about the barebox
mailing list