/* dump hw & sram into file */
chub_dbg_dump_hw(ipc, err);
if (need_reset) {
-#ifdef CHUB_RESET_ENABLE
ret = contexthub_reset(ipc);
if (ret)
dev_warn(ipc->dev, "%s: fails to reset %d.\n",
if (ipc->irq_wdt)
enable_irq(ipc->irq_wdt);
}
-#else
- atomic_set(&ipc->chub_status, CHUB_ST_HANG);
-#endif
} else {
/* dump log into file: DO NOT logbuf dueto sram corruption */
log_dump_all(err);
return IRQ_HANDLED;
}
-#ifdef CHUB_RESET_ENABLE
+#ifdef WDT_ENABLE
static irqreturn_t contexthub_irq_wdt_handler(int irq, void *data)
{
struct contexthub_ipc_info *ipc = data;
return ret;
}
-#ifdef CHUB_RESET_ENABLE
+#ifdef WDT_ENABLE
/* get wdt interrupt optionally */
chub->irq_wdt = irq_of_parse_and_map(node, 1);
if (chub->irq_wdt > 0) {
nanohub_wakeup_unlock(data);
}
#elif defined(CONFIG_NANOHUB_MAILBOX)
-#ifdef CHUB_RESET_ENABLE
ret = contexthub_reset(data->pdata->mailbox_client);
-#else
- ret = -EINVAL;
-#endif
#endif
return ret;
}
}
msleep_interruptible(WAKEUP_TIMEOUT_MS);
nanohub_set_state(data, ST_RUNNING);
-#ifdef CONFIG_NANOHUB_MAILBOX
-#ifndef CHUB_RESET_ENABLE
- if (ret) {
- dev_warn(data->io[ID_NANOHUB_SENSOR].dev,
- "%s fails. nanohub isn't running\n", __func__);
- return 0;
- }
-#endif
-#endif
break;
case ST_RUNNING:
break;