diff --git a/drivers/arm/pl011/aarch32/pl011_console.S b/drivers/arm/pl011/aarch32/pl011_console.S index e9f95f2..a85a937 100644 --- a/drivers/arm/pl011/aarch32/pl011_console.S +++ b/drivers/arm/pl011/aarch32/pl011_console.S @@ -6,7 +6,6 @@ #include #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/arm/pl011/aarch64/pl011_console.S b/drivers/arm/pl011/aarch64/pl011_console.S index aaa39c1..52f2503 100644 --- a/drivers/arm/pl011/aarch64/pl011_console.S +++ b/drivers/arm/pl011/aarch64/pl011_console.S @@ -6,7 +6,6 @@ #include #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/cadence/uart/aarch64/cdns_console.S b/drivers/cadence/uart/aarch64/cdns_console.S index 43d08f4..8b38379 100644 --- a/drivers/cadence/uart/aarch64/cdns_console.S +++ b/drivers/cadence/uart/aarch64/cdns_console.S @@ -6,7 +6,6 @@ #include #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/console/aarch64/skeleton_console.S b/drivers/console/aarch64/skeleton_console.S index 3993eef..1ba2196 100644 --- a/drivers/console/aarch64/skeleton_console.S +++ b/drivers/console/aarch64/skeleton_console.S @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ #include -#define USE_FINISH_CONSOLE_REG_2 #include /* diff --git a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S b/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S index 4c14b69..fd04c2e 100644 --- a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S +++ b/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S @@ -5,7 +5,6 @@ */ #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/marvell/uart/a3700_console.S b/drivers/marvell/uart/a3700_console.S index cc3855d..da1ce35 100644 --- a/drivers/marvell/uart/a3700_console.S +++ b/drivers/marvell/uart/a3700_console.S @@ -7,7 +7,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/meson/console/aarch64/meson_console.S b/drivers/meson/console/aarch64/meson_console.S index 5cf9b88..22d0773 100644 --- a/drivers/meson/console/aarch64/meson_console.S +++ b/drivers/meson/console/aarch64/meson_console.S @@ -6,7 +6,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/drivers/st/uart/aarch32/stm32_console.S b/drivers/st/uart/aarch32/stm32_console.S index 4d00e68..39e449b 100644 --- a/drivers/st/uart/aarch32/stm32_console.S +++ b/drivers/st/uart/aarch32/stm32_console.S @@ -5,7 +5,6 @@ */ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include #include diff --git a/drivers/ti/uart/aarch64/16550_console.S b/drivers/ti/uart/aarch64/16550_console.S index 3180593..55db503 100644 --- a/drivers/ti/uart/aarch64/16550_console.S +++ b/drivers/ti/uart/aarch64/16550_console.S @@ -7,7 +7,6 @@ #include #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include diff --git a/include/arch/aarch32/console_macros.S b/include/arch/aarch32/console_macros.S index ed5088d..070be84 100644 --- a/include/arch/aarch32/console_macros.S +++ b/include/arch/aarch32/console_macros.S @@ -1,5 +1,5 @@ /* - * 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 */ @@ -17,39 +17,6 @@ * with a tail call that will include return to the caller. * 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 /* * If any of the callback is not specified or set as 0, then the @@ -80,5 +47,5 @@ str r1, [r0, #CONSOLE_T_FLAGS] b console_register .endm -#endif /* USE_FINISH_CONSOLE_REG_2 */ + #endif /* CONSOLE_MACROS_S */ diff --git a/include/arch/aarch64/console_macros.S b/include/arch/aarch64/console_macros.S index 90ef420..3285d85 100644 --- a/include/arch/aarch64/console_macros.S +++ b/include/arch/aarch64/console_macros.S @@ -1,5 +1,5 @@ /* - * 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 */ @@ -17,39 +17,6 @@ * with a tail call that will include return to the caller. * 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 /* * If any of the callback is not specified or set as 0, then the @@ -83,6 +50,5 @@ str x1, [x0, #CONSOLE_T_FLAGS] b console_register .endm -#endif /* USE_FINISH_CONSOLE_REG_2 */ #endif /* CONSOLE_MACROS_S */ diff --git a/plat/imx/common/aarch32/imx_uart_console.S b/plat/imx/common/aarch32/imx_uart_console.S index e526d9c..1c729b1 100644 --- a/plat/imx/common/aarch32/imx_uart_console.S +++ b/plat/imx/common/aarch32/imx_uart_console.S @@ -6,7 +6,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include #include "imx_uart.h" diff --git a/plat/imx/common/imx_uart_console.S b/plat/imx/common/imx_uart_console.S index 03ec313..3bdeea2 100644 --- a/plat/imx/common/imx_uart_console.S +++ b/plat/imx/common/imx_uart_console.S @@ -6,7 +6,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include #include "imx_uart.h" diff --git a/plat/imx/common/lpuart_console.S b/plat/imx/common/lpuart_console.S index 0162868..d8dac2c 100644 --- a/plat/imx/common/lpuart_console.S +++ b/plat/imx/common/lpuart_console.S @@ -6,7 +6,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include #include "imx8_lpuart.h" diff --git a/plat/layerscape/common/aarch64/ls_console.S b/plat/layerscape/common/aarch64/ls_console.S index ec4390a..a3c270d 100644 --- a/plat/layerscape/common/aarch64/ls_console.S +++ b/plat/layerscape/common/aarch64/ls_console.S @@ -6,7 +6,6 @@ #include #include -#define USE_FINISH_CONSOLE_REG_2 #include #include #include "ls_16550.h"