Loading Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ Optional properties: - qcom,gpio-force-stop: GPIO used by the apps to force the modem to shutdown. - qcom,gpio-stop-ack: GPIO used by the modem to ack force stop or a graceful stop to the apps. - qcom,gpio-ramdump-disable: GPIO used by the modem to inform the apps that ramdump collection should be disabled. - qcom,restart-group: List of subsystems that will need to restart together. - qcom,mba-image-is-not-elf: Boolean- Present if MBA image doesnt use the ELF format. Loading drivers/soc/qcom/pil-q6v5-mss.c +8 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,13 @@ static int modem_shutdown(const struct subsys_desc *subsys, bool force_stop) gpio_set_value(subsys->force_stop_gpio, 0); } 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; Loading @@ -130,6 +137,7 @@ static int modem_powerup(const struct subsys_desc *subsys) * to unset the flag below. */ INIT_COMPLETION(drv->stop_ack); drv->subsys_desc.ramdump_disable = 0; drv->ignore_errors = false; return pil_boot(&drv->q6->desc); } Loading drivers/soc/qcom/subsystem_restart.c +15 −2 Original line number Diff line number Diff line Loading @@ -378,6 +378,14 @@ out: mutex_unlock(&restart_log_mutex); } static int is_ramdump_enabled(struct subsys_device *dev) { if (dev->desc->ramdump_disable_gpio) return !dev->desc->ramdump_disable; return enable_ramdumps; } static void send_sysmon_notif(struct subsys_device *dev) { struct subsys_device *subsys; Loading Loading @@ -430,7 +438,7 @@ static void notify_each_subsys_device(struct subsys_device **list, send_sysmon_notif(dev); notif_data.crashed = subsys_get_crash_status(dev); notif_data.enable_ramdump = enable_ramdumps; notif_data.enable_ramdump = is_ramdump_enabled(dev); notif_data.no_auth = dev->desc->no_auth; notif_data.pdev = pdev; Loading Loading @@ -502,7 +510,7 @@ static void subsystem_ramdump(struct subsys_device *dev, void *data) const char *name = dev->desc->name; if (dev->desc->ramdump) if (dev->desc->ramdump(enable_ramdumps, dev->desc) < 0) if (dev->desc->ramdump(is_ramdump_enabled(dev), dev->desc) < 0) pr_warn("%s[%p]: Ramdump failed.\n", name, current); dev->do_ramdump_on_put = false; } Loading Loading @@ -1310,6 +1318,11 @@ static int subsys_parse_devicetree(struct subsys_desc *desc) if (ret && ret != -ENOENT) return ret; ret = __get_gpio(desc, "qcom,gpio-ramdump-disable", &desc->ramdump_disable_gpio); if (ret && ret != -ENOENT) return ret; ret = platform_get_irq(pdev, 0); if (ret > 0) desc->wdog_bite_irq = ret; Loading include/soc/qcom/subsystem_restart.h +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,8 @@ struct subsys_desc { unsigned int stop_ack_irq; unsigned int wdog_bite_irq; int force_stop_gpio; int ramdump_disable_gpio; int ramdump_disable; bool no_auth; int ssctl_instance_id; u32 sysmon_pid; Loading Loading
Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ Optional properties: - qcom,gpio-force-stop: GPIO used by the apps to force the modem to shutdown. - qcom,gpio-stop-ack: GPIO used by the modem to ack force stop or a graceful stop to the apps. - qcom,gpio-ramdump-disable: GPIO used by the modem to inform the apps that ramdump collection should be disabled. - qcom,restart-group: List of subsystems that will need to restart together. - qcom,mba-image-is-not-elf: Boolean- Present if MBA image doesnt use the ELF format. Loading
drivers/soc/qcom/pil-q6v5-mss.c +8 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,13 @@ static int modem_shutdown(const struct subsys_desc *subsys, bool force_stop) gpio_set_value(subsys->force_stop_gpio, 0); } 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; Loading @@ -130,6 +137,7 @@ static int modem_powerup(const struct subsys_desc *subsys) * to unset the flag below. */ INIT_COMPLETION(drv->stop_ack); drv->subsys_desc.ramdump_disable = 0; drv->ignore_errors = false; return pil_boot(&drv->q6->desc); } Loading
drivers/soc/qcom/subsystem_restart.c +15 −2 Original line number Diff line number Diff line Loading @@ -378,6 +378,14 @@ out: mutex_unlock(&restart_log_mutex); } static int is_ramdump_enabled(struct subsys_device *dev) { if (dev->desc->ramdump_disable_gpio) return !dev->desc->ramdump_disable; return enable_ramdumps; } static void send_sysmon_notif(struct subsys_device *dev) { struct subsys_device *subsys; Loading Loading @@ -430,7 +438,7 @@ static void notify_each_subsys_device(struct subsys_device **list, send_sysmon_notif(dev); notif_data.crashed = subsys_get_crash_status(dev); notif_data.enable_ramdump = enable_ramdumps; notif_data.enable_ramdump = is_ramdump_enabled(dev); notif_data.no_auth = dev->desc->no_auth; notif_data.pdev = pdev; Loading Loading @@ -502,7 +510,7 @@ static void subsystem_ramdump(struct subsys_device *dev, void *data) const char *name = dev->desc->name; if (dev->desc->ramdump) if (dev->desc->ramdump(enable_ramdumps, dev->desc) < 0) if (dev->desc->ramdump(is_ramdump_enabled(dev), dev->desc) < 0) pr_warn("%s[%p]: Ramdump failed.\n", name, current); dev->do_ramdump_on_put = false; } Loading Loading @@ -1310,6 +1318,11 @@ static int subsys_parse_devicetree(struct subsys_desc *desc) if (ret && ret != -ENOENT) return ret; ret = __get_gpio(desc, "qcom,gpio-ramdump-disable", &desc->ramdump_disable_gpio); if (ret && ret != -ENOENT) return ret; ret = platform_get_irq(pdev, 0); if (ret > 0) desc->wdog_bite_irq = ret; Loading
include/soc/qcom/subsystem_restart.h +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,8 @@ struct subsys_desc { unsigned int stop_ack_irq; unsigned int wdog_bite_irq; int force_stop_gpio; int ramdump_disable_gpio; int ramdump_disable; bool no_auth; int ssctl_instance_id; u32 sysmon_pid; Loading