Commit be3991c0 authored by Ambroise Vincent's avatar Ambroise Vincent
Browse files

Console: remove deprecated finish_console_register

The old version of the macro is deprecated.

Commit cc5859ca

 ("Multi-console: Deprecate the
`finish_console_register` macro") provides more details.

Change-Id: I3d1cdf6496db7d8e6cfbb5804f508ff46ae7e67e
Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
parent 2cc97771
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/arm/pl011.h> #include <drivers/arm/pl011.h>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/arm/pl011.h> #include <drivers/arm/pl011.h>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/cadence/cdns_uart.h> #include <drivers/cadence/cdns_uart.h>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
/* /*
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
*/ */
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/coreboot/cbmem_console.h> #include <drivers/coreboot/cbmem_console.h>
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/marvell/uart/a3700_console.h> #include <drivers/marvell/uart/a3700_console.h>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/meson/meson_console.h> #include <drivers/meson/meson_console.h>
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
*/ */
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/st/stm32_console.h> #include <drivers/st/stm32_console.h>
#include <drivers/st/stm32_uart_regs.h> #include <drivers/st/stm32_uart_regs.h>
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <drivers/ti/uart/uart_16550.h> #include <drivers/ti/uart/uart_16550.h>
......
/* /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -17,39 +17,6 @@ ...@@ -17,39 +17,6 @@
* with a tail call that will include return to the caller. * with a tail call that will include return to the caller.
* REQUIRES console_t pointer in x0 and a valid return address in x30. * REQUIRES console_t pointer in x0 and a valid return address in x30.
*/ */
/*
* The USE_FINISH_CONSOLE_REG_2 guard is introduced to allow selection between
* the 2 variants of the finish_console_register macro and will be removed
* once the deprecated variant is removed.
*/
#ifndef USE_FINISH_CONSOLE_REG_2
#if !ERROR_DEPRECATED
/* This version of the macro is deprecated. Use the new version */
.macro finish_console_register _driver
/*
* Add these weak definitions so we will automatically write a 0 if the
* function doesn't exist. I'd rather use .ifdef but that only works if
* the function was defined (not just declared .global) above this point
* in the file, which we can't guarantee.
*/
.weak console_\_driver\()_putc
.weak console_\_driver\()_getc
.weak console_\_driver\()_flush
/* Don't use adrp on weak funcs! See GNU ld bugzilla issue 22589. */
ldr r1, =console_\_driver\()_putc
str r1, [r0, #CONSOLE_T_PUTC]
ldr r1, =console_\_driver\()_getc
str r1, [r0, #CONSOLE_T_GETC]
ldr r1, =console_\_driver\()_flush
str r1, [r0, #CONSOLE_T_FLUSH]
mov r1, #(CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH)
str r1, [r0, #CONSOLE_T_FLAGS]
b console_register
.endm
#endif /* ERROR_DEPRECATED */
#else /* USE_FINISH_CONSOLE_REG_2 */
/* The new version of the macro not using weak references */
.macro finish_console_register _driver, putc=0, getc=0, flush=0 .macro finish_console_register _driver, putc=0, getc=0, flush=0
/* /*
* If any of the callback is not specified or set as 0, then the * If any of the callback is not specified or set as 0, then the
...@@ -80,5 +47,5 @@ ...@@ -80,5 +47,5 @@
str r1, [r0, #CONSOLE_T_FLAGS] str r1, [r0, #CONSOLE_T_FLAGS]
b console_register b console_register
.endm .endm
#endif /* USE_FINISH_CONSOLE_REG_2 */
#endif /* CONSOLE_MACROS_S */ #endif /* CONSOLE_MACROS_S */
/* /*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -17,39 +17,6 @@ ...@@ -17,39 +17,6 @@
* with a tail call that will include return to the caller. * with a tail call that will include return to the caller.
* REQUIRES console_t pointer in x0 and a valid return address in x30. * REQUIRES console_t pointer in x0 and a valid return address in x30.
*/ */
/*
* The USE_FINISH_CONSOLE_REG_2 guard is introduced to allow selection between
* the 2 variants of the finish_console_register macro and will be removed
* once the deprecated variant is removed.
*/
#ifndef USE_FINISH_CONSOLE_REG_2
#if !ERROR_DEPRECATED
/* This version of the macro is deprecated. Use the new version */
.macro finish_console_register _driver
/*
* Add these weak definitions so we will automatically write a 0 if the
* function doesn't exist. I'd rather use .ifdef but that only works if
* the function was defined (not just declared .global) above this point
* in the file, which we can't guarantee.
*/
.weak console_\_driver\()_putc
.weak console_\_driver\()_getc
.weak console_\_driver\()_flush
/* Don't use adrp on weak funcs! See GNU ld bugzilla issue 22589. */
ldr x1, =console_\_driver\()_putc
str x1, [x0, #CONSOLE_T_PUTC]
ldr x1, =console_\_driver\()_getc
str x1, [x0, #CONSOLE_T_GETC]
ldr x1, =console_\_driver\()_flush
str x1, [x0, #CONSOLE_T_FLUSH]
mov x1, #(CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH)
str x1, [x0, #CONSOLE_T_FLAGS]
b console_register
.endm
#endif /* ERROR_DEPRECATED */
#else /* USE_FINISH_CONSOLE_REG_2 */
/* The new version of the macro not using weak references */
.macro finish_console_register _driver, putc=0, getc=0, flush=0 .macro finish_console_register _driver, putc=0, getc=0, flush=0
/* /*
* If any of the callback is not specified or set as 0, then the * If any of the callback is not specified or set as 0, then the
...@@ -83,6 +50,5 @@ ...@@ -83,6 +50,5 @@
str x1, [x0, #CONSOLE_T_FLAGS] str x1, [x0, #CONSOLE_T_FLAGS]
b console_register b console_register
.endm .endm
#endif /* USE_FINISH_CONSOLE_REG_2 */
#endif /* CONSOLE_MACROS_S */ #endif /* CONSOLE_MACROS_S */
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#include "imx_uart.h" #include "imx_uart.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#include "imx_uart.h" #include "imx_uart.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#include "imx8_lpuart.h" #include "imx8_lpuart.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S> #include <console_macros.S>
#include <assert_macros.S> #include <assert_macros.S>
#include "ls_16550.h" #include "ls_16550.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment