コード例 #1
0
static void modem_wdog_check(struct work_struct *work)
{
    void __iomem *q6_sw_wdog_addr;
    u32 regval;

    q6_sw_wdog_addr = ioremap_nocache(Q6_SW_WDOG_ENABLE, 4);
    if (!q6_sw_wdog_addr)
        panic("Unable to check modem watchdog status.\n");

    regval = readl_relaxed(q6_sw_wdog_addr);
    if (!regval) {
#ifdef FEATURE_MODEM_RESTART_MONITOR
        if(get_kttech_recovery_mode() || (++modem_restart_num < MAX_MODEM_RESTART_NUM)) {
            pr_err("modem-8960: Modem watchdog wasn't activated!. Restarting the modem now. restart num = %d \n", modem_restart_num);
            restart_modem();
        } else {
            panic("Unable to complete restarting modem \n");
        }
#else
        pr_err("modem-8960: Modem watchdog wasn't activated!. Restarting the modem now.\n");
        restart_modem();
#endif
    }
#ifdef FEATURE_MODEM_RESTART_MONITOR
    else {
        printk("modem-8960: modem watchdog status check complete");
        modem_restart_num = 0;
    }
#endif
    iounmap(q6_sw_wdog_addr);
}
コード例 #2
0
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
	switch (irq) {

	case Q6SW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem software!\n");
#ifdef FEATURE_PANTECH_WLAN_QCOM_PATCH //lee.eunsuk 20120423, SSR
	    log_modem_sfr();
		panic(MODULE_NAME "Modem crashed.");
#else
		restart_modem();
#endif
		break;
	case Q6FW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem firmware!\n");
#ifdef FEATURE_PANTECH_WLAN_QCOM_PATCH //lee.eunsuk 20120423, SSR
	    log_modem_sfr();
		panic(MODULE_NAME "Modem crashed.");
#else
		restart_modem();
#endif
		break;
	break;

	default:
		pr_err("%s: Unknown IRQ!\n", __func__);
	}

	return IRQ_HANDLED;
}
コード例 #3
0
ファイル: modem-8960.c プロジェクト: Snuzzo/dna-kernel
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
	switch (irq) {

	case Q6SW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem software!\n");
		if (get_restart_level() == RESET_SOC)
			ssr_set_restart_reason(
					"modem fatal: Modem SW Watchdog Bite!");
		restart_modem();
		break;
	case Q6FW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem firmware!\n");
		if (get_restart_level() == RESET_SOC)
			ssr_set_restart_reason(
					"modem fatal: Modem FW Watchdog Bite!");
		restart_modem();
		break;
	break;

	default:
		pr_err("%s: Unknown IRQ!\n", __func__);
	}

	return IRQ_HANDLED;
}
コード例 #4
0
static irqreturn_t modem_wdog_bite_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);
	if (drv->ignore_errors)
		return IRQ_HANDLED;
	pr_err("Watchdog bite received from modem software!\n");
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #5
0
static void smsm_state_cb(void *data, uint32_t old_state, uint32_t new_state)
{
    /* Ignore if we're the one that set SMSM_RESET */
    if (crash_shutdown)
        return;

    if (new_state & SMSM_RESET) {
        pr_err("Probable fatal error on the modem.\n");
        restart_modem();
    }
}
コード例 #6
0
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
    switch (irq) {

    case Q6SW_WDOG_EXPIRED_IRQ:
        pr_err("Watchdog bite received from modem software!\n");
        restart_modem();
        break;
    case Q6FW_WDOG_EXPIRED_IRQ:
        pr_err("Watchdog bite received from modem firmware!\n");
        restart_modem();
        break;
        break;

    default:
        pr_err("%s: Unknown IRQ!\n", __func__);
    }

    return IRQ_HANDLED;
}
コード例 #7
0
ファイル: pil-q6v5-mss.c プロジェクト: Menpiko/SnaPKernel-N6P
static irqreturn_t modem_err_fatal_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);

	/* Ignore if we're the one that set the force stop GPIO */
	if (drv->crash_shutdown)
		return IRQ_HANDLED;

	pr_err("Fatal error on the modem.\n");
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #8
0
static void smsm_state_cb(void *data, uint32_t old_state, uint32_t new_state)
{
	/* Ignore if we're the one that set SMSM_RESET */
	if (crash_shutdown)
		return;

	if (new_state & SMSM_RESET) {
		pr_err("Probable fatal error on the modem.\n");
#ifdef CONFIG_ZTE_PLATFORM
		smd_diag();
#endif
		restart_modem();
	}
}
コード例 #9
0
ファイル: pil-q6v5-mss.c プロジェクト: Menpiko/SnaPKernel-N6P
static irqreturn_t modem_wdog_bite_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);
	if (drv->ignore_errors)
		return IRQ_HANDLED;

	pr_err("Watchdog bite received from modem software!\n");
	if (drv->subsys_desc.system_debug &&
			!gpio_get_value(drv->subsys_desc.err_fatal_gpio))
		panic("%s: System ramdump requested. Triggering device restart!\n",
							__func__);
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #10
0
ファイル: modem-8960.c プロジェクト: NoelMacwan/SXDHuashan
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
	/* Ignore if we're the one that set SMSM_RESET */
	if (crash_shutdown)
		return IRQ_HANDLED;

	switch (irq) {

	case Q6SW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem software!\n");
		restart_modem();
		break;
	case Q6FW_WDOG_EXPIRED_IRQ:
		pr_err("Watchdog bite received from modem firmware!\n");
		restart_modem();
		break;
	break;

	default:
		pr_err("%s: Unknown IRQ!\n", __func__);
	}

	return IRQ_HANDLED;
}
コード例 #11
0
static void smsm_state_cb(void *data, uint32_t old_state, uint32_t new_state)
{
	/* Ignore if we're the one that set SMSM_RESET */
	if (crash_shutdown)
		return;

	if (new_state & SMSM_RESET) {
		pr_err("Probable fatal error on the modem.\n");
#ifdef FEATURE_PANTECH_WLAN_QCOM_PATCH //lee.eunsuk 20120423, SSR
	    log_modem_sfr();
		panic(MODULE_NAME "Modem crashed.");
#else
		restart_modem();
#endif
	}
}
コード例 #12
0
static void modem_wdog_check(struct work_struct *work)
{
	void __iomem *q6_sw_wdog_addr;
	u32 regval;

	q6_sw_wdog_addr = ioremap_nocache(Q6_SW_WDOG_ENABLE, 4);
	if (!q6_sw_wdog_addr)
		panic("Unable to check modem watchdog status.\n");

	regval = readl_relaxed(q6_sw_wdog_addr);
	if (!regval) {
		pr_err("modem-8960: Modem watchdog wasn't activated!. Restarting the modem now.\n");
		restart_modem();
	}

	iounmap(q6_sw_wdog_addr);
}
コード例 #13
0
static irqreturn_t modem_err_fatal_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);

	/*                                                      */
	if (drv->crash_shutdown)
		return IRQ_HANDLED;

	pr_err("Fatal error on the modem.\n");
	subsys_set_crash_status(drv->subsys, true);

	if (check_modem_reset(drv) == 0)
		return IRQ_HANDLED;

	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #14
