diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2019-04-24 10:48:10 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-04-24 10:48:10 +0000 |
commit | c3e4e0888d92f5e82fdd626e2eb5fdee3892bb2a (patch) | |
tree | 2363ee7819f268725a6ba70324beb5985e3d7d7b | |
parent | 5bec1e9264be254b25a06b5e8ea32ffde2a142b6 (diff) | |
parent | c9ac30a58a4bfb2392eeee3f2790c73709a95d18 (diff) | |
download | platform_external_arm-trusted-firmware-c3e4e0888d92f5e82fdd626e2eb5fdee3892bb2a.tar.gz platform_external_arm-trusted-firmware-c3e4e0888d92f5e82fdd626e2eb5fdee3892bb2a.tar.bz2 platform_external_arm-trusted-firmware-c3e4e0888d92f5e82fdd626e2eb5fdee3892bb2a.zip |
Merge changes from topic "av/console-register" into integration
* changes:
Console: Remove Arm console unregister on suspend
Console: Allow to register multiple times
-rw-r--r-- | drivers/console/multi_console.c | 6 | ||||
-rw-r--r-- | plat/arm/common/arm_console.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/console/multi_console.c b/drivers/console/multi_console.c index b5ff88b70..1ec81c3c6 100644 --- a/drivers/console/multi_console.c +++ b/drivers/console/multi_console.c @@ -20,8 +20,10 @@ int console_register(console_t *console) { /* Assert that the struct is not on the stack (common mistake). */ assert((console < stacks_start) || (console >= stacks_end)); - /* Assert that we won't make a circle in the list. */ - assert(!console_is_registered(console)); + + /* Check that we won't make a circle in the list. */ + if (console_is_registered(console) == 1) + return 1; console->next = console_list; console_list = console; diff --git a/plat/arm/common/arm_console.c b/plat/arm/common/arm_console.c index 84886b470..580b2ee01 100644 --- a/plat/arm/common/arm_console.c +++ b/plat/arm/common/arm_console.c @@ -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 */ @@ -80,9 +80,7 @@ void arm_console_runtime_end(void) { (void)console_flush(); -#if MULTI_CONSOLE_API - (void)console_unregister(&arm_runtime_console.console); -#else +#if !MULTI_CONSOLE_API console_uninit(); -#endif /* MULTI_CONSOLE_API */ +#endif /* !MULTI_CONSOLE_API */ } |