1 // SPDX-License-Identifier: GPL-2.0
3 * Watchdog driver for Broadcom BCM2835
5 * Copyright (C) 2017 Paolo Pisati <p.pisati@gmail.com>
9 #include <efi_loader.h>
11 #include <asm/arch/wdog.h>
13 #define SECS_TO_WDOG_TICKS(x) ((x) << 16)
14 #define MAX_TIMEOUT 0xf /* ~15s */
16 static __efi_runtime_data bool enabled = true;
18 extern void reset_cpu(ulong ticks);
20 void hw_watchdog_reset(void)
23 reset_cpu(SECS_TO_WDOG_TICKS(MAX_TIMEOUT));
26 void hw_watchdog_init(void)
31 void __efi_runtime hw_watchdog_disable(void)