diff options
author | Julius Werner <jwerner@chromium.org> | 2018-11-27 17:50:28 -0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2018-12-06 16:13:50 -0800 |
commit | 985ee0b7e8d039105de48f60c0195f391f86a625 (patch) | |
tree | 3bc1b97439d2725dc57e2775b813c6f8543aa613 /drivers/console | |
parent | 0f8aee4e45d3e74f5ebb385c8afcdee6c3b4c73a (diff) | |
download | platform_external_arm-trusted-firmware-985ee0b7e8d039105de48f60c0195f391f86a625.tar.gz platform_external_arm-trusted-firmware-985ee0b7e8d039105de48f60c0195f391f86a625.tar.bz2 platform_external_arm-trusted-firmware-985ee0b7e8d039105de48f60c0195f391f86a625.zip |
drivers/console: Link console framework code by default
This patch makes the build system link the console framework code by
default, like it already does with other common libraries (e.g. cache
helpers). This should not make a difference in practice since TF is
linked with --gc-sections, so the linker will garbage collect all
functions and data that are not referenced by any other code. Thus, if a
platform doesn't want to include console code for size reasons and
doesn't make any references to console functions, the code will not be
included in the final binary.
To avoid compatibility issues with older platform ports, only make this
change for the MULTI_CONSOLE_API.
Change-Id: I153a9dbe680d57aadb860d1c829759ba701130d3
Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'drivers/console')
-rw-r--r-- | drivers/console/aarch32/console.S | 4 | ||||
-rw-r--r-- | drivers/console/aarch32/multi_console.S | 4 | ||||
-rw-r--r-- | drivers/console/aarch64/console.S | 4 | ||||
-rw-r--r-- | drivers/console/aarch64/multi_console.S | 4 |
4 files changed, 14 insertions, 2 deletions
diff --git a/drivers/console/aarch32/console.S b/drivers/console/aarch32/console.S index f90960946..1c380944d 100644 --- a/drivers/console/aarch32/console.S +++ b/drivers/console/aarch32/console.S @@ -5,7 +5,9 @@ */ #if MULTI_CONSOLE_API - #include "multi_console.S" + #if ERROR_DEPRECATED + #error "console.S is deprecated, platforms should no longer link it explicitly" + #endif #else #include "deprecated_console.S" #endif diff --git a/drivers/console/aarch32/multi_console.S b/drivers/console/aarch32/multi_console.S index e23b20e56..713dc3c7d 100644 --- a/drivers/console/aarch32/multi_console.S +++ b/drivers/console/aarch32/multi_console.S @@ -4,6 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#if MULTI_CONSOLE_API + #include <asm_macros.S> #include <assert_macros.S> #include <console.h> @@ -316,3 +318,5 @@ flush_done: mov r0, r5 pop {r5-r6, pc} endfunc console_flush + +#endif /* MULTI_CONSOLE_API */ diff --git a/drivers/console/aarch64/console.S b/drivers/console/aarch64/console.S index f847ed597..669b31a66 100644 --- a/drivers/console/aarch64/console.S +++ b/drivers/console/aarch64/console.S @@ -5,7 +5,9 @@ */ #if MULTI_CONSOLE_API -#include "multi_console.S" +#if ERROR_DEPRECATED +#error "console.S is deprecated, platforms should no longer link it explicitly" +#endif #else #include "deprecated_console.S" #endif diff --git a/drivers/console/aarch64/multi_console.S b/drivers/console/aarch64/multi_console.S index 95423b027..40d500d2f 100644 --- a/drivers/console/aarch64/multi_console.S +++ b/drivers/console/aarch64/multi_console.S @@ -4,6 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#if MULTI_CONSOLE_API + #include <asm_macros.S> #include <assert_macros.S> #include <console.h> @@ -323,3 +325,5 @@ flush_done: ldp x30, xzr, [sp], #16 ret endfunc console_flush + +#endif /* MULTI_CONSOLE_API */ |