static int bcss_shutdown(const struct subsys_desc *subsys, bool force_stop) { struct bcss_data *drv = subsys_to_drv(subsys); pil_shutdown(&drv->desc); return 0; }
static void crash_shutdown(const struct subsys_desc *subsys) { struct pronto_data *drv = subsys_to_drv(subsys); pr_err("wcnss crash shutdown %d\n", drv->crash); if (!drv->crash) gpio_set_value(subsys->force_stop_gpio, 1); }
static int wcnss_ramdump(int enable, const struct subsys_desc *subsys) { struct pronto_data *drv = subsys_to_drv(subsys); if (!enable) return 0; return pil_do_ramdump(&drv->desc, drv->ramdump_dev); }
static void modem_crash_shutdown(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); drv->crash_shutdown = true; if (!subsys_get_crash_status(drv->subsys)) { gpio_set_value(subsys->force_stop_gpio, 1); mdelay(STOP_ACK_TIMEOUT_MS); } }
static void mss_stop(const struct subsys_desc *desc) { struct modem_data *drv = subsys_to_drv(desc); if (desc->is_not_loadable) return; pil_shutdown(&drv->mba->desc); pil_shutdown(&drv->q6->desc); }
static int wcnss_shutdown(const struct subsys_desc *subsys) { struct pronto_data *drv = subsys_to_drv(subsys); pil_shutdown(&drv->desc); flush_delayed_work(&drv->cancel_vote_work); wcnss_flush_delayed_boot_votes(); return 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; }
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; }
static int wcnss_powerup(const struct subsys_desc *subsys) { struct pronto_data *drv = subsys_to_drv(subsys); int ret; ret = pil_boot(&drv->desc); if (ret) return ret; drv->restart_inprogress = false; enable_irq(drv->subsys_desc.wdog_bite_irq); return ret; }
static irqreturn_t adsp_err_fatal_intr_handler (int irq, void *dev_id) { struct lpass_data *drv = subsys_to_drv(dev_id); /* Ignore if we're the one that set the force stop bit in the outbound * entry */ if (drv->crash_shutdown) return IRQ_HANDLED; pr_err("Fatal error on the ADSP!\n"); restart_adsp(drv); return IRQ_HANDLED; }
static int modem_powerup(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); if (subsys->is_not_loadable) return 0; /* * At this time, the modem is shutdown. Therefore this function cannot * run concurrently with the watchdog bite error handler, making it safe * to unset the flag below. */ INIT_COMPLETION(drv->stop_ack); drv->ignore_errors = false; return pil_boot(&drv->q6->desc); }
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; }
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; }
static irqreturn_t wcnss_err_fatal_intr_handler(int irq, void *dev_id) { struct pronto_data *drv = subsys_to_drv(dev_id); pr_err("Fatal error on the wcnss.\n"); drv->crash = true; if (drv->restart_inprogress) { pr_err("wcnss: Ignoring error fatal, restart in progress\n"); return IRQ_HANDLED; } drv->restart_inprogress = true; restart_wcnss(drv); return IRQ_HANDLED; }
static irqreturn_t wcnss_wdog_bite_irq_hdlr(int irq, void *dev_id) { struct pronto_data *drv = subsys_to_drv(dev_id); drv->crash = true; disable_irq_nosync(drv->subsys_desc.wdog_bite_irq); if (drv->restart_inprogress) { pr_err("Ignoring wcnss bite irq, restart in progress\n"); return IRQ_HANDLED; } drv->restart_inprogress = true; schedule_work(&drv->wcnss_wdog_bite_work); return IRQ_HANDLED; }
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; }
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 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; }
static int modem_shutdown(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); unsigned long ret; if (subsys->is_not_loadable) return 0; if (!subsys_get_crash_status(drv->subsys)) { gpio_set_value(subsys->force_stop_gpio, 1); ret = wait_for_completion_timeout(&drv->stop_ack, msecs_to_jiffies(STOP_ACK_TIMEOUT_MS)); if (!ret) pr_warn("Timed out on stop ack from modem.\n"); gpio_set_value(subsys->force_stop_gpio, 0); } pil_shutdown(&drv->mba->desc); pil_shutdown(&drv->q6->desc); return 0; }
static irqreturn_t wcnss_err_fatal_intr_handler(int irq, void *dev_id) { struct pronto_data *drv = subsys_to_drv(dev_id); pr_err("Fatal error on the wcnss.\n"); drv->crash = true; if (drv->restart_inprogress) { pr_err("wcnss: Ignoring error fatal, restart in progress\n"); return IRQ_HANDLED; } drv->restart_inprogress = true; restart_wcnss(drv); //S [VY52/VY55][bug_1807] Frank_Chan add schedule_delayed_work(&drv->subsys_crash_work, msecs_to_jiffies(5000)); //E [VY52/VY55][bug_1807] Frank_Chan add return IRQ_HANDLED; }
static int modem_powerup(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); int ret; if (subsys->is_not_loadable) return 0; /* */ INIT_COMPLETION(drv->stop_ack); drv->ignore_errors = false; 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; }
static int wcnss_powerup(const struct subsys_desc *subsys) { struct pronto_data *drv = subsys_to_drv(subsys); struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); int ret = -1; if (pdev && pwlanconfig) ret = wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_ON, NULL); if (!ret) { msleep(1000); ret = pil_boot(&drv->desc); if (ret) return ret; } drv->restart_inprogress = false; enable_irq(drv->irq); schedule_delayed_work(&drv->cancel_vote_work, msecs_to_jiffies(5000)); return 0; }
static int modem_shutdown(const struct subsys_desc *subsys, bool force_stop) { struct modem_data *drv = subsys_to_drv(subsys); unsigned long ret; if (subsys->is_not_loadable) return 0; #if 0 if (!subsys_get_crash_status(drv->subsys) && force_stop && subsys->force_stop_gpio) { gpio_set_value(subsys->force_stop_gpio, 1); ret = wait_for_completion_timeout(&drv->stop_ack, msecs_to_jiffies(STOP_ACK_TIMEOUT_MS)); if (!ret) pr_warn("Timed out on stop ack from modem.\n"); gpio_set_value(subsys->force_stop_gpio, 0); } #else pr_err("Setting FORCE STOP GPIO\n"); gpio_set_value(subsys->force_stop_gpio, 1); ret = wait_for_completion_timeout(&drv->stop_ack, msecs_to_jiffies(STOP_ACK_TIMEOUT_MS)); if (!ret) pr_warn("Timed out on stop ack from modem.\n"); gpio_set_value(subsys->force_stop_gpio, 0); #endif if (drv->subsys_desc.ramdump_disable_gpio) { drv->subsys_desc.ramdump_disable = gpio_get_value( drv->subsys_desc.ramdump_disable_gpio); pr_warn("Ramdump disable gpio value is %d\n", drv->subsys_desc.ramdump_disable); } pil_shutdown(&drv->q6->desc); return 0; }
static int modem_powerup(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); int ret; if (subsys->is_not_loadable) return 0; /* * At this time, the modem is shutdown. Therefore this function cannot * run concurrently with either the watchdog bite error handler or the * SMSM callback, making it safe to unset the flag below. */ INIT_COMPLETION(drv->stop_ack); drv->ignore_errors = false; ignore_errors_by_subsys_modem_restart = false; // seungyeol.seo, workaround fix for modem reset 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; }
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; }
static void tzapps_stop(const struct subsys_desc *desc) { struct tzapps_data *drv = subsys_to_drv(desc); pil_shutdown(&drv->pil_desc); }
static int tzapps_start(const struct subsys_desc *desc) { struct tzapps_data *drv = subsys_to_drv(desc); return pil_boot(&drv->pil_desc); }
static int vidc_shutdown(const struct subsys_desc *desc, bool force_stop) { struct vidc_data *drv = subsys_to_drv(desc); pil_shutdown(&drv->pil_desc); return 0; }
static int vidc_powerup(const struct subsys_desc *desc) { struct vidc_data *drv = subsys_to_drv(desc); return pil_boot(&drv->pil_desc); }
static void modem_free_memory(const struct subsys_desc *subsys) { struct modem_data *drv = subsys_to_drv(subsys); pil_free_memory(&drv->q6->desc); }