summaryrefslogtreecommitdiff
path: root/chip/mt_scp/mt8183/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/mt_scp/mt8183/watchdog.c')
-rw-r--r--chip/mt_scp/mt8183/watchdog.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/chip/mt_scp/mt8183/watchdog.c b/chip/mt_scp/mt8183/watchdog.c
deleted file mode 100644
index 74e2cad8e5..0000000000
--- a/chip/mt_scp/mt8183/watchdog.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* Watchdog driver */
-
-#include "common.h"
-#include "hooks.h"
-#include "panic.h"
-#include "registers.h"
-#include "watchdog.h"
-
-void watchdog_reload(void)
-{
- SCP_WDT_RELOAD = SCP_WDT_RELOAD_VALUE;
-}
-DECLARE_HOOK(HOOK_TICK, watchdog_reload, HOOK_PRIO_DEFAULT);
-
-int watchdog_init(void)
-{
- const uint32_t watchdog_timeout =
- SCP_WDT_PERIOD(CONFIG_WATCHDOG_PERIOD_MS);
-
- /* Disable watchdog */
- SCP_WDT_CFG = 0;
- /* Enable watchdog */
- SCP_WDT_CFG = SCP_WDT_ENABLE | watchdog_timeout;
- /* Reload watchdog */
- watchdog_reload();
-
- return EC_SUCCESS;
-}