0
static irqreturn_t modem_err_fatal_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);

	/* Ignore if we're the one that set the force stop GPIO */
	if (drv->crash_shutdown)
		return IRQ_HANDLED;

	pr_err("Fatal error on the modem.\n");
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);

//S [VY52/VY55][bug_486] Frank_Chan add
	schedule_delayed_work(&drv->subsys_crash_work, msecs_to_jiffies(5000));
//E [VY52/VY55][bug_486] Frank_Chan add

	return IRQ_HANDLED;
}
コード例 #15
0
static irqreturn_t modem_err_fatal_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);

	/* Ignore if we're the one that set the force stop GPIO */
	if (drv->crash_shutdown)
		return IRQ_HANDLED;

	if (check_modem_reset(drv) == 0)
		return IRQ_HANDLED;

	pr_err("Fatal error on the modem.\n");
#if defined(CONFIG_PRE_SELF_DIAGNOSIS)
	lge_pre_self_diagnosis((char *) "modem", 2, (char *) "modem fatal", (char *) "_", 20000);
#endif
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #16
0
static void modem_wdog_check(struct work_struct *work)
{
	void __iomem *q6_sw_wdog_addr;
	u32 regval;

	q6_sw_wdog_addr = ioremap_nocache(Q6_SW_WDOG_ENABLE, 4);
	if (!q6_sw_wdog_addr)
		panic("Unable to check modem watchdog status.\n");

	regval = readl_relaxed(q6_sw_wdog_addr);
	if (!regval) {
		pr_err("modem-8960: Modem watchdog wasn't activated!. Restarting the modem now.\n");
#ifdef FEATURE_PANTECH_WLAN_QCOM_PATCH //lee.eunsuk 20120423, SSR
	    log_modem_sfr();
		panic(MODULE_NAME "Modem crashed.");
#else		
		restart_modem();
#endif		
	}

	iounmap(q6_sw_wdog_addr);
}
コード例 #17
0
static irqreturn_t modem_wdog_bite_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);
	if (drv->ignore_errors)
		return IRQ_HANDLED;

	pr_err("Watchdog bite received from modem software!\n");
	if (drv->subsys_desc.system_debug &&
			!gpio_get_value(drv->subsys_desc.err_fatal_gpio))
		panic("%s: System ramdump requested. Triggering device restart!\n",
							__func__);
	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);

