summaryrefslogtreecommitdiff
path: root/plat/arm
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2019-09-26 16:07:53 +0100
committerUsama Arif <usama.arif@arm.com>2019-10-03 10:09:04 +0100
commit59ffec157ca8d675165f122c901c1ff198a810bc (patch)
tree7b98f70c616bab85b3698ebd3f1b8bb4587a83cf /plat/arm
parentace23683beb81354d6edbc61c087ab8c384d0631 (diff)
a5ds: Add handler for when user tries to switch off secondary cores
a5ds only has always-on power domain and there is no power control present. However, without the pwr_domain_off handler, the kernel panics when the user will try to switch off secondary cores. The a5ds_pwr_domain_off handler will prevent kernel from crashing, i.e. the kernel will attempt but fail to shut down the secondary CPUs if the user tries to switch them offline. Change-Id: I3c2239a1b6f035113ddbdda063c8495000cbe30c Signed-off-by: Usama Arif <usama.arif@arm.com>
Diffstat (limited to 'plat/arm')
-rw-r--r--plat/arm/board/a5ds/a5ds_pm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/plat/arm/board/a5ds/a5ds_pm.c b/plat/arm/board/a5ds/a5ds_pm.c
index 98de77d1..cc734b00 100644
--- a/plat/arm/board/a5ds/a5ds_pm.c
+++ b/plat/arm/board/a5ds/a5ds_pm.c
@@ -3,6 +3,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
#include <lib/psci/psci.h>
#include <plat/arm/common/plat_arm.h>
@@ -40,6 +41,18 @@ void a5ds_pwr_domain_on_finish(const psci_power_state_t *target_state)
}
/*******************************************************************************
+ * Platform handler called when a power domain is about to be turned off. The
+ * target_state encodes the power state that each level should transition to.
+ * a5ds only has always-on power domain and there is no power control present.
+ ******************************************************************************/
+void a5ds_pwr_domain_off(const psci_power_state_t *target_state)
+{
+ ERROR("CPU_OFF not supported on this platform\n");
+ assert(false);
+ panic();
+}
+
+/*******************************************************************************
* Export the platform handlers via a5ds_psci_pm_ops. The ARM Standard
* platform layer will take care of registering the handlers with PSCI.
******************************************************************************/
@@ -47,7 +60,8 @@ plat_psci_ops_t a5ds_psci_pm_ops = {
/* dummy struct */
.validate_ns_entrypoint = NULL,
.pwr_domain_on = a5ds_pwr_domain_on,
- .pwr_domain_on_finish = a5ds_pwr_domain_on_finish
+ .pwr_domain_on_finish = a5ds_pwr_domain_on_finish,
+ .pwr_domain_off = a5ds_pwr_domain_off
};
int __init plat_setup_psci_ops(uintptr_t sec_entrypoint,