mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-17 09:57:01 +02:00
The BL1 stage setup code for ARM platforms sets up the SP805 watchdog controller as the secure watchdog. But not all ARM platforms use SP805 as the secure watchdog controller. So introduce two new ARM platform code specific wrapper functions to start and stop the secure watchdog. These functions then replace the calls to SP805 driver in common BL1 setup code. All the ARM platforms implement these wrapper functions by either calling into SP805 driver or the SBSA watchdog driver. Change-Id: I1a9a11b124cf3fac2a84f22ca40acd440a441257 Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
/*
|
|
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <common/bl_common.h>
|
|
#include <common/debug.h>
|
|
#include <plat/arm/common/plat_arm.h>
|
|
#include <plat/arm/soc/common/soc_css.h>
|
|
#include <plat/arm/common/arm_def.h>
|
|
#include <drivers/arm/sp805.h>
|
|
#include <sgm_plat_config.h>
|
|
|
|
void bl1_early_platform_setup(void)
|
|
{
|
|
|
|
/* Initialize the console before anything else */
|
|
arm_bl1_early_platform_setup();
|
|
|
|
/* Initialize the platform configuration structure */
|
|
plat_config_init();
|
|
|
|
#if !HW_ASSISTED_COHERENCY
|
|
/*
|
|
* Initialize Interconnect for this cluster during cold boot.
|
|
* No need for locks as no other CPU is active.
|
|
*/
|
|
plat_arm_interconnect_init();
|
|
/*
|
|
* Enable Interconnect coherency for the primary CPU's cluster.
|
|
*/
|
|
plat_arm_interconnect_enter_coherency();
|
|
#endif
|
|
}
|
|
|
|
void plat_arm_secure_wdt_start(void)
|
|
{
|
|
sp805_start(ARM_SP805_TWDG_BASE, ARM_TWDG_LOAD_VAL);
|
|
}
|
|
|
|
void plat_arm_secure_wdt_stop(void)
|
|
{
|
|
sp805_stop(ARM_SP805_TWDG_BASE);
|
|
}
|