summaryrefslogtreecommitdiff
path: root/plat/imx/imx7
diff options
context:
space:
mode:
authorYing-Chun Liu (PaulLiu) <paulliu@debian.org>2019-02-12 18:33:04 +0800
committerYing-Chun Liu (PaulLiu) <paulliu@debian.org>2019-02-12 18:56:29 +0800
commit70086dc466d980248dfb6416fa6c2adae5aafe8a (patch)
treee69c4d75063e77a9dce20c3b819e0d8c192ae374 /plat/imx/imx7
parent873e394b3bf93214a441f9f98237b58fbbea55aa (diff)
imx: warp7: Migrate to MULTI_CONSOLE_API
This commit migrates to MULTI_CONSOLE_API for IMX Warp7 board. We also rename the functions in imx_uart driver to more specific one. Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Diffstat (limited to 'plat/imx/imx7')
-rw-r--r--plat/imx/imx7/warp7/platform.mk4
-rw-r--r--plat/imx/imx7/warp7/warp7_bl2_el3_setup.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/plat/imx/imx7/warp7/platform.mk b/plat/imx/imx7/warp7/platform.mk
index f29f7799..6cd7566e 100644
--- a/plat/imx/imx7/warp7/platform.mk
+++ b/plat/imx/imx7/warp7/platform.mk
@@ -59,6 +59,7 @@ BL2_SOURCES += common/desc_image_load.c \
plat/imx/imx7/warp7/warp7_bl2_mem_params_desc.c \
plat/imx/imx7/warp7/warp7_io_storage.c \
plat/imx/imx7/warp7/warp7_image_load.c \
+ plat/imx/common/aarch32/imx_uart_console.S \
${XLAT_TABLES_LIB_SRCS}
ifneq (${TRUSTED_BOARD_BOOT},0)
@@ -118,6 +119,9 @@ SEPARATE_CODE_AND_RODATA := 1
# Use Coherent memory
USE_COHERENT_MEM := 1
+# Use multi console API
+MULTI_CONSOLE_API := 1
+
# PLAT_WARP7_UART
PLAT_WARP7_UART :=1
$(eval $(call add_define,PLAT_WARP7_UART))
diff --git a/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c b/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c
index 08baf199..0eedd210 100644
--- a/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c
+++ b/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c
@@ -258,6 +258,8 @@ void bl2_el3_early_platform_setup(u_register_t arg1, u_register_t arg2,
uint32_t uart1_en_bits = (uint32_t)UART1_CLK_SELECT;
uint32_t uart6_en_bits = (uint32_t)UART6_CLK_SELECT;
uint32_t usdhc_clock_sel = PLAT_WARP7_SD - 1;
+ static console_imx_uart_t console;
+ int console_scope = CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME;
/* Initialize the AIPS */
imx_aips_init();
@@ -278,8 +280,12 @@ void bl2_el3_early_platform_setup(u_register_t arg1, u_register_t arg2,
warp7_setup_pinmux();
/* Init UART, storage and friends */
- console_init(PLAT_WARP7_BOOT_UART_BASE, PLAT_WARP7_BOOT_UART_CLK_IN_HZ,
- PLAT_WARP7_CONSOLE_BAUDRATE);
+ console_imx_uart_register(PLAT_WARP7_BOOT_UART_BASE,
+ PLAT_WARP7_BOOT_UART_CLK_IN_HZ,
+ PLAT_WARP7_CONSOLE_BAUDRATE,
+ &console);
+ console_set_scope(&console.console, console_scope);
+
warp7_usdhc_setup();
/* Open handles to persistent storage */