[U-Boot,v2,2/3] arm: psci: add a weak function psci_arch_cpu_entry

Message ID 1523866404-10884-2-git-send-email-patrick.delaunay@st.com
State New
Delegated to: Tom Rini
Headers show
  • [U-Boot,v2,1/3] arm: psci: save context id for cpu_on PSCI command
Related show

Commit Message

Patrick DELAUNAY April 16, 2018, 8:13 a.m.
The added function psci_arch_cpu_entry() is called
during psci_cpu_entry() and can be used by arch to handle
PSCI state transition from ON_PENDING to ON.

The default weak function is empty: not behavior change.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Changes in v2: None

 arch/arm/cpu/armv7/psci.S | 7 +++++++
 1 file changed, 7 insertions(+)


diff --git a/arch/arm/cpu/armv7/psci.S b/arch/arm/cpu/armv7/psci.S
index 35fd955..08b5088 100644
--- a/arch/arm/cpu/armv7/psci.S
+++ b/arch/arm/cpu/armv7/psci.S
@@ -321,11 +321,18 @@  ENTRY(psci_arch_init)
 .weak psci_arch_init
+	mov	pc, lr
+.weak psci_arch_cpu_entry
 	bl	psci_enable_smp
 	bl	_nonsec_init
+	bl	psci_arch_cpu_entry
 	bl	psci_get_cpu_id			@ CPU ID => r0
 	mov	r2, r0				@ CPU ID => r2
 	bl	psci_get_context_id		@ context id => r0