imx: add necessary lpuart console_flush callback for debug
Current lpuart driver does NOT implement .console_flush callback, if debug console is enabled, the console_flush() will call the undefined .console_flush callback(NULL) for lpuart and leak to panic, this patch adds .console_flush callback to make lpuart work for debug mode. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
This commit is contained in:
parent
63b9b5425f
commit
f1ac79642e
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
.globl console_lpuart_init
|
.globl console_lpuart_init
|
||||||
.globl console_lpuart_putc
|
.globl console_lpuart_putc
|
||||||
.globl console_lpuart_getc
|
.globl console_lpuart_getc
|
||||||
|
.globl console_lpuart_flush
|
||||||
|
|
||||||
func console_lpuart_register
|
func console_lpuart_register
|
||||||
mov x7, x30
|
mov x7, x30
|
||||||
|
@ -27,7 +28,7 @@ func console_lpuart_register
|
||||||
|
|
||||||
mov x0, x6
|
mov x0, x6
|
||||||
mov x30, x7
|
mov x30, x7
|
||||||
finish_console_register lpuart putc=1, getc=1
|
finish_console_register lpuart putc=1, getc=1, flush=1
|
||||||
|
|
||||||
register_fail:
|
register_fail:
|
||||||
ret x7
|
ret x7
|
||||||
|
@ -70,3 +71,8 @@ getc_error:
|
||||||
mov w0, #-1
|
mov w0, #-1
|
||||||
ret
|
ret
|
||||||
endfunc console_lpuart_getc
|
endfunc console_lpuart_getc
|
||||||
|
|
||||||
|
func console_lpuart_flush
|
||||||
|
mov x0, #0
|
||||||
|
ret
|
||||||
|
endfunc console_lpuart_flush
|
||||||
|
|
Loading…
Reference in New Issue