From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 4/4] ARM: psci: keep older PSCI versions in compatible fixup
Date: Tue, 1 Nov 2022 07:26:42 +0100 [thread overview]
Message-ID: <20221101062642.3207113-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221101062642.3207113-1-a.fatoum@pengutronix.de>
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@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
prev parent reply other threads:[~2022-11-01 6:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 6:26 [PATCH master 0/4] ARM: psci: client: unbreak hypervisor boot Ahmad Fatoum
2022-11-01 6:26 ` [PATCH master 1/4] ARM: psci: of: fixup only version if node already exists Ahmad Fatoum
2022-11-01 6:26 ` [PATCH master 2/4] ARM: psci: client: match most specific compatible first Ahmad Fatoum
2022-11-01 6:26 ` [PATCH master 3/4] ARM: psci: client: always register OF fixup Ahmad Fatoum
2022-11-01 6:26 ` Ahmad Fatoum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221101062642.3207113-5-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox