sq_bl31_setup.c 931 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <arch.h>
#include <arch_helpers.h>
#include <platform_def.h>
#include <assert.h>
#include <bl_common.h>
12
#include <pl011.h>
13
14
#include <debug.h>

15
16
static console_pl011_t console;

17
18
19
void bl31_early_platform_setup(bl31_params_t *from_bl2,
				void *plat_params_from_bl2)
{
20
21
22
23
24
25
26
27
	/* Initialize the console to provide early debug support */
	(void)console_pl011_register(PLAT_SQ_BOOT_UART_BASE,
			       PLAT_SQ_BOOT_UART_CLK_IN_HZ,
			       SQ_CONSOLE_BAUDRATE, &console);

	console_set_scope(&console.console, CONSOLE_FLAG_BOOT |
			  CONSOLE_FLAG_RUNTIME);

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	/* There are no parameters from BL2 if BL31 is a reset vector */
	assert(from_bl2 == NULL);
	assert(plat_params_from_bl2 == NULL);
}

void bl31_platform_setup(void)
{
}

void bl31_plat_runtime_setup(void)
{
}

void bl31_plat_arch_setup(void)
{
}