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: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
Avaneesh Kumar Dwivedi 2017-03-17 16:41:13 +05:30 committed by Gerrit - the friendly Code Review server
parent d3b629de8f
commit efb32d0dec
4 changed files with 9 additions and 4 deletions

View File

@ -774,7 +774,8 @@ out:
&desc->attrs);
priv->region = NULL;
}
pil_clear_segment(desc);
if (desc->clear_fw_region)
pil_clear_segment(desc);
pil_release_mmap(desc);
}
return ret;

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2015,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
@ -36,6 +36,7 @@ struct pil_priv;
* @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.
* @clear_fw_region: Clear fw region on failure in loading.
*/
struct pil_desc {
const char *name;
@ -53,6 +54,7 @@ struct pil_desc {
void (*unmap_fw_mem)(void *virt, size_t size, void *data);
void *map_data;
bool shutdown_fail;
bool clear_fw_region;
};
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2015,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
@ -466,6 +466,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,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015,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
@ -917,6 +917,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);