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)
commite07a4c79ca75bf41d73ba74c06f7220cd2741bc9
tree1c439762a849dd0e785250034fcc2ee4857ee081
parent41b630f41bf744b0eed92a53ff8c716cfc71920a
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