summaryrefslogtreecommitdiff
path: root/plat/st
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2019-09-04 11:55:10 +0200
committerYann Gautier <yann.gautier@st.com>2019-09-10 17:21:58 +0200
commitebf851ed34eda0a4fcd87a155a13b02f3db8573c (patch)
tree4315a47ad2c511202a39335cc83b8f646f7b4888 /plat/st
parent0289ab9eb8476808f50e6b858079acc65f6cd2e6 (diff)
stm32mp1: manage CONSOLE_FLAG_TRANSLATE_CRLF and cleanup driver
The STM32 console driver was pre-pending '\r' before '\n'. It is now managed by the framework with the flag: CONSOLE_FLAG_TRANSLATE_CRLF. Remove the code in driver, and add the flag for STM32MP1. Change-Id: I5d0d5d5c4abee0b7dc11c2f8707b1b5cf10149ab Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'plat/st')
-rw-r--r--plat/st/stm32mp1/bl2_plat_setup.c3
-rw-r--r--plat/st/stm32mp1/sp_min/sp_min_setup.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/plat/st/stm32mp1/bl2_plat_setup.c b/plat/st/stm32mp1/bl2_plat_setup.c
index 75ae372a..c6aefe32 100644
--- a/plat/st/stm32mp1/bl2_plat_setup.c
+++ b/plat/st/stm32mp1/bl2_plat_setup.c
@@ -272,6 +272,9 @@ void bl2_el3_plat_arch_setup(void)
panic();
}
+ console_set_scope(&console.console, CONSOLE_FLAG_BOOT |
+ CONSOLE_FLAG_CRASH | CONSOLE_FLAG_TRANSLATE_CRLF);
+
stm32mp_print_cpuinfo();
board_model = dt_get_board_model();
diff --git a/plat/st/stm32mp1/sp_min/sp_min_setup.c b/plat/st/stm32mp1/sp_min/sp_min_setup.c
index 417115b6..e10dfbfc 100644
--- a/plat/st/stm32mp1/sp_min/sp_min_setup.c
+++ b/plat/st/stm32mp1/sp_min/sp_min_setup.c
@@ -129,16 +129,20 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
result = dt_get_stdout_uart_info(&dt_uart_info);
if ((result > 0) && (dt_uart_info.status != 0U)) {
+ unsigned int console_flags;
+
if (console_stm32_register(dt_uart_info.base, 0,
STM32MP_UART_BAUDRATE, &console) ==
0) {
panic();
}
+ console_flags = CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH |
+ CONSOLE_FLAG_TRANSLATE_CRLF;
#ifdef DEBUG
- console_set_scope(&console.console,
- CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME);
+ console_flags |= CONSOLE_FLAG_RUNTIME;
#endif
+ console_set_scope(&console.console, console_flags);
}
}