Revert "chub: disable silent-reset"
authorBoojin Kim <boojin.kim@samsung.com>
Tue, 10 Jul 2018 02:18:49 +0000 (11:18 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Fri, 3 Aug 2018 02:05:46 +0000 (11:05 +0900)
This reverts commit cf3574b499e6edc410de2ff3fc124457a1608db2.

Change-Id: I7ae071d5241783d846a9ca403d0545b83153b144
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
drivers/staging/nanohub/chub.c
drivers/staging/nanohub/chub.h
drivers/staging/nanohub/main.c

index 4540c64b56bcf0c07782894fa1378610c198d9dd..811acdb37d1e7a3b11d467077027fe1e596434bc 100644 (file)
@@ -912,7 +912,6 @@ do_reset:
        /* 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",
@@ -925,9 +924,6 @@ do_reset:
                                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);
@@ -1047,7 +1043,7 @@ static irqreturn_t contexthub_irq_handler(int irq, void *data)
        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;
@@ -1179,7 +1175,7 @@ static __init int contexthub_ipc_hw_init(struct platform_device *pdev,
                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) {
index adf573e9850482796466b4a429063f2012611b04..aa080694b23d43dc0376e016c62829c9294d0f07 100644 (file)
@@ -92,7 +92,6 @@ enum chub_status {
        CHUB_ST_RUN,
        CHUB_ST_SHUTDOWN,
        CHUB_ST_NO_RESPONSE,
-       CHUB_ST_HANG,
 };
 
 struct read_wait {
index 48f4b81f7301cac5ff5611a03255b363d581a12b..2435a1dd42e29e31b98099d8d335e52c7e005f91 100644 (file)
@@ -721,11 +721,7 @@ static int nanohub_hw_reset(struct nanohub_data *data)
                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;
 }
@@ -1409,15 +1405,6 @@ static int nanohub_kthread(void *arg)
                        }
                        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;