Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d8080a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcom: pil: Add PIL operation to undo init_image work on pil_boot failure"

parents 287c13f2 1b132ea0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -726,21 +726,24 @@ int pil_boot(struct pil_desc *desc)
				priv->region_end - priv->region_start);
	if (ret) {
		pil_err(desc, "Memory setup error\n");
		goto err_boot;
		goto err_deinit_image;
	}

	list_for_each_entry(seg, &desc->priv->segs, list) {
		ret = pil_load_seg(desc, seg);
		if (ret)
			goto err_boot;
			goto err_deinit_image;
	}

	ret = desc->ops->auth_and_reset(desc);
	if (ret) {
		pil_err(desc, "Failed to bring out of reset\n");
		goto err_boot;
		goto err_deinit_image;
	}
	pil_info(desc, "Brought out of reset\n");
err_deinit_image:
	if (ret && desc->ops->deinit_image)
		desc->ops->deinit_image(desc);
err_boot:
	pil_proxy_unvote(desc, ret);
release_fw:
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -55,6 +55,7 @@ struct pil_desc {
 * @proxy_vote: make proxy votes before auth_and_reset (optional)
 * @auth_and_reset: boot the processor
 * @proxy_unvote: remove any proxy votes (optional)
 * @deinit_image: restore actions performed in init_image if necessary
 * @shutdown: shutdown the processor
 */
struct pil_reset_ops {
@@ -66,6 +67,7 @@ struct pil_reset_ops {
	int (*proxy_vote)(struct pil_desc *pil);
	int (*auth_and_reset)(struct pil_desc *pil);
	void (*proxy_unvote)(struct pil_desc *pil);
	int (*deinit_image)(struct pil_desc *pil);
	int (*shutdown)(struct pil_desc *pil);
};