1 /* 2 * Copyright (c) 2021, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <common/bl_common.h> 8 #include <common/debug.h> 9 #include <drivers/arm/pl011.h> 10 #include <drivers/console.h> 11 #include <plat/arm/common/plat_arm.h> 12 #include <platform_def.h> 13 14 /******************************************************************************* 15 * Initialize the UART 16 ******************************************************************************/ 17 static console_t arm_trp_runtime_console; 18 arm_trp_early_platform_setup(void)19void arm_trp_early_platform_setup(void) 20 { 21 /* 22 * Initialize a different console than already in use to display 23 * messages from trp 24 */ 25 int rc = console_pl011_register(PLAT_ARM_TRP_UART_BASE, 26 PLAT_ARM_TRP_UART_CLK_IN_HZ, 27 ARM_CONSOLE_BAUDRATE, 28 &arm_trp_runtime_console); 29 if (rc == 0) { 30 panic(); 31 } 32 33 console_set_scope(&arm_trp_runtime_console, 34 CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME); 35 } 36 trp_early_platform_setup(void)37void trp_early_platform_setup(void) 38 { 39 arm_trp_early_platform_setup(); 40 } 41