watchdog.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2001
  4. * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
  5. */
  6. /*
  7. * Watchdog functions and macros.
  8. */
  9. #ifndef _WATCHDOG_H_
  10. #define _WATCHDOG_H_
  11. #include <cyclic.h>
  12. /*
  13. * Reset the watchdog timer, always returns 0
  14. *
  15. * This function is here since it is shared between board_f() and board_r(),
  16. * and the legacy arch/<arch>/board.c code.
  17. */
  18. int init_func_watchdog_reset(void);
  19. #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
  20. #define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init,
  21. #define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset,
  22. #else
  23. #define INIT_FUNC_WATCHDOG_INIT
  24. #define INIT_FUNC_WATCHDOG_RESET
  25. #endif
  26. #if defined(CONFIG_HW_WATCHDOG) && defined(CONFIG_WATCHDOG)
  27. # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."
  28. #endif
  29. /*
  30. * Prototypes from $(CPU)/cpu.c.
  31. */
  32. #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
  33. void hw_watchdog_init(void);
  34. #endif
  35. #if defined(CONFIG_MPC85xx)
  36. void init_85xx_watchdog(void);
  37. #endif
  38. #endif /* _WATCHDOG_H_ */