xref: /rk3399_ARM-atf/plat/arm/board/fvp/fvp_bl1_setup.c (revision fd7b287cbe9147ca9e07dd9f30c49c58bbdd92a8)
1 /*
2  * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <common/tbbr/tbbr_img_def.h>
8 #include <drivers/arm/sp805.h>
9 #include <plat/arm/common/plat_arm.h>
10 #include <plat/arm/common/arm_def.h>
11 #include <plat/common/platform.h>
12 #include "fvp_private.h"
13 
14 /*******************************************************************************
15  * Perform any BL1 specific platform actions.
16  ******************************************************************************/
17 void bl1_early_platform_setup(void)
18 {
19 	arm_bl1_early_platform_setup();
20 
21 	/* Initialize the platform config for future decision making */
22 	fvp_config_setup();
23 
24 	/*
25 	 * Initialize Interconnect for this cluster during cold boot.
26 	 * No need for locks as no other CPU is active.
27 	 */
28 	fvp_interconnect_init();
29 	/*
30 	 * Enable coherency in Interconnect for the primary CPU's cluster.
31 	 */
32 	fvp_interconnect_enable();
33 }
34 
35 void plat_arm_secure_wdt_start(void)
36 {
37 	sp805_start(ARM_SP805_TWDG_BASE, ARM_TWDG_LOAD_VAL);
38 }
39 
40 void plat_arm_secure_wdt_stop(void)
41 {
42 	sp805_stop(ARM_SP805_TWDG_BASE);
43 }
44