123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #ifndef _WATCHDOG_H_
- #define _WATCHDOG_H_
- #if !defined(__ASSEMBLY__)
- int init_func_watchdog_reset(void);
- #endif
- #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
- #define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init,
- #define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset,
- #else
- #define INIT_FUNC_WATCHDOG_INIT
- #define INIT_FUNC_WATCHDOG_RESET
- #endif
- #if defined(CONFIG_HW_WATCHDOG) && defined(CONFIG_WATCHDOG)
- # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."
- #endif
- #ifdef CONFIG_HW_WATCHDOG
- #if defined(__ASSEMBLY__)
- #define WATCHDOG_RESET bl hw_watchdog_reset
- #else
- extern void hw_watchdog_reset(void);
- #define WATCHDOG_RESET hw_watchdog_reset
- #endif
- #else
-
- #if defined(CONFIG_WATCHDOG)
- #if defined(__ASSEMBLY__)
- #define WATCHDOG_RESET bl watchdog_reset
- #else
- extern void watchdog_reset(void);
- #define WATCHDOG_RESET watchdog_reset
- #endif
- #else
-
- #if defined(__ASSEMBLY__)
- #define WATCHDOG_RESET
- #else
- #define WATCHDOG_RESET() {}
- #endif
- #endif
- #endif
- #if (defined(CONFIG_8xx) || defined(CONFIG_MPC860)) && !defined(__ASSEMBLY__)
- void reset_8xx_watchdog(volatile immap_t *immr);
- #endif
- #if defined(CONFIG_5xx) && !defined(__ASSEMBLY__)
- void reset_5xx_watchdog(volatile immap_t *immr);
- #endif
- #if defined(CONFIG_MPC5xxx) && !defined(__ASSEMBLY__)
- void reset_5xxx_watchdog(void);
- #endif
- #if defined(CONFIG_4xx) && !defined(__ASSEMBLY__)
- void reset_4xx_watchdog(void);
- #endif
- #if defined(CONFIG_HW_WATCHDOG) && !defined(__ASSEMBLY__)
- void hw_watchdog_init(void);
- #endif
- #if defined(CONFIG_MPC85xx) && !defined(__ASSEMBLY__)
- void init_85xx_watchdog(void);
- #endif
- #endif
|