colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / include / wdt.h
index 0b5f05851a33c0e7527d30958a86e2214a9469e4..d2ccfbc62ef7cd14d5034120a7057a382c539862 100644 (file)
@@ -1,12 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright 2017 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef _WDT_H_
 #define _WDT_H_
 
+#include <dm.h>
+#include <log.h>
+#include <dm/read.h>
+
 /*
  * Implement a simple watchdog uclass. Watchdog is basically a timer that
  * is used to detect or recover from malfunction. During normal operation
  * Start the timer
  *
  * @dev: WDT Device
- * @timeout: Number of ticks before timer expires
+ * @timeout_ms: Number of ticks (milliseconds) before timer expires
  * @flags: Driver specific flags. This might be used to specify
  * which action needs to be executed when the timer expires
  * @return: 0 if OK, -ve on error
  */
-int wdt_start(struct udevice *dev, u64 timeout, ulong flags);
+int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags);
 
 /*
  * Stop the timer, thus disabling the Watchdog. Use wdt_start to start it again.
@@ -67,12 +70,12 @@ struct wdt_ops {
         * Start the timer
         *
         * @dev: WDT Device
-        * @timeout: Number of ticks before the timer expires
+        * @timeout_ms: Number of ticks (milliseconds) before the timer expires
         * @flags: Driver specific flags. This might be used to specify
         * which action needs to be executed when the timer expires
         * @return: 0 if OK, -ve on error
         */
-       int (*start)(struct udevice *dev, u64 timeout, ulong flags);
+       int (*start)(struct udevice *dev, u64 timeout_ms, ulong flags);
        /*
         * Stop the timer
         *
@@ -104,4 +107,6 @@ struct wdt_ops {
        int (*expire_now)(struct udevice *dev, ulong flags);
 };
 
+int initr_watchdog(void);
+
 #endif  /* _WDT_H_ */