]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: orion_wdt: use timer1 as a pretimeout
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 29 Aug 2019 21:52:24 +0000 (09:52 +1200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Tue, 17 Sep 2019 06:59:13 +0000 (08:59 +0200)
commit2b9340e7a21fb027c3ef513294b123c3a126c2d3
tree1c439762a849dd0e785250034fcc2ee4857ee081
parent88347be6d56d67f064f6215ff265f0ca8014da7e
watchdog: orion_wdt: use timer1 as a pretimeout

The orion watchdog can either reset the CPU or generate an interrupt.
The interrupt would be useful for debugging as it provides panic()
output about the watchdog expiry, however if the interrupt is used the
watchdog can't reset the CPU in the event of being stuck in a loop with
interrupts disabled or if the CPU is prevented from accessing memory
(e.g. an unterminated DMA).

The Armada SoCs have spare timers that aren't currently used by the
Linux kernel. We can use timer1 to provide a pre-timeout ahead of the
watchdog timer and provide the possibility of gathering debug before the
reset triggers.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190829215224.27956-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/orion_wdt.c