2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
11 #include <platform_def.h>
13 /*******************************************************************************
14 * Functions that set up the console
15 ******************************************************************************/
17 static console_pl011_t arm_boot_console
;
18 static console_pl011_t arm_runtime_console
;
21 /* Initialize the console to provide early debug support */
22 void __init
arm_console_boot_init(void)
25 int rc
= console_pl011_register(PLAT_ARM_BOOT_UART_BASE
,
26 PLAT_ARM_BOOT_UART_CLK_IN_HZ
,
31 * The crash console doesn't use the multi console API, it uses
32 * the core console functions directly. It is safe to call panic
33 * and let it print debug information.
38 console_set_scope(&arm_boot_console
.console
, CONSOLE_FLAG_BOOT
);
40 (void)console_init(PLAT_ARM_BOOT_UART_BASE
,
41 PLAT_ARM_BOOT_UART_CLK_IN_HZ
,
42 ARM_CONSOLE_BAUDRATE
);
43 #endif /* MULTI_CONSOLE_API */
46 void arm_console_boot_end(void)
48 (void)console_flush();
51 (void)console_unregister(&arm_boot_console
.console
);
54 #endif /* MULTI_CONSOLE_API */
57 /* Initialize the runtime console */
58 void arm_console_runtime_init(void)
61 int rc
= console_pl011_register(PLAT_ARM_BL31_RUN_UART_BASE
,
62 PLAT_ARM_BL31_RUN_UART_CLK_IN_HZ
,
64 &arm_runtime_console
);
68 console_set_scope(&arm_runtime_console
.console
, CONSOLE_FLAG_RUNTIME
);
70 (void)console_init(PLAT_ARM_BL31_RUN_UART_BASE
,
71 PLAT_ARM_BL31_RUN_UART_CLK_IN_HZ
,
72 ARM_CONSOLE_BAUDRATE
);
73 #endif /* MULTI_CONSOLE_API */
76 void arm_console_runtime_end(void)
78 (void)console_flush();
81 (void)console_unregister(&arm_runtime_console
.console
);
84 #endif /* MULTI_CONSOLE_API */