From be58c81aff4cd4c0ccf43dbd7998da4a6a08c03b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 19:43:51 +0200 Subject: Adding upstream version 2.10.0+dfsg. Signed-off-by: Daniel Baumann --- plat/imx/common/aarch32/imx_uart_console.S | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plat/imx/common/aarch32/imx_uart_console.S (limited to 'plat/imx/common/aarch32') diff --git a/plat/imx/common/aarch32/imx_uart_console.S b/plat/imx/common/aarch32/imx_uart_console.S new file mode 100644 index 0000000..2a35b5e --- /dev/null +++ b/plat/imx/common/aarch32/imx_uart_console.S @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include "imx_uart.h" + + .globl console_imx_uart_register + .globl console_imx_uart_putc + .globl console_imx_uart_getc + .globl console_imx_uart_flush + +func console_imx_uart_register + push {r4, lr} + mov r4, r3 + cmp r4, #0 + beq register_fail + str r0, [r4, #CONSOLE_T_BASE] + + bl console_imx_uart_core_init + cmp r0, #0 + bne register_fail + + mov r0, r4 + pop {r4, lr} + finish_console_register imx_uart putc=1, getc=ENABLE_CONSOLE_GETC, flush=1 + +register_fail: + pop {r4, pc} +endfunc console_imx_uart_register + +func console_imx_uart_putc + ldr r1, [r1, #CONSOLE_T_BASE] + b console_imx_uart_core_putc +endfunc console_imx_uart_putc + +func console_imx_uart_getc + ldr r0, [r0, #CONSOLE_T_BASE] + b console_imx_uart_core_getc +endfunc console_imx_uart_getc + +func console_imx_uart_flush + ldr r0, [r0, #CONSOLE_T_BASE] + b console_imx_uart_core_flush +endfunc console_imx_uart_flush -- cgit v1.2.3