Commit 896d684d authored by Mark Dykes's avatar Mark Dykes Committed by TrustedFirmware Code Review
Browse files

Merge changes from topic "console_t_cleanup" into integration

* changes:
  marvell: Consolidate console register calls
  uniphier: Use generic console_t data structure
  spe: Use generic console_t data structure
  LS 16550: Use generic console_t data structure
  stm32: Use generic console_t data structure
  rcar: Use generic console_t data structure
  a3700: Use generic console_t data structure
  16550: Use generic console_t data structure
  imx: Use generic console_t data structure
parents c723ef01 7db9a0b9
...@@ -37,7 +37,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) ...@@ -37,7 +37,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
static console_16550_t console; static console_t console;
console_16550_register(PLAT_UART0_BASE, PLAT_UART_CLOCK, PLAT_BAUDRATE, console_16550_register(PLAT_UART0_BASE, PLAT_UART_CLOCK, PLAT_BAUDRATE,
&console); &console);
......
...@@ -50,7 +50,7 @@ boot_source_type boot_source = BOOT_SOURCE; ...@@ -50,7 +50,7 @@ boot_source_type boot_source = BOOT_SOURCE;
void bl2_el3_early_platform_setup(u_register_t x0, u_register_t x1, void bl2_el3_early_platform_setup(u_register_t x0, u_register_t x1,
u_register_t x2, u_register_t x4) u_register_t x2, u_register_t x4)
{ {
static console_16550_t console; static console_t console;
handoff reverse_handoff_ptr; handoff reverse_handoff_ptr;
generic_delay_timer_init(); generic_delay_timer_init();
......
...@@ -45,7 +45,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) ...@@ -45,7 +45,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
static console_16550_t console; static console_t console;
console_16550_register(PLAT_UART0_BASE, PLAT_UART_CLOCK, PLAT_BAUDRATE, console_16550_register(PLAT_UART0_BASE, PLAT_UART_CLOCK, PLAT_BAUDRATE,
&console); &console);
......
...@@ -81,7 +81,7 @@ endfunc console_ls_16550_core_init ...@@ -81,7 +81,7 @@ endfunc console_ls_16550_core_init
.globl console_ls_16550_register .globl console_ls_16550_register
/* ----------------------------------------------- /* -----------------------------------------------
* int console_ls_16550_register(console_ls_16550_t *console, * int console_ls_16550_register(console_t *console,
* uintptr_t base, uint32_t clk, uint32_t baud) * uintptr_t base, uint32_t clk, uint32_t baud)
* Function to initialize and register a new 16550 * Function to initialize and register a new 16550
* console. Storage passed in for the console struct * console. Storage passed in for the console struct
...@@ -89,7 +89,7 @@ endfunc console_ls_16550_core_init ...@@ -89,7 +89,7 @@ endfunc console_ls_16550_core_init
* In: x0 - UART register base address * In: x0 - UART register base address
* w1 - UART clock in Hz * w1 - UART clock in Hz
* w2 - Baud rate * w2 - Baud rate
* x3 - pointer to empty console_ls_16550_t struct * x3 - pointer to empty console_t struct
* Out: return 1 on success, 0 on error * Out: return 1 on success, 0 on error
* Clobber list : x0, x1, x2, x6, x7, x14 * Clobber list : x0, x1, x2, x6, x7, x14
* ----------------------------------------------- * -----------------------------------------------
...@@ -98,7 +98,7 @@ func console_ls_16550_register ...@@ -98,7 +98,7 @@ func console_ls_16550_register
mov x7, x30 mov x7, x30
mov x6, x3 mov x6, x3
cbz x6, register_fail cbz x6, register_fail
str x0, [x6, #CONSOLE_T_16550_BASE] str x0, [x6, #CONSOLE_T_BASE]
bl console_ls_16550_core_init bl console_ls_16550_core_init
cbz x0, register_fail cbz x0, register_fail
...@@ -150,7 +150,7 @@ func console_ls_16550_core_putc ...@@ -150,7 +150,7 @@ func console_ls_16550_core_putc
endfunc console_ls_16550_core_putc endfunc console_ls_16550_core_putc
/* -------------------------------------------------------- /* --------------------------------------------------------
* int console_16550_putc(int c, console_ls_16550_t *console) * int console_16550_putc(int c, console_t *console)
* Function to output a character over the console. It * Function to output a character over the console. It
* returns the character printed on success or -1 on error. * returns the character printed on success or -1 on error.
* In : w0 - character to be printed * In : w0 - character to be printed
...@@ -164,7 +164,7 @@ func console_ls_16550_putc ...@@ -164,7 +164,7 @@ func console_ls_16550_putc
cmp x1, #0 cmp x1, #0
ASM_ASSERT(ne) ASM_ASSERT(ne)
#endif /* ENABLE_ASSERTIONS */ #endif /* ENABLE_ASSERTIONS */
ldr x1, [x1, #CONSOLE_T_16550_BASE] ldr x1, [x1, #CONSOLE_T_BASE]
b console_ls_16550_core_putc b console_ls_16550_core_putc
endfunc console_ls_16550_putc endfunc console_ls_16550_putc
...@@ -195,7 +195,7 @@ no_char: ...@@ -195,7 +195,7 @@ no_char:
endfunc console_ls_16550_core_getc endfunc console_ls_16550_core_getc
/* --------------------------------------------- /* ---------------------------------------------
* int console_ls_16550_getc(console_ls_16550_t *console) * int console_ls_16550_getc(console_t *console)
* Function to get a character from the console. * Function to get a character from the console.
* It returns the character grabbed on success * It returns the character grabbed on success
* or -1 on if no character is available. * or -1 on if no character is available.
...@@ -209,7 +209,7 @@ func console_ls_16550_getc ...@@ -209,7 +209,7 @@ func console_ls_16550_getc
cmp x1, #0 cmp x1, #0
ASM_ASSERT(ne) ASM_ASSERT(ne)
#endif /* ENABLE_ASSERTIONS */ #endif /* ENABLE_ASSERTIONS */
ldr x0, [x0, #CONSOLE_T_16550_BASE] ldr x0, [x0, #CONSOLE_T_BASE]
b console_ls_16550_core_getc b console_ls_16550_core_getc
endfunc console_ls_16550_getc endfunc console_ls_16550_getc
...@@ -239,7 +239,7 @@ func console_ls_16550_core_flush ...@@ -239,7 +239,7 @@ func console_ls_16550_core_flush
endfunc console_ls_16550_core_flush endfunc console_ls_16550_core_flush
/* --------------------------------------------- /* ---------------------------------------------
* int console_ls_16550_flush(console_ls_16550_t *console) * int console_ls_16550_flush(console_t *console)
* Function to force a write of all buffered * Function to force a write of all buffered
* data that hasn't been output. * data that hasn't been output.
* In : x0 - pointer to console_t structure * In : x0 - pointer to console_t structure
...@@ -252,6 +252,6 @@ func console_ls_16550_flush ...@@ -252,6 +252,6 @@ func console_ls_16550_flush
cmp x0, #0 cmp x0, #0
ASM_ASSERT(ne) ASM_ASSERT(ne)
#endif /* ENABLE_ASSERTIONS */ #endif /* ENABLE_ASSERTIONS */
ldr x0, [x0, #CONSOLE_T_16550_BASE] ldr x0, [x0, #CONSOLE_T_BASE]
b console_ls_16550_core_flush b console_ls_16550_core_flush
endfunc console_ls_16550_flush endfunc console_ls_16550_flush
...@@ -61,17 +61,10 @@ ...@@ -61,17 +61,10 @@
#define UARTLSR_OVRF (1 << 2) /* Rx Overrun Error */ #define UARTLSR_OVRF (1 << 2) /* Rx Overrun Error */
#define UARTLSR_RDR (1 << 2) /* Rx Data Ready */ #define UARTLSR_RDR (1 << 2) /* Rx Data Ready */
#define CONSOLE_T_16550_BASE CONSOLE_T_DRVDATA
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
typedef struct {
console_t console;
uintptr_t base;
} console_ls_16550_t;
/* /*
* Initialize a new 16550 console instance and register it with the console * Initialize a new 16550 console instance and register it with the console
* framework. The |console| pointer must point to storage that will be valid * framework. The |console| pointer must point to storage that will be valid
...@@ -79,7 +72,7 @@ typedef struct { ...@@ -79,7 +72,7 @@ typedef struct {
* Its contents will be reinitialized from scratch. * Its contents will be reinitialized from scratch.
*/ */
int console_ls_16550_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, int console_ls_16550_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
console_ls_16550_t *console); console_t *console);
#endif /*__ASSEMBLER__*/ #endif /*__ASSEMBLER__*/
......
...@@ -23,7 +23,7 @@ meminfo_t *bl1_plat_sec_mem_layout(void) ...@@ -23,7 +23,7 @@ meminfo_t *bl1_plat_sec_mem_layout(void)
******************************************************************************/ ******************************************************************************/
void ls_bl1_early_platform_setup(void) void ls_bl1_early_platform_setup(void)
{ {
static console_ls_16550_t console; static console_t console;
#if !LS1043_DISABLE_TRUSTED_WDOG #if !LS1043_DISABLE_TRUSTED_WDOG
/* TODO: Enable watchdog */ /* TODO: Enable watchdog */
......
...@@ -23,7 +23,7 @@ static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE); ...@@ -23,7 +23,7 @@ static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
******************************************************************************/ ******************************************************************************/
void ls_bl2_early_platform_setup(meminfo_t *mem_layout) void ls_bl2_early_platform_setup(meminfo_t *mem_layout)
{ {
static console_ls_16550_t console; static console_t console;
/* Initialize the console to provide early debug support */ /* Initialize the console to provide early debug support */
console_ls_16550_register(LS_TF_UART_BASE, LS_TF_UART_CLOCK, console_ls_16550_register(LS_TF_UART_BASE, LS_TF_UART_CLOCK,
......
...@@ -67,7 +67,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) ...@@ -67,7 +67,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
void ls_bl31_early_platform_setup(void *from_bl2, void ls_bl31_early_platform_setup(void *from_bl2,
void *plat_params_from_bl2) void *plat_params_from_bl2)
{ {
static console_ls_16550_t console; static console_t console;
/* Initialize the console to provide early debug support */ /* Initialize the console to provide early debug support */
console_ls_16550_register(LS_TF_UART_BASE, LS_TF_UART_CLOCK, console_ls_16550_register(LS_TF_UART_BASE, LS_TF_UART_CLOCK,
...@@ -182,7 +182,7 @@ void ls_bl31_platform_setup(void) ...@@ -182,7 +182,7 @@ void ls_bl31_platform_setup(void)
******************************************************************************/ ******************************************************************************/
void ls_bl31_plat_runtime_setup(void) void ls_bl31_plat_runtime_setup(void)
{ {
static console_ls_16550_t console; static console_t console;
/* Initialize the runtime console */ /* Initialize the runtime console */
console_ls_16550_register(PLAT_LS1043_UART_BASE, PLAT_LS1043_UART_CLOCK, console_ls_16550_register(PLAT_LS1043_UART_BASE, PLAT_LS1043_UART_CLOCK,
......
...@@ -30,7 +30,7 @@ gicv2_driver_data_t ls_gic_data = { ...@@ -30,7 +30,7 @@ gicv2_driver_data_t ls_gic_data = {
******************************************************************************/ ******************************************************************************/
void ls_tsp_early_platform_setup(void) void ls_tsp_early_platform_setup(void)
{ {
static console_ls_16550_t console; static console_t console;
/* /*
* Initialize a different console than already in use to display * Initialize a different console than already in use to display
* messages from TSP * messages from TSP
......
...@@ -14,16 +14,15 @@ ...@@ -14,16 +14,15 @@
#ifdef PLAT_a3700 #ifdef PLAT_a3700
#include <drivers/marvell/uart/a3700_console.h> #include <drivers/marvell/uart/a3700_console.h>
#define console_marvell_register console_a3700_register
static console_a3700_t marvell_boot_console;
static console_a3700_t marvell_runtime_console;
#else #else
#include <drivers/ti/uart/uart_16550.h> #include <drivers/ti/uart/uart_16550.h>
#define console_marvell_register console_16550_register
static console_16550_t marvell_boot_console;
static console_16550_t marvell_runtime_console;
#endif #endif
static console_t marvell_boot_console;
static console_t marvell_runtime_console;
/******************************************************************************* /*******************************************************************************
* Functions that set up the console * Functions that set up the console
******************************************************************************/ ******************************************************************************/
...@@ -32,12 +31,7 @@ static console_16550_t marvell_runtime_console; ...@@ -32,12 +31,7 @@ static console_16550_t marvell_runtime_console;
void marvell_console_boot_init(void) void marvell_console_boot_init(void)
{ {
int rc = int rc =
#ifdef PLAT_a3700 console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
console_a3700_register(
#else
console_16550_register(
#endif
PLAT_MARVELL_BOOT_UART_BASE,
PLAT_MARVELL_BOOT_UART_CLK_IN_HZ, PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
MARVELL_CONSOLE_BAUDRATE, MARVELL_CONSOLE_BAUDRATE,
&marvell_boot_console); &marvell_boot_console);
...@@ -50,40 +44,33 @@ void marvell_console_boot_init(void) ...@@ -50,40 +44,33 @@ void marvell_console_boot_init(void)
panic(); panic();
} }
console_set_scope(&marvell_boot_console.console, console_set_scope(&marvell_boot_console, CONSOLE_FLAG_BOOT);
CONSOLE_FLAG_BOOT);
} }
void marvell_console_boot_end(void) void marvell_console_boot_end(void)
{ {
(void)console_flush(); (void)console_flush();
(void)console_unregister(&marvell_boot_console.console); (void)console_unregister(&marvell_boot_console);
} }
/* Initialize the runtime console */ /* Initialize the runtime console */
void marvell_console_runtime_init(void) void marvell_console_runtime_init(void)
{ {
int rc = int rc =
#ifdef PLAT_a3700 console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
console_a3700_register(
#else
console_16550_register(
#endif
PLAT_MARVELL_BOOT_UART_BASE,
PLAT_MARVELL_BOOT_UART_CLK_IN_HZ, PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
MARVELL_CONSOLE_BAUDRATE, MARVELL_CONSOLE_BAUDRATE,
&marvell_runtime_console); &marvell_runtime_console);
if (rc == 0) if (rc == 0)
panic(); panic();
console_set_scope(&marvell_runtime_console.console, console_set_scope(&marvell_runtime_console, CONSOLE_FLAG_RUNTIME);
CONSOLE_FLAG_RUNTIME);
} }
void marvell_console_runtime_end(void) void marvell_console_runtime_end(void)
{ {
(void)console_flush(); (void)console_flush();
(void)console_unregister(&marvell_runtime_console.console); (void)console_unregister(&marvell_runtime_console);
} }
...@@ -100,7 +100,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) ...@@ -100,7 +100,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
static console_16550_t console; static console_t console;
console_16550_register(MT8173_UART0_BASE, MT8173_UART_CLOCK, MT8173_BAUDRATE, &console); console_16550_register(MT8173_UART0_BASE, MT8173_UART_CLOCK, MT8173_BAUDRATE, &console);
......
...@@ -112,7 +112,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) ...@@ -112,7 +112,7 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
static console_16550_t console; static console_t console;
params_early_setup(arg1); params_early_setup(arg1);
......
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
/* ------------------------------------------------- /* -------------------------------------------------
* int console_spe_register(uintptr_t baseaddr, * int console_spe_register(uintptr_t baseaddr,
* uint32_t clock, uint32_t baud, * uint32_t clock, uint32_t baud,
* console_spe_t *console); * console_t *console);
* Function to initialize and register a new spe * Function to initialize and register a new spe
* console. Storage passed in for the console struct * console. Storage passed in for the console struct
* *must* be persistent (i.e. not from the stack). * *must* be persistent (i.e. not from the stack).
* In: x0 - UART register base address * In: x0 - UART register base address
* w1 - UART clock in Hz * w1 - UART clock in Hz
* w2 - Baud rate * w2 - Baud rate
* x3 - pointer to empty console_spe_t struct * x3 - pointer to empty console_t struct
* Out: return 1 on success, 0 on error * Out: return 1 on success, 0 on error
* Clobber list : x0, x1, x2, x6, x7, x14 * Clobber list : x0, x1, x2, x6, x7, x14
* ------------------------------------------------- * -------------------------------------------------
...@@ -122,7 +122,7 @@ putc_error: ...@@ -122,7 +122,7 @@ putc_error:
endfunc console_spe_core_putc endfunc console_spe_core_putc
/* -------------------------------------------------------- /* --------------------------------------------------------
* int console_spe_putc(int c, console_spe_t *console) * int console_spe_putc(int c, console_t *console)
* Function to output a character over the console. It * Function to output a character over the console. It
* returns the character printed on success or -1 on error. * returns the character printed on success or -1 on error.
* In : w0 - character to be printed * In : w0 - character to be printed
...@@ -137,7 +137,7 @@ func console_spe_putc ...@@ -137,7 +137,7 @@ func console_spe_putc
endfunc console_spe_putc endfunc console_spe_putc
/* --------------------------------------------- /* ---------------------------------------------
* int console_spe_getc(console_spe_t *console) * int console_spe_getc(console_t *console)
* Function to get a character from the console. * Function to get a character from the console.
* It returns the character grabbed on success * It returns the character grabbed on success
* or -1 if no character is available. * or -1 if no character is available.
...@@ -174,7 +174,7 @@ flush_error: ...@@ -174,7 +174,7 @@ flush_error:
endfunc console_spe_core_flush endfunc console_spe_core_flush
/* --------------------------------------------- /* ---------------------------------------------
* int console_spe_flush(console_spe_t *console) * int console_spe_flush(console_t *console)
* Function to force a write of all buffered * Function to force a write of all buffered
* data that hasn't been output. * data that hasn't been output.
* In : x0 - pointer to console_t structure * In : x0 - pointer to console_t structure
......
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
#include <drivers/console.h> #include <drivers/console.h>
typedef struct {
console_t console;
uintptr_t base;
} console_spe_t;
/* /*
* Initialize a new spe console instance and register it with the console * Initialize a new spe console instance and register it with the console
* framework. The |console| pointer must point to storage that will be valid * framework. The |console| pointer must point to storage that will be valid
...@@ -23,6 +18,6 @@ typedef struct { ...@@ -23,6 +18,6 @@ typedef struct {
* Its contents will be reinitialized from scratch. * Its contents will be reinitialized from scratch.
*/ */
int console_spe_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, int console_spe_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
console_spe_t *console); console_t *console);
#endif /* SPE_H */ #endif /* SPE_H */
...@@ -92,7 +92,7 @@ static uint32_t tegra132_uart_addresses[TEGRA132_MAX_UART_PORTS + 1] = { ...@@ -92,7 +92,7 @@ static uint32_t tegra132_uart_addresses[TEGRA132_MAX_UART_PORTS + 1] = {
******************************************************************************/ ******************************************************************************/
void plat_enable_console(int32_t id) void plat_enable_console(int32_t id)
{ {
static console_16550_t uart_console; static console_t uart_console;
uint32_t console_clock; uint32_t console_clock;
if ((id > 0) && (id < TEGRA132_MAX_UART_PORTS)) { if ((id > 0) && (id < TEGRA132_MAX_UART_PORTS)) {
...@@ -109,7 +109,7 @@ void plat_enable_console(int32_t id) ...@@ -109,7 +109,7 @@ void plat_enable_console(int32_t id)
console_clock, console_clock,
TEGRA_CONSOLE_BAUDRATE, TEGRA_CONSOLE_BAUDRATE,
&uart_console); &uart_console);
console_set_scope(&uart_console.console, CONSOLE_FLAG_BOOT | console_set_scope(&uart_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH);
} }
} }
......
...@@ -150,7 +150,7 @@ static uint32_t tegra186_uart_addresses[TEGRA186_MAX_UART_PORTS + 1] = { ...@@ -150,7 +150,7 @@ static uint32_t tegra186_uart_addresses[TEGRA186_MAX_UART_PORTS + 1] = {
******************************************************************************/ ******************************************************************************/
void plat_enable_console(int32_t id) void plat_enable_console(int32_t id)
{ {
static console_16550_t uart_console; static console_t uart_console;
uint32_t console_clock; uint32_t console_clock;
if ((id > 0) && (id < TEGRA186_MAX_UART_PORTS)) { if ((id > 0) && (id < TEGRA186_MAX_UART_PORTS)) {
...@@ -167,7 +167,7 @@ void plat_enable_console(int32_t id) ...@@ -167,7 +167,7 @@ void plat_enable_console(int32_t id)
console_clock, console_clock,
TEGRA_CONSOLE_BAUDRATE, TEGRA_CONSOLE_BAUDRATE,
&uart_console); &uart_console);
console_set_scope(&uart_console.console, CONSOLE_FLAG_BOOT | console_set_scope(&uart_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH);
} }
} }
......
...@@ -163,18 +163,18 @@ void plat_enable_console(int32_t id) ...@@ -163,18 +163,18 @@ void plat_enable_console(int32_t id)
uint32_t console_clock = 0U; uint32_t console_clock = 0U;
#if ENABLE_CONSOLE_SPE #if ENABLE_CONSOLE_SPE
static console_spe_t spe_console; static console_t spe_console;
if (id == TEGRA_CONSOLE_SPE_ID) { if (id == TEGRA_CONSOLE_SPE_ID) {
(void)console_spe_register(TEGRA_CONSOLE_SPE_BASE, (void)console_spe_register(TEGRA_CONSOLE_SPE_BASE,
console_clock, console_clock,
TEGRA_CONSOLE_BAUDRATE, TEGRA_CONSOLE_BAUDRATE,
&spe_console); &spe_console);
console_set_scope(&spe_console.console, CONSOLE_FLAG_BOOT | console_set_scope(&spe_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH);
} }
#else #else
static console_16550_t uart_console; static console_t uart_console;
if ((id > 0) && (id < TEGRA194_MAX_UART_PORTS)) { if ((id > 0) && (id < TEGRA194_MAX_UART_PORTS)) {
/* /*
...@@ -190,7 +190,7 @@ void plat_enable_console(int32_t id) ...@@ -190,7 +190,7 @@ void plat_enable_console(int32_t id)
console_clock, console_clock,
TEGRA_CONSOLE_BAUDRATE, TEGRA_CONSOLE_BAUDRATE,
&uart_console); &uart_console);
console_set_scope(&uart_console.console, CONSOLE_FLAG_BOOT | console_set_scope(&uart_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH);
} }
#endif #endif
......
...@@ -119,7 +119,7 @@ static uint32_t tegra210_uart_addresses[TEGRA210_MAX_UART_PORTS + 1] = { ...@@ -119,7 +119,7 @@ static uint32_t tegra210_uart_addresses[TEGRA210_MAX_UART_PORTS + 1] = {
******************************************************************************/ ******************************************************************************/
void plat_enable_console(int32_t id) void plat_enable_console(int32_t id)
{ {
static console_16550_t uart_console; static console_t uart_console;
uint32_t console_clock; uint32_t console_clock;
if ((id > 0) && (id < TEGRA210_MAX_UART_PORTS)) { if ((id > 0) && (id < TEGRA210_MAX_UART_PORTS)) {
...@@ -136,7 +136,7 @@ void plat_enable_console(int32_t id) ...@@ -136,7 +136,7 @@ void plat_enable_console(int32_t id)
console_clock, console_clock,
TEGRA_CONSOLE_BAUDRATE, TEGRA_CONSOLE_BAUDRATE,
&uart_console); &uart_console);
console_set_scope(&uart_console.console, CONSOLE_FLAG_BOOT | console_set_scope(&uart_console, CONSOLE_FLAG_BOOT |
CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH);
} }
} }
......
...@@ -70,8 +70,8 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie, ...@@ -70,8 +70,8 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
#include <drivers/renesas/rcar/console/console.h> #include <drivers/renesas/rcar/console/console.h>
static console_rcar_t rcar_boot_console; static console_t rcar_boot_console;
static console_rcar_t rcar_runtime_console; static console_t rcar_runtime_console;
void rcar_console_boot_init(void) void rcar_console_boot_init(void)
{ {
...@@ -81,7 +81,7 @@ void rcar_console_boot_init(void) ...@@ -81,7 +81,7 @@ void rcar_console_boot_init(void)
if (!ret) if (!ret)
panic(); panic();
console_set_scope(&rcar_boot_console.console, CONSOLE_FLAG_BOOT); console_set_scope(&rcar_boot_console, CONSOLE_FLAG_BOOT);
} }
void rcar_console_boot_end(void) void rcar_console_boot_end(void)
...@@ -96,7 +96,7 @@ void rcar_console_runtime_init(void) ...@@ -96,7 +96,7 @@ void rcar_console_runtime_init(void)
if (!ret) if (!ret)
panic(); panic();
console_set_scope(&rcar_boot_console.console, CONSOLE_FLAG_RUNTIME); console_set_scope(&rcar_boot_console, CONSOLE_FLAG_RUNTIME);
} }
void rcar_console_runtime_end(void) void rcar_console_runtime_end(void)
......
...@@ -57,7 +57,7 @@ void params_early_setup(u_register_t plat_param_from_bl2) ...@@ -57,7 +57,7 @@ void params_early_setup(u_register_t plat_param_from_bl2)
void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3) u_register_t arg2, u_register_t arg3)
{ {
static console_16550_t console; static console_t console;
params_early_setup(arg1); params_early_setup(arg1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment