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

Commit d1dc673f authored by Avaneesh Kumar Dwivedi's avatar Avaneesh Kumar Dwivedi Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: Skip clearing modem FW region post load failure



In existing implementation, we are clearing fw region when loading fails
midway. This is not in consonance with MBA design so differentiate
between modem and other PIL modules. While at it, rectify the data type
of subsys_state in qmi_client_info as well.

Change-Id: I985456fca42346947eac24df5bf66599dcbf4c53
Signed-off-by: default avatarAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent 0f1f6773
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -913,6 +913,7 @@ out:
					&desc->attrs);
			priv->region = NULL;
		}
		if (desc->clear_fw_region)
			pil_clear_segment(desc);
		pil_release_mmap(desc);
	}
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017, 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
@@ -38,6 +38,7 @@ struct pil_priv;
 * @shutdown_fail: Set if PIL op for shutting down subsystem fails.
 * @modem_ssr: true if modem is restarting, false if booting for first time.
 * @subsys_vmid: memprot id for the subsystem.
 * @clear_fw_region: Clear fw region on failure in loading.
 */
struct pil_desc {
	const char *name;
@@ -57,6 +58,7 @@ struct pil_desc {
	bool shutdown_fail;
	bool modem_ssr;
	u32 subsys_vmid;
	bool clear_fw_region;
};

/**
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2017, 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
@@ -591,6 +591,7 @@ struct q6v5_data *pil_q6v5_init(struct platform_device *pdev)
	if (ret)
		return ERR_PTR(ret);

	desc->clear_fw_region = false;
	desc->dev = &pdev->dev;

	drv->qdsp6v5_2_0 = of_device_is_compatible(pdev->dev.of_node,
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, 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
@@ -1000,6 +1000,7 @@ static int pil_tz_driver_probe(struct platform_device *pdev)
	d->desc.ops = &pil_ops_trusted;

	d->desc.proxy_timeout = PROXY_TIMEOUT_MS;
	d->desc.clear_fw_region = true;

	rc = of_property_read_u32(pdev->dev.of_node, "qcom,proxy-timeout-ms",
					&proxy_timeout);