diff options
author | Sameer Thalappil <sameert@codeaurora.org> | 2017-01-10 15:32:58 -0800 |
---|---|---|
committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-17 14:18:57 -0800 |
commit | 55f6881c5a39f83372d8d8c959a1ca5145dd23b0 (patch) | |
tree | 0616b43163c25abed29192d376ef34e248799a4a /core/pld/src/pld_common.c | |
parent | 0c2b1d59510132a4c1a80ef8da748139c4604629 (diff) | |
download | qcacld-55f6881c5a39f83372d8d8c959a1ca5145dd23b0.tar.gz |
qcacld-3.0: Add support for host initiated recovery
If platform has a mechanism to initiate target assert, trigger
that interface to force assert target. Certain integrated platforms
(where WLAN runs on it's own PD) provides a mechanism to initiate PDR
from host. That interface can be triggered when WLAN host detect
timeout scenarios.
CRs-Fixed: 1110243
Change-Id: I6a9408f47ca4245380dbf4177363c3c461ff948d
Diffstat (limited to 'core/pld/src/pld_common.c')
-rw-r--r-- | core/pld/src/pld_common.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 0c052f4d5c..950cc625b3 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1576,3 +1576,34 @@ int pld_is_qmi_disable(struct device *dev) return ret; } + +/** + * pld_force_assert_target() - Send a force assert to FW. + * This can use various sideband requests available at platform to + * initiate a FW assert. + * @dev: device + * + * Return: 0 if force assert of target was triggered successfully + * Non zero failure code for errors + */ +int pld_force_assert_target(struct device *dev) +{ + int ret = 0; + enum pld_bus_type type = pld_get_bus_type(dev); + + switch (type) { + case PLD_BUS_TYPE_SNOC: + ret = pld_snoc_force_assert_target(dev); + break; + + case PLD_BUS_TYPE_PCIE: + case PLD_BUS_TYPE_SDIO: + ret = -EINVAL; + break; + default: + pr_err("Invalid device type %d\n", type); + ret = -EINVAL; + break; + } + return ret; +} |