]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
firmware: scm: add proc restart support
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 24 Nov 2015 16:55:32 +0000 (16:55 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 13 Apr 2018 14:00:28 +0000 (16:00 +0200)
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
drivers/firmware/qcom_scm-32.c
drivers/firmware/qcom_scm-64.c
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h
include/linux/qcom_scm.h

index 2ac6abc0d6523570dcb62d5a4cd055280adf743e..26a6a8cace793994280404b5e370a553f4f8e1c3 100644 (file)
@@ -501,6 +501,14 @@ int __qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)
                req, req_cnt * sizeof(*req), resp, sizeof(*resp));
 }
 
+int __qcom_scm_restart_proc(u32 proc_id, int restart, u32 *resp)
+{
+
+       return qcom_scm_call(QCOM_SCM_SVC_PIL, proc_id,
+                               &restart, sizeof(restart),
+                               &resp, sizeof(resp));
+}
+
 bool __qcom_scm_pas_supported(u32 peripheral)
 {
        u32 ret_val;
index b3a9784c15efe05c34f3892094ac5cee9429b316..6b31a8c00d1d0e36d7e8419089d4a59d6ba61a94 100644 (file)
@@ -472,6 +472,22 @@ int __qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)
        return ret;
 }
 
+int __qcom_scm_restart_proc(u32 proc_id, int restart, u32 *resp)
+{
+       int ret;
+       struct qcom_scm_desc desc = {0};
+
+       desc.args[0] = restart;
+       desc.args[1] = 0;
+       desc.arginfo = QCOM_SCM_ARGS(2);
+
+       ret = qcom_scm_call(QCOM_SCM_SVC_PIL, proc_id,
+                               &desc);
+       *resp = desc.ret[0];
+
+       return ret;
+}
+
 bool __qcom_scm_pas_supported(u32 peripheral)
 {
        int ret;
index 5fff0858f7ba2ce34311f6ad8a00fd3f52af30d0..7ed996ba9411cfcddd0d0dbb44165e250274743e 100644 (file)
@@ -96,6 +96,11 @@ int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)
 }
 EXPORT_SYMBOL(qcom_scm_hdcp_req);
 
+int qcom_scm_restart_proc(u32 pid, int restart, u32 *resp)
+{
+       return __qcom_scm_restart_proc(pid, restart, resp);
+}
+EXPORT_SYMBOL(qcom_scm_restart_proc);
 /**
  * qcom_scm_pas_supported() - Check if the peripheral authentication service is
  *                           available for the given peripherial
index 5d7f0ef6fee787b9d438bc8ec984ef817ade626b..2f46f0ced9f73aec45b864482f776e11c597521f 100644 (file)
@@ -111,6 +111,7 @@ extern int __qcom_scm_iommu_secure_unmap(u32 id, u32 ctx_id, u64 va,
 extern int __qcom_scm_is_call_available(u32 svc_id, u32 cmd_id);
 extern int __qcom_scm_get_feat_version(u32 feat);
 extern int __qcom_scm_restore_sec_cfg(u32 device_id, u32 spare);
+extern int __qcom_scm_restart_proc(u32 proc_id, int restart, u32 *resp);
 
 extern int __qcom_scm_set_video_state(u32 state, u32 spare);
 extern int __qcom_scm_mem_protect_video_var(u32 start, u32 size,
index 8e042773dd5859ccf1eba5ec06ff23071f3879de..0b9f01b489cb2d70c53a3d4471918bc4efb0daf2 100644 (file)
@@ -32,6 +32,7 @@ extern int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt,
                u32 *resp);
 
 extern bool qcom_scm_pas_supported(u32 peripheral);
+extern int qcom_scm_restart_proc(u32 pid, int restart, u32 *resp);
 extern int qcom_scm_pas_init_image(struct device *dev, u32 peripheral, const void *metadata, size_t size);
 extern int qcom_scm_pas_mem_setup(u32 peripheral, phys_addr_t addr, phys_addr_t size);
 extern int qcom_scm_pas_auth_and_reset(u32 peripheral);