aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalman Nabi <salman.nabi@arm.com>2024-02-19 14:51:12 +0000
committerSalman Nabi <salman.nabi@arm.com>2024-05-08 15:50:58 +0200
commitd3c643c2dceb811cafe494084bd323d4fd522187 (patch)
treeb003d600a287c241418d655e168e8d9301723a89
parent46163ddddbdaffe5ce73b821e497563084ab7bfe (diff)
downloadarm-trusted-firmware-d3c643c2dceb811cafe494084bd323d4fd522187.tar.gz
refactor(imx): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are no lingering chars in the FIFO when we move to the runtime console. TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME) and console_flush() calls and make them the last calls in bl31_main() (before BL31 exits). Until then they are being left as the last calls in bl31_plat_runtime_setup() for testing before refactoring. This patch affects the Freescale/NXP SoCs imx93, imx8qm and imx8qx. Change-Id: Iece74579e1d15eeeb8279db0c53d74bce45545bd Signed-off-by: Salman Nabi <salman.nabi@arm.com>
-rw-r--r--plat/imx/imx8qm/imx8qm_bl31_setup.c5
-rw-r--r--plat/imx/imx8qx/imx8qx_bl31_setup.c5
-rw-r--r--plat/imx/imx93/imx93_bl31_setup.c1
3 files changed, 7 insertions, 4 deletions
diff --git a/plat/imx/imx8qm/imx8qm_bl31_setup.c b/plat/imx/imx8qm/imx8qm_bl31_setup.c
index bd7896a99..c58b73c77 100644
--- a/plat/imx/imx8qm/imx8qm_bl31_setup.c
+++ b/plat/imx/imx8qm/imx8qm_bl31_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2024, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -411,5 +411,6 @@ unsigned int plat_get_syscnt_freq2(void)
void bl31_plat_runtime_setup(void)
{
- return;
+ console_flush();
+ console_switch_state(CONSOLE_FLAG_RUNTIME);
}
diff --git a/plat/imx/imx8qx/imx8qx_bl31_setup.c b/plat/imx/imx8qx/imx8qx_bl31_setup.c
index 13e80fb37..48ad6c19e 100644
--- a/plat/imx/imx8qx/imx8qx_bl31_setup.c
+++ b/plat/imx/imx8qx/imx8qx_bl31_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2024, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -389,5 +389,6 @@ unsigned int plat_get_syscnt_freq2(void)
void bl31_plat_runtime_setup(void)
{
- return;
+ console_flush();
+ console_switch_state(CONSOLE_FLAG_RUNTIME);
}
diff --git a/plat/imx/imx93/imx93_bl31_setup.c b/plat/imx/imx93/imx93_bl31_setup.c
index 8458f6c13..808114f7a 100644
--- a/plat/imx/imx93/imx93_bl31_setup.c
+++ b/plat/imx/imx93/imx93_bl31_setup.c
@@ -138,6 +138,7 @@ void bl31_platform_setup(void)
void bl31_plat_runtime_setup(void)
{
+ console_flush();
console_switch_state(CONSOLE_FLAG_RUNTIME);
}