[U-Boot] [PATCH 0/2] armv8: fsl-layerscape: Allow use of PSCI handlers for ls1088a

This patch allows the use of PSCI for power operations - this is desirable if the target board has implemented it's own power operation handlers in Trusted Firmware/EL3.
Layerscape has it's own EFI service handlers for power operations - if PSCI is used the generic handlers will be used instead.
Note that all of the existing Layerscape boards in-tree are blacklisted from PSCI_RESET by default - to use this you must enable it for your board.
Mathew McBride (2): armv8: dts: ls1088a: add PSCI binding for LS1088A armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- arch/arm/dts/fsl-ls1088a.dtsi | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)

This allows the use of PSCI calls to trusted firmware to initiate reset and poweroff events with CONFIG_PSCI_RESET and CONFIG_ARM_PSCI_FW. This is desirable, for example, if the target board has implemented a custom reset or poweroff procedure in EL3.
Signed-off-by: Mathew McBride matt@traverse.com.au Cc: Priyanka Jain priyanka.jain@nxp.com --- arch/arm/dts/fsl-ls1088a.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 4be1ab87d2..abc8b21a11 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -192,4 +192,9 @@ status = "disabled"; };
+ psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + };

-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Friday, October 18, 2019 8:58 AM To: u-boot@lists.denx.de Cc: Priyanka Jain priyanka.jain@nxp.com; Mathew McBride matt@traverse.com.au Subject: [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
This allows the use of PSCI calls to trusted firmware to initiate reset and poweroff events with CONFIG_PSCI_RESET and CONFIG_ARM_PSCI_FW. This is desirable, for example, if the target board has implemented a custom reset or poweroff procedure in EL3.
Signed-off-by: Mathew McBride matt@traverse.com.au Cc: Priyanka Jain priyanka.jain@nxp.com
arch/arm/dts/fsl-ls1088a.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 4be1ab87d2..abc8b21a11 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -192,4 +192,9 @@ status = "disabled"; };
- psci {
compatible = "arm,psci-0.2";
method = "smc";
- };
};
2.19.1
Mathew, Have you tested this change on any standard NXP ls1088a board?
--priyankajain

Hell Priyanka,
-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Friday, October 18, 2019 8:58 AM To: u-boot@lists.denx.de Cc: Priyanka Jain priyanka.jain@nxp.com; Mathew McBride matt@traverse.com.au Subject: [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
2.19.1
[snip]
Mathew, Have you tested this change on any standard NXP ls1088a board?
--priyankajain
Not yet - I can test it on an LS1088ARDB if needed.
In theory, this should have no effect on the NXP reference boards as they are all blacklisted from CONFIG_PSCI_RESET in arch/arm/cpu/armv8/Kconfig.
Regards, Mathew

-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Saturday, October 19, 2019 2:16 AM To: Priyanka Jain priyanka.jain@nxp.com; u-boot@lists.denx.de; Pramod Kumar pramod.kumar_1@nxp.com Subject: RE: [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
Hell Priyanka,
-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Friday, October 18, 2019 8:58 AM To: u-boot@lists.denx.de Cc: Priyanka Jain priyanka.jain@nxp.com; Mathew McBride matt@traverse.com.au Subject: [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
2.19.1
[snip]
Mathew, Have you tested this change on any standard NXP ls1088a board?
--priyankajain
Not yet - I can test it on an LS1088ARDB if needed.
In theory, this should have no effect on the NXP reference boards as they are all blacklisted from CONFIG_PSCI_RESET in arch/arm/cpu/armv8/Kconfig.
Regards, Mathew
Thanks for confirming.
--priyankajain

-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Friday, October 18, 2019 8:58 AM To: u-boot@lists.denx.de Cc: Priyanka Jain priyanka.jain@nxp.com; Mathew McBride matt@traverse.com.au Subject: [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
This allows the use of PSCI calls to trusted firmware to initiate reset and poweroff events with CONFIG_PSCI_RESET and CONFIG_ARM_PSCI_FW. This is desirable, for example, if the target board has implemented a custom reset or poweroff procedure in EL3.
Signed-off-by: Mathew McBride matt@traverse.com.au Cc: Priyanka Jain priyanka.jain@nxp.com
arch/arm/dts/fsl-ls1088a.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 4be1ab87d2..abc8b21a11 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -192,4 +192,9 @@ status = "disabled"; };
- psci {
compatible = "arm,psci-0.2";
method = "smc";
- };
};
2.19.1
Applied to fsl-qoriq master, awaiting upstream.
Thanks priyankajain

If the secure world reset handlers are used (via CONFIG_PSCI_RESET), then do not use the layerscape-specific implementation.
Signed-off-by: Mathew McBride matt@traverse.com.au Cc: Priyanka Jain priyanka.jain@nxp.com --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index a5d0b5370f..b4012793fd 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -1218,7 +1218,7 @@ void __efi_runtime reset_cpu(ulong addr) #endif }
-#ifdef CONFIG_EFI_LOADER +#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_PSCI_RESET)
void __efi_runtime EFIAPI efi_reset_system( enum efi_reset_type reset_type,

-----Original Message----- From: Mathew McBride matt@traverse.com.au Sent: Friday, October 18, 2019 8:58 AM To: u-boot@lists.denx.de Cc: Priyanka Jain priyanka.jain@nxp.com; Mathew McBride matt@traverse.com.au Subject: [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used
If the secure world reset handlers are used (via CONFIG_PSCI_RESET), then do not use the layerscape-specific implementation.
Signed-off-by: Mathew McBride matt@traverse.com.au Cc: Priyanka Jain priyanka.jain@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index a5d0b5370f..b4012793fd 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -1218,7 +1218,7 @@ void __efi_runtime reset_cpu(ulong addr) #endif }
-#ifdef CONFIG_EFI_LOADER +#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_PSCI_RESET)
void __efi_runtime EFIAPI efi_reset_system( enum efi_reset_type reset_type, -- 2.19.1
Trimmed subject .Applied to fsl-qoriq master, awaiting upstream.
Thanks priyankajain
participants (2)
-
Mathew McBride
-
Priyanka Jain