From 22be0a11a591a5c567a4b91732cf5a6804dd161d Mon Sep 17 00:00:00 2001 From: Juan Gutierrez Date: Thu, 1 Mar 2012 12:09:32 -0600 Subject: omap: remoteproc: add watchdog timer support for dsp Use GPTimer 6 as the watchdog timer for dsp. This is used specifically instead of the WDT3, as the latter is not capable of generating an interrupt to the DSP core. The former is used to generate an interrupt and thereby gather some watchdog context data. Change-Id: I7f8d6e7070cc14f4339e79e42a6affe169270bb2 Signed-off-by: Juan Gutierrez Signed-off-by: Suman Anna --- drivers/remoteproc/omap_remoteproc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers/remoteproc') diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 7bb5dc65dcb..71a3e5584f4 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -447,8 +447,10 @@ static inline int omap_rproc_start(struct rproc *rproc, u64 bootaddr) } omap_dm_timer_set_source(timers[i].odt, OMAP_TIMER_SRC_SYS_CLK); #ifdef CONFIG_REMOTEPROC_WATCHDOG - /* GPT 9 and 11 are using as WDT */ - if (timers[i].id == 9 || timers[i].id == 11) { + /* GPT 9 & 11 (ipu); GPT 6 (dsp) are used as watchdog timers */ + if ((!strcmp(rproc->name, "dsp") && timers[i].id == 6) || + (!strcmp(rproc->name, "ipu") && + (timers[i].id == 9 || timers[i].id == 11))) { ret = request_irq(omap_dm_timer_get_irq(timers[i].odt), omap_rproc_watchdog_isr, IRQF_DISABLED, "rproc-wdt", rproc); @@ -513,8 +515,10 @@ static inline int omap_rproc_stop(struct rproc *rproc) for (i = 0; i < pdata->timers_cnt; i++) { #ifdef CONFIG_REMOTEPROC_WATCHDOG - /* GPT 9 and 11 are used as WDT */ - if (timers[i].id == 9 || timers[i].id == 11) + /* GPT 9 & 11 (ipu); GPT 6 (dsp) are used as watchdog timers */ + if ((!strcmp(rproc->name, "dsp") && timers[i].id == 6) || + (!strcmp(rproc->name, "ipu") && + (timers[i].id == 9 || timers[i].id == 11))) free_irq(omap_dm_timer_get_irq(timers[i].odt), rproc); #endif omap_dm_timer_free(timers[i].odt); -- cgit v1.2.3