Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <gregory.oakes@amd.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230316201312.17538-1-gregory.oakes@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Gregory Oakes and committed by
Wim Van Sebroeck
4eda19cc fe5631bb

+4
+4
drivers/watchdog/sp5100_tco.c
··· 115 115 val |= SP5100_WDT_START_STOP_BIT; 116 116 writel(val, SP5100_WDT_CONTROL(tco->tcobase)); 117 117 118 + /* This must be a distinct write. */ 119 + val |= SP5100_WDT_TRIGGER_BIT; 120 + writel(val, SP5100_WDT_CONTROL(tco->tcobase)); 121 + 118 122 return 0; 119 123 } 120 124