[U-Boot] [PATCH 2/2] watchdog: sp805_wdt: add expire_now method
Qiang Zhao
qiang.zhao at nxp.com
Thu Aug 8 08:00:31 UTC 2019
From: Thomas Schaefer <thomas.schaefer at kontron.com>
expire_now method is required by U_BOOT_DRIVER. Add
sp805_wdt_expire_now function.
Signed-off-by: Thomas Schaefer <thomas.schaefer at kontron.com>
Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
---
drivers/watchdog/sp805_wdt.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 9661282..f1e781e 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -87,9 +87,16 @@ static int sp805_wdt_stop(struct udevice *dev)
return 0;
}
+static int sp805_wdt_expire_now(struct udevice *dev, ulong flags)
+{
+ sp805_wdt_start(dev, 0, flags);
+
+ return 0;
+}
+
static int sp805_wdt_probe(struct udevice *dev)
{
- debug("%s: Probing wdt%u\n", __func__, dev->seq);
+ debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev->seq);
return 0;
}
@@ -109,6 +116,7 @@ static const struct wdt_ops sp805_wdt_ops = {
.start = sp805_wdt_start,
.reset = sp805_wdt_reset,
.stop = sp805_wdt_stop,
+ .expire_now = sp805_wdt_expire_now,
};
static const struct udevice_id sp805_wdt_ids[] = {
--
2.7.4
More information about the U-Boot
mailing list