diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2018-04-16 10:13:22 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-05-07 11:45:15 -0400 |
commit | 1a047c23f9e5e7f498cc3ca759725ae7b6c6a6b9 (patch) | |
tree | 724a4227f6b9be80c08f8e1315c4f3da697f5496 /arch/arm/include/asm/psci.h | |
parent | 890e79f2b1c26c5ba1a86d179706348aec7feef7 (diff) |
arm: psci: save context id for cpu_on PSCI command
Save and use the 3rd parameter of PSCI CPU_ON request: context_id.
The context_id parameter is only meaningful to the caller.
U-Boot PSCI preserves a copy of the value passed in this parameter.
Following wakeup from a powerdown state, U-BOOT PSCI places
this value in R0 when it first enters the OS.
NB: this context id is not (yet?) used by Linux but it is mandatory
to be PSCI compliant.
update armv7 psci functions:
- psci_save_target_pc(): keep for backward compatibility with
current platform (only save PC and force context id to 0)
=> should be removed when all platform migrate to the new API
- psci_save(): new API to use by ARMv7 platform with PSCI,
save pc (= entry_point_address) and context_id
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/include/asm/psci.h')
-rw-r--r-- | arch/arm/include/asm/psci.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h index ac8b00d6fc1..b41524106b5 100644 --- a/arch/arm/include/asm/psci.h +++ b/arch/arm/include/asm/psci.h @@ -93,9 +93,11 @@ #ifndef __ASSEMBLY__ #include <asm/types.h> -/* These 2 helper functions assume cpu < CONFIG_ARMV7_PSCI_NR_CPUS */ +/* These 4 helper functions assume cpu < CONFIG_ARMV7_PSCI_NR_CPUS */ u32 psci_get_target_pc(int cpu); +u32 psci_get_context_id(int cpu); void psci_save_target_pc(int cpu, u32 pc); +void psci_save(int cpu, u32 pc, u32 context_id); void psci_cpu_entry(void); u32 psci_get_cpu_id(void); |