Loading drivers/soc/qcom/spcom.c +1 −1 Original line number Diff line number Diff line Loading @@ -631,7 +631,7 @@ static int spcom_handle_restart_sp_command(void *cmd_buf, int cmd_size) } pr_debug("restart - Name: %s FW name: %s Depends on: %s\n", desc_p->name, desc_p->fw_name, desc_p->depends_on); desc_p->name, desc_p->fw_name, desc_p->pon_depends_on); desc_powerup = desc_p->powerup; /** * Overwrite the subsys PIL powerup function with an spcom Loading drivers/soc/qcom/subsystem_restart.c +13 −6 Original line number Diff line number Diff line Loading @@ -956,7 +956,7 @@ void *__subsystem_get(const char *name, const char *fw_name) goto err_module; } subsys_d = subsystem_get(subsys->desc->depends_on); subsys_d = subsystem_get(subsys->desc->pon_depends_on); if (IS_ERR(subsys_d)) { retval = subsys_d; goto err_depends; Loading Loading @@ -1035,6 +1035,10 @@ void subsystem_put(void *subsystem) if (IS_ERR_OR_NULL(subsys)) return; subsys_d = find_subsys_device(subsys->desc->poff_depends_on); if (subsys_d) subsystem_put(subsys_d); track = subsys_get_track(subsys); mutex_lock(&track->lock); if (WARN(!subsys->count, "%s: %s: Reference count mismatch\n", Loading @@ -1048,11 +1052,6 @@ void subsystem_put(void *subsystem) } mutex_unlock(&track->lock); subsys_d = find_subsys_device(subsys->desc->depends_on); if (subsys_d) { subsystem_put(subsys_d); put_device(&subsys_d->dev); } module_put(subsys->owner); put_device(&subsys->dev); return; Loading Loading @@ -1654,6 +1653,14 @@ static int subsys_parse_devicetree(struct subsys_desc *desc) return PTR_ERR(order); } if (of_property_read_string(pdev->dev.of_node, "qcom,pon-depends-on", &desc->pon_depends_on)) pr_debug("pon-depends-on not set for %s\n", desc->name); if (of_property_read_string(pdev->dev.of_node, "qcom,poff-depends-on", &desc->poff_depends_on)) pr_debug("poff-depends-on not set for %s\n", desc->name); return 0; } Loading include/soc/qcom/subsystem_restart.h +8 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,12 @@ struct subsys_notif_timeout { * struct subsys_desc - subsystem descriptor * @name: name of subsystem * @fw_name: firmware name * @depends_on: subsystem this subsystem depends on to operate * @pon_depends_on: subsystem this subsystem wants to power-on first. If the * dependednt subsystem is already powered-on, the framework won't try to power * it back up again. * @poff_depends_on: subsystem this subsystem wants to power-off first. If the * dependednt subsystem is already powered-off, the framework won't try to power * it off again. * @dev: parent device * @owner: module the descriptor belongs to * @shutdown: Stop a subsystem Loading @@ -79,7 +84,8 @@ struct subsys_notif_timeout { struct subsys_desc { const char *name; char fw_name[256]; const char *depends_on; const char *pon_depends_on; const char *poff_depends_on; struct device *dev; struct module *owner; Loading Loading
drivers/soc/qcom/spcom.c +1 −1 Original line number Diff line number Diff line Loading @@ -631,7 +631,7 @@ static int spcom_handle_restart_sp_command(void *cmd_buf, int cmd_size) } pr_debug("restart - Name: %s FW name: %s Depends on: %s\n", desc_p->name, desc_p->fw_name, desc_p->depends_on); desc_p->name, desc_p->fw_name, desc_p->pon_depends_on); desc_powerup = desc_p->powerup; /** * Overwrite the subsys PIL powerup function with an spcom Loading
drivers/soc/qcom/subsystem_restart.c +13 −6 Original line number Diff line number Diff line Loading @@ -956,7 +956,7 @@ void *__subsystem_get(const char *name, const char *fw_name) goto err_module; } subsys_d = subsystem_get(subsys->desc->depends_on); subsys_d = subsystem_get(subsys->desc->pon_depends_on); if (IS_ERR(subsys_d)) { retval = subsys_d; goto err_depends; Loading Loading @@ -1035,6 +1035,10 @@ void subsystem_put(void *subsystem) if (IS_ERR_OR_NULL(subsys)) return; subsys_d = find_subsys_device(subsys->desc->poff_depends_on); if (subsys_d) subsystem_put(subsys_d); track = subsys_get_track(subsys); mutex_lock(&track->lock); if (WARN(!subsys->count, "%s: %s: Reference count mismatch\n", Loading @@ -1048,11 +1052,6 @@ void subsystem_put(void *subsystem) } mutex_unlock(&track->lock); subsys_d = find_subsys_device(subsys->desc->depends_on); if (subsys_d) { subsystem_put(subsys_d); put_device(&subsys_d->dev); } module_put(subsys->owner); put_device(&subsys->dev); return; Loading Loading @@ -1654,6 +1653,14 @@ static int subsys_parse_devicetree(struct subsys_desc *desc) return PTR_ERR(order); } if (of_property_read_string(pdev->dev.of_node, "qcom,pon-depends-on", &desc->pon_depends_on)) pr_debug("pon-depends-on not set for %s\n", desc->name); if (of_property_read_string(pdev->dev.of_node, "qcom,poff-depends-on", &desc->poff_depends_on)) pr_debug("poff-depends-on not set for %s\n", desc->name); return 0; } Loading
include/soc/qcom/subsystem_restart.h +8 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,12 @@ struct subsys_notif_timeout { * struct subsys_desc - subsystem descriptor * @name: name of subsystem * @fw_name: firmware name * @depends_on: subsystem this subsystem depends on to operate * @pon_depends_on: subsystem this subsystem wants to power-on first. If the * dependednt subsystem is already powered-on, the framework won't try to power * it back up again. * @poff_depends_on: subsystem this subsystem wants to power-off first. If the * dependednt subsystem is already powered-off, the framework won't try to power * it off again. * @dev: parent device * @owner: module the descriptor belongs to * @shutdown: Stop a subsystem Loading @@ -79,7 +84,8 @@ struct subsys_notif_timeout { struct subsys_desc { const char *name; char fw_name[256]; const char *depends_on; const char *pon_depends_on; const char *poff_depends_on; struct device *dev; struct module *owner; Loading