]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
refactor(ti): use console_set_scope() rather than empty function hack
authorAndrew Davis <afd@ti.com>
Wed, 16 Nov 2022 00:04:41 +0000 (18:04 -0600)
committerAndrew Davis <afd@ti.com>
Fri, 13 Jan 2023 00:45:48 +0000 (18:45 -0600)
Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: I62c1215bc02e95a7ea9fa1e2dfa9ef05e204fce1

plat/ti/k3/common/k3_bl31_setup.c
plat/ti/k3/common/k3_console.c
plat/ti/k3/include/k3_console.h

index 6436e7a6661984ca85054a9b8d982a3f3f260127..9a1fd94ea97225c89117ac3632781b1772e88c56 100644 (file)
@@ -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
index 8c44c17e249b1d9683393fbc3ca927d3a2c94c63..1b01c9b13d3f8537c7d7f68ef8b49b2f43e893d6 100644 (file)
 
 #include <k3_console.h>
 
-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);
 }
index 6376ab3b7baf30e285b3ea39f1aea62b6fa4a9ce..51b322c075546a4f266b33c8a7a6176cb78dd2d1 100644 (file)
@@ -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 */