diff options
author | Olivier Deprez <olivier.deprez@arm.com> | 2019-10-28 09:15:52 +0000 |
---|---|---|
committer | Max Shvetsov <maksims.svecovs@arm.com> | 2020-08-20 18:06:06 +0100 |
commit | a334c4e6915d111ba48da60f898d4922c01a16b3 (patch) | |
tree | bd319da7f0b461a9265ba0a193e37518d5bfa4e1 /services | |
parent | b058f20a7e587e4362413cf8e4544dcc0bcaab96 (diff) | |
download | trusted-firmware-a-a334c4e6915d111ba48da60f898d4922c01a16b3.tar.gz |
SPMD: register the SPD PM hooks
Change-Id: If88d64c0e3d60accd2638a55f9f3299ec700a8c8
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Diffstat (limited to 'services')
-rw-r--r-- | services/std_svc/spmd/spmd.mk | 1 | ||||
-rw-r--r-- | services/std_svc/spmd/spmd_main.c | 3 | ||||
-rw-r--r-- | services/std_svc/spmd/spmd_private.h | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/services/std_svc/spmd/spmd.mk b/services/std_svc/spmd/spmd.mk index 38d43f167d..73f7c85ddb 100644 --- a/services/std_svc/spmd/spmd.mk +++ b/services/std_svc/spmd/spmd.mk @@ -10,6 +10,7 @@ endif SPMD_SOURCES += $(addprefix services/std_svc/spmd/, \ ${ARCH}/spmd_helpers.S \ + spmd_pm.c \ spmd_main.c) # Let the top-level Makefile know that we intend to include a BL32 image diff --git a/services/std_svc/spmd/spmd_main.c b/services/std_svc/spmd/spmd_main.c index 02b73c649e..93a0203c5e 100644 --- a/services/std_svc/spmd/spmd_main.c +++ b/services/std_svc/spmd/spmd_main.c @@ -266,6 +266,9 @@ static int spmd_spmc_init(void *pm_addr) INFO("SPM Core setup done.\n"); + /* Register power management hooks with PSCI */ + psci_register_spd_pm_hook(&spmd_pm); + /* Register init function for deferred init. */ bl31_register_bl32_init(&spmd_init); diff --git a/services/std_svc/spmd/spmd_private.h b/services/std_svc/spmd/spmd_private.h index 6e08c180f4..e13a5f021c 100644 --- a/services/std_svc/spmd/spmd_private.h +++ b/services/std_svc/spmd/spmd_private.h @@ -30,8 +30,10 @@ #define SPMD_C_RT_CTX_ENTRIES (SPMD_C_RT_CTX_SIZE >> DWORD_SHIFT) #ifndef __ASSEMBLER__ -#include <services/ffa_svc.h> #include <stdint.h> +#include <lib/psci/psci_lib.h> +#include <plat/common/platform.h> +#include <services/ffa_svc.h> typedef enum spmc_state { SPMC_STATE_RESET = 0, @@ -67,6 +69,9 @@ __dead2 void spmd_spm_core_sync_exit(uint64_t rc); uint64_t spmd_spm_core_enter(uint64_t *c_rt_ctx); void __dead2 spmd_spm_core_exit(uint64_t c_rt_ctx, uint64_t ret); +/* SPMD SPD power management handlers */ +extern const spd_pm_ops_t spmd_pm; + /* SPMC entry point information helper */ entry_point_info_t *spmd_spmc_ep_info_get(void); |