summaryrefslogtreecommitdiff
path: root/chip/it83xx/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/it83xx/watchdog.c')
-rw-r--r--chip/it83xx/watchdog.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/chip/it83xx/watchdog.c b/chip/it83xx/watchdog.c
index f0e200c4ac..b1e45127f0 100644
--- a/chip/it83xx/watchdog.c
+++ b/chip/it83xx/watchdog.c
@@ -1,4 +1,4 @@
-/* Copyright 2013 The Chromium OS Authors. All rights reserved.
+/* Copyright 2013 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -24,9 +24,9 @@ static int wdt_warning_fired;
*/
/* Magic value to tickle the watchdog register. */
-#define ITE83XX_WATCHDOG_MAGIC_WORD 0x5C
+#define ITE83XX_WATCHDOG_MAGIC_WORD 0x5C
/* Start to print warning message. */
-#define ITE83XX_WATCHDOG_WARNING_MS CONFIG_AUX_TIMER_PERIOD_MS
+#define ITE83XX_WATCHDOG_WARNING_MS CONFIG_AUX_TIMER_PERIOD_MS
/* The interval to print warning message at critical period. */
#define ITE83XX_WATCHDOG_CRITICAL_MS 30
@@ -39,7 +39,7 @@ static void watchdog_set_warning_timer(int32_t ms, int init)
void watchdog_warning_irq(void)
{
#ifdef CONFIG_SOFTWARE_PANIC
- struct panic_data * const pdata_ptr = get_panic_data_write();
+ struct panic_data *const pdata_ptr = get_panic_data_write();
#if defined(CHIP_CORE_NDS32)
pdata_ptr->nds_n8.ipc = get_ipc();
@@ -64,10 +64,10 @@ void watchdog_warning_irq(void)
* LP = PC+4 after a jump and link instruction (jal).
*/
panic_printf("Pre-WDT warning! IPC:%08x LP:%08x TASK_ID:%d\n",
- get_ipc(), ilp, task_get_current());
+ get_ipc(), ilp, task_get_current());
#elif defined(CHIP_CORE_RISCV)
panic_printf("Pre-WDT warning! MEPC:%08x RA:%08x TASK_ID:%d\n",
- get_mepc(), ira, task_get_current());
+ get_mepc(), ira, task_get_current());
#endif
if (!wdt_warning_fired++)
@@ -93,6 +93,7 @@ void watchdog_reload(void)
}
}
DECLARE_HOOK(HOOK_TICK, watchdog_reload, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_SYSJUMP, watchdog_reload, HOOK_PRIO_LAST);
int watchdog_init(void)
{