From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marex@denx.de>,
"Ariel D'Alessandro" <ariel.dalessandro@collabora.com>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
"Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>,
Adam Ford <aford173@gmail.com>,
Andrejs Cainikovs <andrejs.cainikovs@toradex.com>,
Fabio Estevam <festevam@gmail.com>,
Manoj Sai <abbaraju.manojsai@amarulasolutions.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
Peng Fan <peng.fan@nxp.com>,
Ricardo Salveti <ricardo@foundries.io>,
Simon Glass <sjg@chromium.org>, Stefano Babic <sbabic@denx.de>,
Tim Harvey <tharvey@gateworks.com>, Ye Li <ye.li@nxp.com>
Subject: [PATCH 02/10] arm: psci: Fix RESET2 hook
Date: Thu, 22 Dec 2022 01:46:35 +0100 [thread overview]
Message-ID: <20221222004643.1013095-2-marex@denx.de> (raw)
In-Reply-To: <20221222004643.1013095-1-marex@denx.de>
The RESET2 hook is a PSCI v1.1 functionality, rename the macro accordinly.
Add missing handler for the RESET2 hook, so it can be implemented by U-Boot.
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: "Ariel D'Alessandro" <ariel.dalessandro@collabora.com>
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Cc: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
Cc: Adam Ford <aford173@gmail.com>
Cc: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Ricardo Salveti <ricardo@foundries.io>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Ye Li <ye.li@nxp.com>
---
arch/arm/cpu/armv8/fwcall.c | 2 +-
arch/arm/cpu/armv8/psci.S | 2 ++
arch/arm/include/asm/psci.h | 4 +++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index 16914dc1eed..87de09979b1 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -103,7 +103,7 @@ void __noreturn psci_system_reset2(u32 reset_level, u32 cookie)
{
struct pt_regs regs;
- regs.regs[0] = ARM_PSCI_0_2_FN64_SYSTEM_RESET2;
+ regs.regs[0] = ARM_PSCI_1_1_FN64_SYSTEM_RESET2;
regs.regs[1] = PSCI_RESET2_TYPE_VENDOR | reset_level;
regs.regs[2] = cookie;
if (use_smc_for_psci)
diff --git a/arch/arm/cpu/armv8/psci.S b/arch/arm/cpu/armv8/psci.S
index 7ffc8dbadbe..1133518f16e 100644
--- a/arch/arm/cpu/armv8/psci.S
+++ b/arch/arm/cpu/armv8/psci.S
@@ -82,6 +82,7 @@ PSCI_DEFAULT(psci_node_hw_state_64)
PSCI_DEFAULT(psci_system_suspend_64)
PSCI_DEFAULT(psci_stat_residency_64)
PSCI_DEFAULT(psci_stat_count_64)
+PSCI_DEFAULT(psci_system_reset2_64)
.align 3
_psci_64_table:
@@ -95,6 +96,7 @@ PSCI_TABLE(ARM_PSCI_1_0_FN64_NODE_HW_STATE, psci_node_hw_state_64)
PSCI_TABLE(ARM_PSCI_1_0_FN64_SYSTEM_SUSPEND, psci_system_suspend_64)
PSCI_TABLE(ARM_PSCI_1_0_FN64_STAT_RESIDENCY, psci_stat_residency_64)
PSCI_TABLE(ARM_PSCI_1_0_FN64_STAT_COUNT, psci_stat_count_64)
+PSCI_TABLE(ARM_PSCI_1_1_FN64_SYSTEM_RESET2, psci_system_reset2_64)
PSCI_TABLE(0, 0)
.macro psci_enter
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index 8b3fb872255..7343b941ef0 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -69,7 +69,6 @@
#define ARM_PSCI_0_2_FN64_AFFINITY_INFO ARM_PSCI_0_2_FN64(4)
#define ARM_PSCI_0_2_FN64_MIGRATE ARM_PSCI_0_2_FN64(5)
#define ARM_PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU ARM_PSCI_0_2_FN64(7)
-#define ARM_PSCI_0_2_FN64_SYSTEM_RESET2 ARM_PSCI_0_2_FN64(18)
/* PSCI 1.0 interface */
#define ARM_PSCI_1_0_FN_PSCI_FEATURES ARM_PSCI_0_2_FN(10)
@@ -87,6 +86,9 @@
#define ARM_PSCI_1_0_FN64_STAT_RESIDENCY ARM_PSCI_0_2_FN64(16)
#define ARM_PSCI_1_0_FN64_STAT_COUNT ARM_PSCI_0_2_FN64(17)
+/* PSCI 1.1 interface */
+#define ARM_PSCI_1_1_FN64_SYSTEM_RESET2 ARM_PSCI_0_2_FN64(18)
+
/* 1KB stack per core */
#define ARM_PSCI_STACK_SHIFT 10
#define ARM_PSCI_STACK_SIZE (1 << ARM_PSCI_STACK_SHIFT)
--
2.35.1
next prev parent reply other threads:[~2022-12-22 0:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 0:46 [PATCH 01/10] arm: psci: Add PSCI v1.1 macro Marek Vasut
2022-12-22 0:46 ` Marek Vasut [this message]
2023-01-31 16:52 ` [PATCH 02/10] arm: psci: Fix RESET2 hook sbabic
2022-12-22 0:46 ` [PATCH 03/10] arm: imx: Drop custom lowlevel_init Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 04/10] arm: dts: imx8m: Require ATF BL31 blob only if not PSCI provider Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 05/10] arm: imx: imx8m: Only use ROM pointers " Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 06/10] arm: imx: imx8m: Enable GICv3 support if " Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 07/10] arm: imx: imx8m: Map RAM as NS " Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 08/10] arm: imx: imx8m: Define trampoline location " Marek Vasut
2023-01-31 16:52 ` sbabic
2022-12-22 0:46 ` [PATCH 09/10] arm: imx: imx8m: Program CSU and TZASC " Marek Vasut
2023-01-31 16:53 ` sbabic
2022-12-22 0:46 ` [PATCH 10/10] arm: imx: imx8m: Add basic PSCI provider implementation Marek Vasut
2022-12-22 3:05 ` Adam Ford
2022-12-22 3:58 ` Marek Vasut
2023-01-02 16:44 ` Adam Ford
2023-01-02 23:41 ` Marek Vasut
2023-01-02 23:47 ` Adam Ford
2023-01-02 23:58 ` Marek Vasut
2023-01-03 1:05 ` Adam Ford
2023-01-03 9:38 ` Marek Vasut
2023-01-31 16:52 ` sbabic
2023-01-31 16:52 ` [PATCH 01/10] arm: psci: Add PSCI v1.1 macro sbabic
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=20221222004643.1013095-2-marex@denx.de \
--to=marex@denx.de \
--cc=abbaraju.manojsai@amarulasolutions.com \
--cc=aford173@gmail.com \
--cc=andrejs.cainikovs@toradex.com \
--cc=ariel.dalessandro@collabora.com \
--cc=festevam@gmail.com \
--cc=marcel.ziswiler@toradex.com \
--cc=michael@amarulasolutions.com \
--cc=paul.liu@linaro.org \
--cc=peng.fan@nxp.com \
--cc=ricardo@foundries.io \
--cc=sbabic@denx.de \
--cc=sjg@chromium.org \
--cc=tharvey@gateworks.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
/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