summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_common.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2020-11-22 08:41:33 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-11-26 03:03:30 +0300
commit5c212aaf5457ca5bd99aba3ad29a4a17f8129939 (patch)
tree70cead60cf9d080eecb03da413fcaa3211f814fa /drivers/remoteproc/qcom_common.h
parent138a6428ba9023ae29e103e87a223575fbc3d2b7 (diff)
downloadlinux-5c212aaf5457ca5bd99aba3ad29a4a17f8129939.tar.xz
remoteproc: sysmon: Expose the shutdown result
A graceful shutdown of the Qualcomm remote processors where traditionally performed by invoking a shared memory state signal and waiting for the associated ack. This was later superseded by the "sysmon" mechanism, where some form of shared memory bus is used to send a "graceful shutdown request" message and one of more signals comes back to indicate its success. But when this newer mechanism is in effect the firmware is shut down by the time the older mechanism, implemented in the remoteproc drivers, attempts to perform a graceful shutdown - and as such it will never receive an ack back. This patch therefor track the success of the latest shutdown attempt in sysmon and exposes a new function in the API that the remoteproc driver can use to query the success and the necessity of invoking the older mechanism. Tested-by: Steev Klimaszewski <steev@kali.org> Reviewed-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Link: https://lore.kernel.org/r/20201122054135.802935-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_common.h')
-rw-r--r--drivers/remoteproc/qcom_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/remoteproc/qcom_common.h b/drivers/remoteproc/qcom_common.h
index dfc641c3a98b..8ba9052955bd 100644
--- a/drivers/remoteproc/qcom_common.h
+++ b/drivers/remoteproc/qcom_common.h
@@ -51,6 +51,7 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
const char *name,
int ssctl_instance);
void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon);
+bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon);
#else
static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
const char *name,
@@ -62,6 +63,11 @@ static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon)
{
}
+
+static inline bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon)
+{
+ return false;
+}
#endif
#endif