#ifndef _WDT_H_
#define _WDT_H_
+struct udevice;
+
/*
* Implement a simple watchdog uclass. Watchdog is basically a timer that
* is used to detect or recover from malfunction. During normal operation
int wdt_stop(struct udevice *dev);
/*
+ * Stop all registered watchdog devices.
+ *
+ * @return: 0 if ok, first error encountered otherwise (but wdt_stop()
+ * is still called on following devices)
+ */
+int wdt_stop_all(void);
+
+/*
* Reset the timer, typically restoring the counter to
* the value configured by start()
*
*
* @dev: WDT Device
* @flags: Driver specific flags
- * @return 0 if OK -ve on error. If wdt action is system reset,
+ * Return: 0 if OK -ve on error. If wdt action is system reset,
* this function may never return.
*/
int wdt_expire_now(struct udevice *dev, ulong flags);
int (*expire_now)(struct udevice *dev, ulong flags);
};
+int initr_watchdog(void);
+
#endif /* _WDT_H_ */