]> git.ipfire.org Git - thirdparty/u-boot.git/blame - include/watchdog.h
phycore_imx8mp: Move environment from include/config to board
[thirdparty/u-boot.git] / include / watchdog.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
012771d8
WD
2/*
3 * (C) Copyright 2001
4 * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
012771d8
WD
5 */
6
7/*
8 * Watchdog functions and macros.
9 */
10#ifndef _WATCHDOG_H_
11#define _WATCHDOG_H_
12
661cdaa7
SR
13#include <cyclic.h>
14
a6741bce
SG
15/*
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);
a6741bce 22
9be2e790 23#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
a6741bce
SG
24#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
012771d8
WD
31#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
012771d8
WD
35/*
36 * Prototypes from $(CPU)/cpu.c.
37 */
38
8695fbb3 39#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
a6720762
TR
40 void hw_watchdog_init(void);
41#endif
0f8062b2 42
8695fbb3 43#if defined(CONFIG_MPC85xx)
0f8062b2
BR
44 void init_85xx_watchdog(void);
45#endif
012771d8 46#endif /* _WATCHDOG_H_ */