Flush the UART before entering suspend mode
Change-Id: I75fa2b864d9229950e53f5b8a46e8e6078d4780d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
diff --git a/lib/power_management/suspend/tftf_suspend.c b/lib/power_management/suspend/tftf_suspend.c
index 75c2ade..d6c989a 100644
--- a/lib/power_management/suspend/tftf_suspend.c
+++ b/lib/power_management/suspend/tftf_suspend.c
@@ -6,6 +6,7 @@
#include <arch_helpers.h>
#include <arm_gic.h>
+#include <console.h>
#include <debug.h>
#include <platform.h>
#include <power_management.h>
@@ -51,6 +52,9 @@
*/
flush_dcache_range((u_register_t)ctx, sizeof(*ctx));
+ /* Make sure any outstanding message is printed. */
+ console_flush();
+
if (info->psci_api == SMC_PSCI_CPU_SUSPEND)
rc = tftf_smc(&cpu_suspend_args);
else