aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2018-10-08 22:08:05 -0400
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-10-09 02:17:25 -0400
commitbbcda30271752bb7490f2e2aef5411dbcae69116 (patch)
treec1023520ef09a6ed6617fe1a6f20d91c5be0c36e
parent3bf62eb77c7918884d640a2ee25ddb542ac6d0ca (diff)
remoteproc: qcom: q6v5-mss: add SCM probe dependency
The memory ownership transfer request is performed using SCM, ensure that SCM is available before we probe the driver if memory protection is needed by the subsystem. Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Cc: stable@vger.kernel.org Signed-off-by: Brian Norris <briannorris@chromium.org> [bjorn: Added condition for need_mem_protection, updated commit message] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r--drivers/remoteproc/qcom_q6v5_mss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 3448f1df2e87..4c47f5e0a87c 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1152,6 +1152,9 @@ static int q6v5_probe(struct platform_device *pdev)
1152 if (!desc) 1152 if (!desc)
1153 return -EINVAL; 1153 return -EINVAL;
1154 1154
1155 if (desc->need_mem_protection && !qcom_scm_is_available())
1156 return -EPROBE_DEFER;
1157
1155 rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops, 1158 rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops,
1156 desc->hexagon_mba_image, sizeof(*qproc)); 1159 desc->hexagon_mba_image, sizeof(*qproc));
1157 if (!rproc) { 1160 if (!rproc) {