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

Commit b500efeb authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

soc: qcom: peripheral-loader: Make the PIL shutdown op failure more visible



Currently, if the PIL op to shutdown a subsystem fails, we do not
print out an explicit error. The next time the subsystem boots,
print an error stating that shutdown previously failed in order
for the clients to be aware that powerup/subsystem execution
might not work as planned.

Change-Id: I953bba674223342ba5f87fc06a553c7c98634646
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent ebf056a1
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -653,6 +653,9 @@ int pil_boot(struct pil_desc *desc)
	const struct firmware *fw;
	struct pil_priv *priv = desc->priv;

	if (desc->shutdown_fail)
		pil_err(desc, "Subsystem shutdown failed previously!\n");

	/* Reinitialize for new image */
	pil_release_mmap(desc);

@@ -763,8 +766,12 @@ void pil_shutdown(struct pil_desc *desc)
{
	struct pil_priv *priv = desc->priv;

	if (desc->ops->shutdown)
		desc->ops->shutdown(desc);
	if (desc->ops->shutdown) {
		if (desc->ops->shutdown(desc))
			desc->shutdown_fail = true;
		else
			desc->shutdown_fail = false;
	}

	if (desc->proxy_unvote_irq) {
		disable_irq(desc->proxy_unvote_irq);
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ struct pil_priv;
 * This defaults to ioremap if not specified.
 * @unmap_fw_mem: Custom function used to undo mapping by map_fw_mem.
 * This defaults to iounmap if not specified.
 * @shutdown_fail: Set if PIL op for shutting down subsystem fails.
 */
struct pil_desc {
	const char *name;
@@ -49,6 +50,7 @@ struct pil_desc {
	void * (*map_fw_mem)(phys_addr_t phys, size_t size, void *data);
	void (*unmap_fw_mem)(void *virt, size_t size, void *data);
	void *map_data;
	bool shutdown_fail;
};

/**