Skip to content

Commit

Permalink
watchdog: versal: Add support for expire now
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ashoksoma authored and Michal Simek committed Sep 30, 2021
1 parent 8c287ed commit dced079
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/watchdog/xilinx_wwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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[] = {
Expand Down

0 comments on commit dced079

Please sign in to comment.