#ifdef FEATURE_LGE_MODEM_DEBUG_INFO
    modem_debug.modem_ssr_level = subsys_get_restart_level(drv->subsys);
    if (modem_debug.modem_ssr_level != RESET_SOC) {
        modem_debug.modem_ssr_event = MODEM_SSR_WATCHDOG_BITE;
        queue_work(modem_debug.modem_ssr_queue, &modem_debug.modem_ssr_report_work);
    }
#endif

	return IRQ_HANDLED;
}
コード例 #18
0
ファイル: pil-q6v4-mss.c プロジェクト: robcore/machinex
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
	struct q6v4_modem *drv = dev_id;
	restart_modem(drv);
	return IRQ_HANDLED;
}
コード例 #19
0
static irqreturn_t modem_wdog_bite_irq(int irq, void *dev_id)
{
    pr_err("Watchdog bite received from modem software!\n");
    restart_modem();
    return IRQ_HANDLED;
}
コード例 #20
0
static void modem_crash_shutdown(const struct subsys_desc *subsys)
{
	struct modem_data *drv = subsys_to_drv(subsys);
	drv->crash_shutdown = true;
#ifdef CONFIG_LGE_HANDLE_PANIC
	if (!subsys_get_crash_status(drv->subsys) && (lge_get_modem_panic() != 3)) {
#else
	if (!subsys_get_crash_status(drv->subsys)) {
#endif
		gpio_set_value(subsys->force_stop_gpio, 1);
		mdelay(STOP_ACK_TIMEOUT_MS);
	}
}

static int modem_ramdump(int enable, const struct subsys_desc *subsys)
{
	struct modem_data *drv = subsys_to_drv(subsys);
	int ret;

	if (!enable)
		return 0;

	ret = pil_boot(&drv->q6->desc);
	if (ret)
		return ret;

	ret = pil_do_ramdump(&drv->mba->desc, drv->ramdump_dev);
	if (ret < 0)
		pr_err("Unable to dump modem fw memory (rc = %d).\n", ret);

	pil_shutdown(&drv->q6->desc);
	return ret;
}

static int adsp_state_notifier_fn(struct notifier_block *this,
				unsigned long code, void *ss_handle)
{
	int ret;
	ret = sysmon_send_event(SYSMON_SS_MODEM, "adsp", code);
	if (ret < 0)
		pr_err("%s: sysmon_send_event failed (%d).", __func__, ret);
	return NOTIFY_DONE;
}

static struct notifier_block adsp_state_notifier_block = {
	.notifier_call = adsp_state_notifier_fn,
};

static irqreturn_t modem_wdog_bite_intr_handler(int irq, void *dev_id)
{
	struct modem_data *drv = subsys_to_drv(dev_id);
	if (drv->ignore_errors)
		return IRQ_HANDLED;

	/* START : subsys_modem_restart : testmode */
	if (ignore_errors_by_subsys_modem_restart) {
		pr_err("IGNORE watchdog bite received from modem software!\n");
		return IRQ_HANDLED;
	}
	/* END : subsys_modem_restart : testmode */

	if (check_modem_reset(drv) == 0) {
		pr_err("IGNORE watchdog bite received from modem software during check_modem_reset!\n");
		return IRQ_HANDLED;
	}

	pr_err("Watchdog bite received from modem software!\n");
#if defined(CONFIG_PRE_SELF_DIAGNOSIS)
	lge_pre_self_diagnosis((char *) "modem", 2, (char *) "Watchdog bite Intr", (char *) "_", 20000);
#endif

	subsys_set_crash_status(drv->subsys, true);
	restart_modem(drv);
	return IRQ_HANDLED;
}

static int mss_start(const struct subsys_desc *desc)
{
	int ret;
	struct modem_data *drv = subsys_to_drv(desc);

	if (desc->is_not_loadable)
		return 0;

	INIT_COMPLETION(drv->stop_ack);
	ret = pil_boot(&drv->q6->desc);
	if (ret)
		return ret;
	ret = pil_boot(&drv->mba->desc);
	if (ret)
		pil_shutdown(&drv->q6->desc);
	return ret;
}