From 7c85bfac1edaf0e6934b3755fdb8e5cab60b24ff Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 15 Nov 2022 18:04:41 -0600 Subject: [PATCH] refactor(ti): use console_set_scope() rather than empty function hack Signed-off-by: Andrew Davis Change-Id: I62c1215bc02e95a7ea9fa1e2dfa9ef05e204fce1 --- plat/ti/k3/common/k3_bl31_setup.c | 11 ++--------- plat/ti/k3/common/k3_console.c | 7 +++++-- plat/ti/k3/include/k3_console.h | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/plat/ti/k3/common/k3_bl31_setup.c b/plat/ti/k3/common/k3_bl31_setup.c index 6436e7a66..9a1fd94ea 100644 --- a/plat/ti/k3/common/k3_bl31_setup.c +++ b/plat/ti/k3/common/k3_bl31_setup.c @@ -67,7 +67,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, assert(arg0 == 0U); assert(arg1 == 0U); - bl31_console_setup(); + /* Initialize the console to provide early debug support */ + k3_console_setup(); #ifdef BL32_BASE /* Populate entry point information for BL32 */ @@ -168,14 +169,6 @@ unsigned int plat_get_syscnt_freq2(void) return SYS_COUNTER_FREQ_IN_TICKS; } -/* - * Empty function to prevent the console from being uninitialized after BL33 is - * started and allow us to see messages from BL31. - */ -void bl31_plat_runtime_setup(void) -{ -} - /******************************************************************************* * Return a pointer to the 'entry_point_info' structure of the next image * for the security state specified. BL3-3 corresponds to the non-secure diff --git a/plat/ti/k3/common/k3_console.c b/plat/ti/k3/common/k3_console.c index 8c44c17e2..1b01c9b13 100644 --- a/plat/ti/k3/common/k3_console.c +++ b/plat/ti/k3/common/k3_console.c @@ -11,11 +11,14 @@ #include -void bl31_console_setup(void) +void k3_console_setup(void) { static console_t console; - /* Initialize the console to provide early debug support */ console_16550_register(K3_USART_BASE, K3_USART_CLK_SPEED, K3_USART_BAUD, &console); + + console_set_scope(&console, CONSOLE_FLAG_BOOT | + CONSOLE_FLAG_RUNTIME | + CONSOLE_FLAG_CRASH); } diff --git a/plat/ti/k3/include/k3_console.h b/plat/ti/k3/include/k3_console.h index 6376ab3b7..51b322c07 100644 --- a/plat/ti/k3/include/k3_console.h +++ b/plat/ti/k3/include/k3_console.h @@ -7,6 +7,6 @@ #ifndef K3_CONSOLE_H #define K3_CONSOLE_H -void bl31_console_setup(void); +void k3_console_setup(void); #endif /* K3_CONSOLE_H */ -- 2.39.5