blob: ac5f11e376fa090fe45e4185a43864d04aa6db0f [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
wdenk012771d2002-03-08 21:31:05 +00002/*
3 * (C) Copyright 2001
4 * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
wdenk012771d2002-03-08 21:31:05 +00005 */
6
7/*
8 * Watchdog functions and macros.
9 */
10#ifndef _WATCHDOG_H_
11#define _WATCHDOG_H_
12
Stefan Roese661cdaa2022-09-02 13:57:49 +020013#include <cyclic.h>
14
Simon Glassa6741bc2013-03-05 14:39:42 +000015/*
16 * Reset the watchdog timer, always returns 0
17 *
18 * This function is here since it is shared between board_f() and board_r(),
19 * and the legacy arch/<arch>/board.c code.
20 */
21int init_func_watchdog_reset(void);
Simon Glassa6741bc2013-03-05 14:39:42 +000022
Simon Glass9be2e792016-05-14 18:49:35 -060023#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
Simon Glassa6741bc2013-03-05 14:39:42 +000024#define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init,
25#define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset,
26#else
27#define INIT_FUNC_WATCHDOG_INIT
28#define INIT_FUNC_WATCHDOG_RESET
29#endif
30
wdenk012771d2002-03-08 21:31:05 +000031#if defined(CONFIG_HW_WATCHDOG) && defined(CONFIG_WATCHDOG)
32# error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."
33#endif
34
35/*
wdenk012771d2002-03-08 21:31:05 +000036 * Prototypes from $(CPU)/cpu.c.
37 */
38
Stefan Roese8695fbb2022-09-02 14:10:49 +020039#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
Tom Rinia6720762013-01-14 13:10:07 -070040 void hw_watchdog_init(void);
41#endif
Boschung, Rainer0f8062b2014-06-03 09:05:14 +020042
Stefan Roese8695fbb2022-09-02 14:10:49 +020043#if defined(CONFIG_MPC85xx)
Boschung, Rainer0f8062b2014-06-03 09:05:14 +020044 void init_85xx_watchdog(void);
45#endif
wdenk012771d2002-03-08 21:31:05 +000046#endif /* _WATCHDOG_H_ */