1c35d59a3SSumit Garg /* 2c35d59a3SSumit Garg * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. 3c35d59a3SSumit Garg * 4c35d59a3SSumit Garg * SPDX-License-Identifier: BSD-3-Clause 5c35d59a3SSumit Garg */ 6c35d59a3SSumit Garg 7c35d59a3SSumit Garg #include <arch.h> 8c35d59a3SSumit Garg #include <arch_helpers.h> 9c35d59a3SSumit Garg #include <platform_def.h> 10c35d59a3SSumit Garg #include <assert.h> 11c35d59a3SSumit Garg #include <bl_common.h> 12*67b40070SSumit Garg #include <pl011.h> 13c35d59a3SSumit Garg #include <debug.h> 14c35d59a3SSumit Garg 15*67b40070SSumit Garg static console_pl011_t console; 16*67b40070SSumit Garg 17c35d59a3SSumit Garg void bl31_early_platform_setup(bl31_params_t *from_bl2, 18c35d59a3SSumit Garg void *plat_params_from_bl2) 19c35d59a3SSumit Garg { 20*67b40070SSumit Garg /* Initialize the console to provide early debug support */ 21*67b40070SSumit Garg (void)console_pl011_register(PLAT_SQ_BOOT_UART_BASE, 22*67b40070SSumit Garg PLAT_SQ_BOOT_UART_CLK_IN_HZ, 23*67b40070SSumit Garg SQ_CONSOLE_BAUDRATE, &console); 24*67b40070SSumit Garg 25*67b40070SSumit Garg console_set_scope(&console.console, CONSOLE_FLAG_BOOT | 26*67b40070SSumit Garg CONSOLE_FLAG_RUNTIME); 27*67b40070SSumit Garg 28c35d59a3SSumit Garg /* There are no parameters from BL2 if BL31 is a reset vector */ 29c35d59a3SSumit Garg assert(from_bl2 == NULL); 30c35d59a3SSumit Garg assert(plat_params_from_bl2 == NULL); 31c35d59a3SSumit Garg } 32c35d59a3SSumit Garg 33c35d59a3SSumit Garg void bl31_platform_setup(void) 34c35d59a3SSumit Garg { 35c35d59a3SSumit Garg } 36c35d59a3SSumit Garg 37c35d59a3SSumit Garg void bl31_plat_runtime_setup(void) 38c35d59a3SSumit Garg { 39c35d59a3SSumit Garg } 40c35d59a3SSumit Garg 41c35d59a3SSumit Garg void bl31_plat_arch_setup(void) 42c35d59a3SSumit Garg { 43c35d59a3SSumit Garg } 44