summaryrefslogtreecommitdiff
path: root/plat/arm/common/arm_bl1_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/arm/common/arm_bl1_setup.c')
-rw-r--r--plat/arm/common/arm_bl1_setup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plat/arm/common/arm_bl1_setup.c b/plat/arm/common/arm_bl1_setup.c
index 887223cf..79c7d944 100644
--- a/plat/arm/common/arm_bl1_setup.c
+++ b/plat/arm/common/arm_bl1_setup.c
@@ -35,6 +35,7 @@
#include <console.h>
#include <platform_def.h>
#include <plat_arm.h>
+#include <sp805.h>
#include "../../../bl1/bl1_private.h"
@@ -74,6 +75,11 @@ void arm_bl1_early_platform_setup(void)
{
const size_t bl1_size = BL1_RAM_LIMIT - BL1_RAM_BASE;
+#if !ARM_DISABLE_TRUSTED_WDOG
+ /* Enable watchdog */
+ sp805_start(ARM_SP805_TWDG_BASE, ARM_TWDG_LOAD_VAL);
+#endif
+
/* Initialize the console to provide early debug support */
console_init(PLAT_ARM_BOOT_UART_BASE, PLAT_ARM_BOOT_UART_CLK_IN_HZ,
ARM_CONSOLE_BAUDRATE);
@@ -147,6 +153,11 @@ void bl1_platform_setup(void)
void bl1_plat_prepare_exit(entry_point_info_t *ep_info)
{
+#if !ARM_DISABLE_TRUSTED_WDOG
+ /* Disable watchdog before leaving BL1 */
+ sp805_stop(ARM_SP805_TWDG_BASE);
+#endif
+
#ifdef EL3_PAYLOAD_BASE
/*
* Program the EL3 payload's entry point address into the CPUs mailbox