summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/qcom_scm-64.c
diff options
context:
space:
mode:
authorAndy Gross2017-01-17 06:24:15 +0100
committerAndy Gross2017-01-17 06:45:04 +0100
commita811b420b6c13759540070c0e9541b7cd8569168 (patch)
tree29a25adf699ded7909e3075dd3a1e30deacaccdd /drivers/firmware/qcom_scm-64.c
parentMAINTAINERS: Update the files to include the Qualcomm DMA folder (diff)
downloadkernel-qcow2-linux-a811b420b6c13759540070c0e9541b7cd8569168.tar.gz
kernel-qcow2-linux-a811b420b6c13759540070c0e9541b7cd8569168.tar.xz
kernel-qcow2-linux-a811b420b6c13759540070c0e9541b7cd8569168.zip
firmware: qcom_scm: Add set remote state API
This patch adds a set remote state SCM API. This will be used by the Venus and GPU subsystems to set state on the remote processors. This work was based on two patch sets by Jordan Crouse and Stanimir Varbanov. Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/firmware/qcom_scm-64.c')
-rw-r--r--drivers/firmware/qcom_scm-64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c
index 4a0f5ead4fb5..4b220abaf363 100644
--- a/drivers/firmware/qcom_scm-64.c
+++ b/drivers/firmware/qcom_scm-64.c
@@ -358,3 +358,19 @@ int __qcom_scm_pas_mss_reset(struct device *dev, bool reset)
return ret ? : res.a1;
}
+
+int __qcom_scm_set_remote_state(struct device *dev, u32 state, u32 id)
+{
+ struct qcom_scm_desc desc = {0};
+ struct arm_smccc_res res;
+ int ret;
+
+ desc.args[0] = state;
+ desc.args[1] = id;
+ desc.arginfo = QCOM_SCM_ARGS(2);
+
+ ret = qcom_scm_call(dev, QCOM_SCM_SVC_BOOT, QCOM_SCM_SET_REMOTE_STATE,
+ &desc, &res);
+
+ return ret ? : res.a1;
+}