All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] armv8: fsl-layerscape: Allow use of PSCI handlers for ls1088a
@ 2019-10-18  3:27 Mathew McBride
  2019-10-18  3:27 ` [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A Mathew McBride
  2019-10-18  3:27 ` [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used Mathew McBride
  0 siblings, 2 replies; 8+ messages in thread
From: Mathew McBride @ 2019-10-18  3:27 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
  2019-10-18  3:27 [U-Boot] [PATCH 0/2] armv8: fsl-layerscape: Allow use of PSCI handlers for ls1088a Mathew McBride
@ 2019-10-18  3:27 ` Mathew McBride
  2019-10-18  7:24   ` Priyanka Jain
  2019-11-11  8:53   ` Priyanka Jain
  2019-10-18  3:27 ` [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used Mathew McBride
  1 sibling, 2 replies; 8+ messages in thread
From: Mathew McBride @ 2019-10-18  3:27 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used
  2019-10-18  3:27 [U-Boot] [PATCH 0/2] armv8: fsl-layerscape: Allow use of PSCI handlers for ls1088a Mathew McBride
  2019-10-18  3:27 ` [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A Mathew McBride
@ 2019-10-18  3:27 ` Mathew McBride
  2019-11-11  8:54   ` Priyanka Jain
  1 sibling, 1 reply; 8+ messages in thread
From: Mathew McBride @ 2019-10-18  3:27 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
  2019-10-18  3:27 ` [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A Mathew McBride
@ 2019-10-18  7:24   ` Priyanka Jain
  2019-10-18 20:45     ` Mathew McBride
  2019-11-11  8:53   ` Priyanka Jain
  1 sibling, 1 reply; 8+ messages in thread
From: Priyanka Jain @ 2019-10-18  7:24 UTC (permalink / raw)
  To: u-boot



>-----Original Message-----
>From: Mathew McBride <matt@traverse.com.au>
>Sent: Friday, October 18, 2019 8:58 AM
>To: u-boot at 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
  2019-10-18  7:24   ` Priyanka Jain
@ 2019-10-18 20:45     ` Mathew McBride
  2019-10-21  5:50       ` Priyanka Jain
  0 siblings, 1 reply; 8+ messages in thread
From: Mathew McBride @ 2019-10-18 20:45 UTC (permalink / raw)
  To: u-boot

Hell Priyanka,


>-----Original Message-----
>From: Mathew McBride <matt@traverse.com.au>
>Sent: Friday, October 18, 2019 8:58 AM
>To: u-boot at 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
  2019-10-18 20:45     ` Mathew McBride
@ 2019-10-21  5:50       ` Priyanka Jain
  0 siblings, 0 replies; 8+ messages in thread
From: Priyanka Jain @ 2019-10-21  5:50 UTC (permalink / raw)
  To: u-boot



>-----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 at 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 at 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 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A
  2019-10-18  3:27 ` [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A Mathew McBride
  2019-10-18  7:24   ` Priyanka Jain
@ 2019-11-11  8:53   ` Priyanka Jain
  1 sibling, 0 replies; 8+ messages in thread
From: Priyanka Jain @ 2019-11-11  8:53 UTC (permalink / raw)
  To: u-boot



>-----Original Message-----
>From: Mathew McBride <matt@traverse.com.au>
>Sent: Friday, October 18, 2019 8:58 AM
>To: u-boot at 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used
  2019-10-18  3:27 ` [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used Mathew McBride
@ 2019-11-11  8:54   ` Priyanka Jain
  0 siblings, 0 replies; 8+ messages in thread
From: Priyanka Jain @ 2019-11-11  8:54 UTC (permalink / raw)
  To: u-boot



>-----Original Message-----
>From: Mathew McBride <matt@traverse.com.au>
>Sent: Friday, October 18, 2019 8:58 AM
>To: u-boot at 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-11  8:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18  3:27 [U-Boot] [PATCH 0/2] armv8: fsl-layerscape: Allow use of PSCI handlers for ls1088a Mathew McBride
2019-10-18  3:27 ` [U-Boot] [PATCH 1/2] armv8: dts: ls1088a: add PSCI binding for LS1088A Mathew McBride
2019-10-18  7:24   ` Priyanka Jain
2019-10-18 20:45     ` Mathew McBride
2019-10-21  5:50       ` Priyanka Jain
2019-11-11  8:53   ` Priyanka Jain
2019-10-18  3:27 ` [U-Boot] [PATCH 2/2] armv8: fsl-layerscape: do not use layerscape EFI reset if PSCI used Mathew McBride
2019-11-11  8:54   ` Priyanka Jain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.