drivers: cadence: cdns: Fix flush function

It is still a placeholder, but now it is registered correctly by the
macro finish_console_register.

Change-Id: Ic78c966d9be606cbc1a53cec43ead23b32963afe
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
Antonio Nino Diaz 2018-09-24 22:07:58 +01:00
parent 28bcc45ec0
commit 61d2b40d28
1 changed files with 28 additions and 4 deletions

View File

@ -15,9 +15,11 @@
.globl console_cdns_core_init
.globl console_cdns_core_putc
.globl console_cdns_core_getc
.globl console_cdns_core_flush
.globl console_cdns_putc
.globl console_cdns_getc
.globl console_cdns_flush
/* -----------------------------------------------
* int console_cdns_core_init(uintptr_t base_addr)
@ -87,6 +89,7 @@ endfunc console_cdns_register
.equ console_core_init,console_cdns_core_init
.equ console_core_putc,console_cdns_core_putc
.equ console_core_getc,console_cdns_core_getc
.equ console_core_flush,console_cdns_core_flush
#endif
/* --------------------------------------------------------
@ -188,8 +191,7 @@ func console_cdns_getc
endfunc console_cdns_getc
/* ---------------------------------------------
* int console_core_flush(uintptr_t base_addr)
* DEPRECATED: Not used with MULTI_CONSOLE_API!
* int console_cdns_core_flush(uintptr_t base_addr)
* Function to force a write of all buffered
* data that hasn't been output.
* In : x0 - console base address
@ -197,8 +199,30 @@ endfunc console_cdns_getc
* Clobber list : x0, x1
* ---------------------------------------------
*/
func console_core_flush
func console_cdns_core_flush
#if ENABLE_ASSERTIONS
cmp x0, #0
ASM_ASSERT(ne)
#endif /* ENABLE_ASSERTIONS */
/* Placeholder */
mov w0, #0
ret
endfunc console_core_flush
endfunc console_cdns_core_flush
/* ---------------------------------------------
* int console_cdns_flush(console_pl011_t *console)
* Function to force a write of all buffered
* data that hasn't been output.
* In : x0 - pointer to console_t structure
* Out : return -1 on error else return 0.
* Clobber list : x0, x1
* ---------------------------------------------
*/
func console_cdns_flush
#if ENABLE_ASSERTIONS
cmp x0, #0
ASM_ASSERT(ne)
#endif /* ENABLE_ASSERTIONS */
ldr x0, [x0, #CONSOLE_T_CDNS_BASE]
b console_cdns_core_flush
endfunc console_cdns_flush