remoteproc/omap: Add watchdog functionality for remote processors
authorSuman Anna <s-anna@ti.com>
Tue, 24 Mar 2020 11:00:34 +0000 (13:00 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 26 Mar 2020 05:29:51 +0000 (22:29 -0700)
commit69591e4a0e173e9a19c54c172cdb2febd151dda6
tree47c6bb69a6829de7505cff227cb128afebc17da6
parent232ba6ca007c9585ea666ad083f510b9666259dd
remoteproc/omap: Add watchdog functionality for remote processors

Remote processors can be stuck in a loop, and may not be recoverable
if they do not have a built-in watchdog. The watchdog implementation
for OMAP remote processors uses external gptimers that can be used
to interrupt both the Linux host as well as the remote processor.

Each remote processor is responsible for refreshing the timer during
normal behavior - during OS task scheduling or entering the idle loop
properly. During a watchdog condition (executing a tight loop causing
no scheduling), the host processor gets interrupts and schedules a
recovery for the corresponding remote processor. The remote processor
may also get interrupted to be able to print a back trace.

A menuconfig option has also been added to enable/disable the Watchdog
functionality, with the default as disabled.

Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Andrew F. Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20200324110035.29907-15-t-kristo@ti.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/Kconfig
drivers/remoteproc/omap_remoteproc.c