diff options
author | Gregory Oakes <[email protected]> | 2023-03-16 15:13:12 -0500 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2023-04-22 12:53:58 +0200 |
commit | 4eda19cc8a29cde3580ed73bf11dc73b4e757697 (patch) | |
tree | 229df3428ec32b185b3abdea00073cbcd8934552 | |
parent | fe5631bb3a4bf62208ed52600c21dd3d1787f412 (diff) |
watchdog: sp5100_tco: Immediately trigger upon starting.
The watchdog countdown is supposed to begin when the device file is
opened. Instead, it would begin countdown upon the first write to or
close of the device file. Now, the ping operation is called within the
start operation which ensures the countdown begins. From experimenation,
it does not appear possible to do this with a single write including
both the start bit and the trigger bit. So, it is done as two distinct
writes.
Signed-off-by: Gregory Oakes <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
-rw-r--r-- | drivers/watchdog/sp5100_tco.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c index fb426b7d81da..14f8d8d90920 100644 --- a/drivers/watchdog/sp5100_tco.c +++ b/drivers/watchdog/sp5100_tco.c @@ -115,6 +115,10 @@ static int tco_timer_start(struct watchdog_device *wdd) val |= SP5100_WDT_START_STOP_BIT; writel(val, SP5100_WDT_CONTROL(tco->tcobase)); + /* This must be a distinct write. */ + val |= SP5100_WDT_TRIGGER_BIT; + writel(val, SP5100_WDT_CONTROL(tco->tcobase)); + return 0; } |