imx233: add hardware and software watchdog

The hardware watchdog automatically shutdown the device after 10s of
inactivity, being defined as 10s without the tick IRQ fired (aka braindead
device).
The software IRQ mechanism is more interesting: it uses a very high priority
timer setup as one-shot to trigger after 5s of inactivity (but IRQ still
enabled). When detected, it patches the running code to insert a SWI
instruction so that on interrupt return it will trigger a SWI and produce
a meaningfull backtrace to debug the deadlock. This should allow to debug
freezes in IRQ context.

Change-Id: Ic55dad01201676bfb6dd79e78e535c6707cb88e6
This commit is contained in:
Amaury Pouly 2014-02-02 04:31:54 +01:00
parent 1a06292e41
commit 6d64111b3c
4 changed files with 58 additions and 1 deletions

View file

@ -32,6 +32,7 @@ enum
{
TIMER_TICK, /* for tick task */
TIMER_USER, /* for user timer */
TIMER_WATCHDOG, /* for watchdog */
};
struct imx233_timrot_info_t