summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Madhu <pranav.madhu@arm.com>2022-07-22 23:11:16 +0530
committerPranav Madhu <pranav.madhu@arm.com>2022-09-15 18:09:56 +0530
commit65bbb9358b986b197a1e098a9ff11df949f9fb05 (patch)
tree7b7965ecd925cdd7541b6b3c86cb8660f7750cd1
parent158ed580bdf5736abfa9f16f61be1ca1609e0e41 (diff)
downloadarm-trusted-firmware-65bbb9358b986b197a1e098a9ff11df949f9fb05.tar.gz
refactor(psci): move psci_do_pwrdown_sequence() out of private header
Move the psci_do_pwrdown_sequence() function declaration from PSCI private header to common header. The psci_do_pwrdown_sequence is required to support warm reset, where each CPU need to execute the powerdown sequence. Change-Id: I298e7a120be814941fa91c0b001002a080e56263 Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
-rw-r--r--include/lib/psci/psci_lib.h1
-rw-r--r--lib/psci/psci_common.c2
-rw-r--r--lib/psci/psci_off.c2
-rw-r--r--lib/psci/psci_private.h1
-rw-r--r--lib/psci/psci_suspend.c2
5 files changed, 4 insertions, 4 deletions
diff --git a/include/lib/psci/psci_lib.h b/include/lib/psci/psci_lib.h
index 43e2f9638..3edc50b6c 100644
--- a/include/lib/psci/psci_lib.h
+++ b/include/lib/psci/psci_lib.h
@@ -92,6 +92,7 @@ void psci_prepare_next_non_secure_ctx(
int psci_stop_other_cores(unsigned int wait_ms,
void (*stop_func)(u_register_t mpidr));
bool psci_is_last_on_cpu_safe(void);
+void psci_pwrdown_cpu(unsigned int power_level);
#endif /* __ASSEMBLER__ */
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index b60ddbb83..efcfed86c 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -954,7 +954,7 @@ int psci_secondaries_brought_up(void)
* Initiate power down sequence, by calling power down operations registered for
* this CPU.
******************************************************************************/
-void psci_do_pwrdown_sequence(unsigned int power_level)
+void psci_pwrdown_cpu(unsigned int power_level)
{
#if HW_ASSISTED_COHERENCY
/*
diff --git a/lib/psci/psci_off.c b/lib/psci/psci_off.c
index 54470457a..637adb97e 100644
--- a/lib/psci/psci_off.c
+++ b/lib/psci/psci_off.c
@@ -109,7 +109,7 @@ int psci_do_cpu_off(unsigned int end_pwrlvl)
/*
* Arch. management. Initiate power down sequence.
*/
- psci_do_pwrdown_sequence(psci_find_max_off_lvl(&state_info));
+ psci_pwrdown_cpu(psci_find_max_off_lvl(&state_info));
#if ENABLE_RUNTIME_INSTRUMENTATION
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
diff --git a/lib/psci/psci_private.h b/lib/psci/psci_private.h
index 61bd9663c..caade9c59 100644
--- a/lib/psci/psci_private.h
+++ b/lib/psci/psci_private.h
@@ -296,7 +296,6 @@ void psci_set_pwr_domains_to_run(unsigned int end_pwrlvl);
void psci_print_power_domain_map(void);
unsigned int psci_is_last_on_cpu(void);
int psci_spd_migrate_info(u_register_t *mpidr);
-void psci_do_pwrdown_sequence(unsigned int power_level);
/*
* CPU power down is directly called only when HW_ASSISTED_COHERENCY is
diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c
index ffe3a911f..f71994d71 100644
--- a/lib/psci/psci_suspend.c
+++ b/lib/psci/psci_suspend.c
@@ -124,7 +124,7 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl,
* TODO : Introduce a mechanism to query the cache level to flush
* and the cpu-ops power down to perform from the platform.
*/
- psci_do_pwrdown_sequence(max_off_lvl);
+ psci_pwrdown_cpu(max_off_lvl);
#if ENABLE_RUNTIME_INSTRUMENTATION
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,