summaryrefslogtreecommitdiff
path: root/plat/arm/common/arm_pm.c
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2015-10-30 16:57:32 +0000
committerdanh-arm <dan.handley@arm.com>2015-10-30 16:57:32 +0000
commitf4c012537d02be82b550b0d977a9b28b72c2637c (patch)
treecfbaabb67ef5c1197db4d167163bc5d6b14791f4 /plat/arm/common/arm_pm.c
parentc909c636c3ffe13360a342e3d69f2f5cb6bdae9c (diff)
parent6971c6274432f74c73ca952617e38d191c94794d (diff)
Merge pull request #418 from soby-mathew/sm/sys_suspend
Support SYSTEM SUSPEND on Juno
Diffstat (limited to 'plat/arm/common/arm_pm.c')
-rw-r--r--plat/arm/common/arm_pm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/plat/arm/common/arm_pm.c b/plat/arm/common/arm_pm.c
index 2497588f..d13d2683 100644
--- a/plat/arm/common/arm_pm.c
+++ b/plat/arm/common/arm_pm.c
@@ -30,7 +30,9 @@
#include <arch_helpers.h>
#include <arm_def.h>
+#include <arm_gic.h>
#include <assert.h>
+#include <console.h>
#include <errno.h>
#include <plat_arm.h>
#include <platform_def.h>
@@ -148,6 +150,26 @@ int arm_validate_ns_entrypoint(uintptr_t entrypoint)
return PSCI_E_INVALID_ADDRESS;
}
+/******************************************************************************
+ * Helper function to resume the platform from system suspend. Reinitialize
+ * the system components which are not in the Always ON power domain.
+ * TODO: Unify the platform setup when waking up from cold boot and system
+ * resume in arm_bl31_platform_setup().
+ *****************************************************************************/
+void arm_system_pwr_domain_resume(void)
+{
+ console_init(PLAT_ARM_BOOT_UART_BASE, PLAT_ARM_BOOT_UART_CLK_IN_HZ,
+ ARM_CONSOLE_BAUDRATE);
+
+ /* Assert system power domain is available on the platform */
+ assert(PLAT_MAX_PWR_LVL >= ARM_PWR_LVL2);
+
+ arm_gic_setup();
+ plat_arm_security_setup();
+
+ arm_configure_sys_timer();
+}
+
/*******************************************************************************
* Private function to program the mailbox for a cpu before it is released
* from reset. This function assumes that the Trusted mail box base is within