diff options
| author | Ashok Reddy Soma <[email protected]> | 2021-09-28 11:31:59 +0530 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2021-09-30 12:30:38 +0200 |
| commit | dced079c53b283e15f04282f405de410a9be584d (patch) | |
| tree | c390982c3927bfafa8d4294501f2889dc440544f /drivers | |
| parent | 8c287ed8c3a392d2fd717054511b53851bce02f0 (diff) | |
watchdog: versal: Add support for expire now
Wdt expire command makes the wdt to count least possible ticks(1)
and expires immediately. Add expire_now option to the xlnx_wwdt_ops
and implement it by calling xlnx_wwdt_start() with minimum possible
count(1).
Signed-off-by: Ashok Reddy Soma <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/watchdog/xilinx_wwdt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c index d8b2ae72483..d582e3cc8f4 100644 --- a/drivers/watchdog/xilinx_wwdt.c +++ b/drivers/watchdog/xilinx_wwdt.c @@ -144,6 +144,11 @@ static int xlnx_wwdt_start(struct udevice *dev, u64 timeout_ms, ulong flags) return 0; } +static int xlnx_wwdt_expire_now(struct udevice *dev, ulong flags) +{ + return xlnx_wwdt_start(dev, XWT_WWDT_CNT_MIN, flags); +} + static int xlnx_wwdt_probe(struct udevice *dev) { int ret; @@ -182,6 +187,7 @@ static const struct wdt_ops xlnx_wwdt_ops = { .start = xlnx_wwdt_start, .reset = xlnx_wwdt_reset, .stop = xlnx_wwdt_stop, + .expire_now = xlnx_wwdt_expire_now, }; static const struct udevice_id xlnx_wwdt_ids[] = { |
