mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 14:25:44 +00:00
imx: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as well, let's use that generic location and drop the UART driver specific data structure at all. Change-Id: I058f793e4024fa7291e432f5be374a77faf16f36 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
e21a788ee1
commit
d7873bcd54
8 changed files with 10 additions and 25 deletions
|
@ -154,15 +154,10 @@
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
console_t console;
|
|
||||||
uintptr_t base;
|
|
||||||
} console_imx_uart_t;
|
|
||||||
|
|
||||||
int console_imx_uart_register(uintptr_t baseaddr,
|
int console_imx_uart_register(uintptr_t baseaddr,
|
||||||
uint32_t clock,
|
uint32_t clock,
|
||||||
uint32_t baud,
|
uint32_t baud,
|
||||||
console_imx_uart_t *console);
|
console_t *console);
|
||||||
#endif /*__ASSEMBLER__*/
|
#endif /*__ASSEMBLER__*/
|
||||||
|
|
||||||
#endif /* IMX_UART_H */
|
#endif /* IMX_UART_H */
|
||||||
|
|
|
@ -54,13 +54,8 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
console_t console;
|
|
||||||
uintptr_t base;
|
|
||||||
} console_lpuart_t;
|
|
||||||
|
|
||||||
int console_lpuart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
|
int console_lpuart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
|
||||||
console_lpuart_t *console);
|
console_t *console);
|
||||||
#endif /*__ASSEMBLER__*/
|
#endif /*__ASSEMBLER__*/
|
||||||
|
|
||||||
#endif /* IMX8_LPUART_H */
|
#endif /* IMX8_LPUART_H */
|
||||||
|
|
|
@ -11,13 +11,8 @@
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
console_t console;
|
|
||||||
uintptr_t base;
|
|
||||||
} console_uart_t;
|
|
||||||
|
|
||||||
int console_imx_uart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
|
int console_imx_uart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
|
||||||
console_uart_t *console);
|
console_t *console);
|
||||||
#endif /*__ASSEMBLER__*/
|
#endif /*__ASSEMBLER__*/
|
||||||
|
|
||||||
#endif /* IMX_UART_H */
|
#endif /* IMX_UART_H */
|
||||||
|
|
|
@ -150,7 +150,7 @@ static void imx7_setup_wdog_clocks(void)
|
||||||
void bl2_el3_early_platform_setup(u_register_t arg1, u_register_t arg2,
|
void bl2_el3_early_platform_setup(u_register_t arg1, u_register_t arg2,
|
||||||
u_register_t arg3, u_register_t arg4)
|
u_register_t arg3, u_register_t arg4)
|
||||||
{
|
{
|
||||||
static console_imx_uart_t console;
|
static console_t console;
|
||||||
int console_scope = CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME;
|
int console_scope = CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME;
|
||||||
|
|
||||||
/* Initialize common components */
|
/* Initialize common components */
|
||||||
|
@ -170,7 +170,7 @@ void bl2_el3_early_platform_setup(u_register_t arg1, u_register_t arg2,
|
||||||
PLAT_IMX7_BOOT_UART_CLK_IN_HZ,
|
PLAT_IMX7_BOOT_UART_CLK_IN_HZ,
|
||||||
PLAT_IMX7_CONSOLE_BAUDRATE,
|
PLAT_IMX7_CONSOLE_BAUDRATE,
|
||||||
&console);
|
&console);
|
||||||
console_set_scope(&console.console, console_scope);
|
console_set_scope(&console, console_scope);
|
||||||
|
|
||||||
/* Open handles to persistent storage */
|
/* Open handles to persistent storage */
|
||||||
plat_imx7_io_setup();
|
plat_imx7_io_setup();
|
||||||
|
|
|
@ -97,7 +97,7 @@ void bl31_tzc380_setup(void)
|
||||||
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_uart_t console;
|
static console_t console;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Enable CSU NS access permission */
|
/* Enable CSU NS access permission */
|
||||||
|
@ -114,7 +114,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
||||||
console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
||||||
IMX_CONSOLE_BAUDRATE, &console);
|
IMX_CONSOLE_BAUDRATE, &console);
|
||||||
/* This console is only used for boot stage */
|
/* This console is only used for boot stage */
|
||||||
console_set_scope(&console.console, CONSOLE_FLAG_BOOT);
|
console_set_scope(&console, CONSOLE_FLAG_BOOT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* tell BL3-1 where the non-secure software image is located
|
* tell BL3-1 where the non-secure software image is located
|
||||||
|
|
|
@ -133,7 +133,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
||||||
imx8m_caam_init();
|
imx8m_caam_init();
|
||||||
|
|
||||||
#if DEBUG_CONSOLE
|
#if DEBUG_CONSOLE
|
||||||
static console_uart_t console;
|
static console_t console;
|
||||||
|
|
||||||
console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
|
||||||
IMX_CONSOLE_BAUDRATE, &console);
|
IMX_CONSOLE_BAUDRATE, &console);
|
||||||
|
|
|
@ -295,7 +295,7 @@ 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)
|
||||||
{
|
{
|
||||||
#if DEBUG_CONSOLE
|
#if DEBUG_CONSOLE
|
||||||
static console_lpuart_t console;
|
static console_t console;
|
||||||
#endif
|
#endif
|
||||||
if (sc_ipc_open(&ipc_handle, SC_IPC_BASE) != SC_ERR_NONE)
|
if (sc_ipc_open(&ipc_handle, SC_IPC_BASE) != SC_ERR_NONE)
|
||||||
panic();
|
panic();
|
||||||
|
|
|
@ -255,7 +255,7 @@ 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)
|
||||||
{
|
{
|
||||||
#if DEBUG_CONSOLE
|
#if DEBUG_CONSOLE
|
||||||
static console_lpuart_t console;
|
static console_t console;
|
||||||
#endif
|
#endif
|
||||||
if (sc_ipc_open(&ipc_handle, SC_IPC_BASE) != SC_ERR_NONE)
|
if (sc_ipc_open(&ipc_handle, SC_IPC_BASE) != SC_ERR_NONE)
|
||||||
panic();
|
panic();
|
||||||
|
|
Loading…
Add table
Reference in a new issue