Browse Source

refactor(ti): use console_set_scope() rather than empty function hack

Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: I62c1215bc02e95a7ea9fa1e2dfa9ef05e204fce1
pull/1993/head
Andrew Davis 2 years ago
parent
commit
7c85bfac1e
  1. 11
      plat/ti/k3/common/k3_bl31_setup.c
  2. 7
      plat/ti/k3/common/k3_console.c
  3. 2
      plat/ti/k3/include/k3_console.h

11
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

7
plat/ti/k3/common/k3_console.c

@ -11,11 +11,14 @@
#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);
}

2
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 */

Loading…
Cancel
Save