From: Thomas Schaefer Date: Thu, 8 Aug 2019 08:00:31 +0000 (+0800) Subject: watchdog: sp805_wdt: add expire_now method X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=412e25ab5faafcfe8bca263b44e347566075317e;p=u-boot.git watchdog: sp805_wdt: add expire_now method Add sp805_wdt_expire_now function. expire_now method is required by U_BOOT_DRIVER. Signed-off-by: Thomas Schaefer Signed-off-by: Zhao Qiang Reviewed-by: Priyanka Jain --- diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 966128216f..f1e781e4e6 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[] = {