Skip to content

Commit

Permalink
remoteproc: qcom: q6v5-mss: add SCM probe dependency
Browse files Browse the repository at this point in the history
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: 6c5a9dc ("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>
  • Loading branch information
Brian Norris authored and Bjorn Andersson committed Oct 9, 2018
1 parent 3bf62eb commit bbcda30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/remoteproc/qcom_q6v5_mss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,9 @@ static int q6v5_probe(struct platform_device *pdev)
if (!desc)
return -EINVAL;

if (desc->need_mem_protection && !qcom_scm_is_available())
return -EPROBE_DEFER;

rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops,
desc->hexagon_mba_image, sizeof(*qproc));
if (!rproc) {
Expand Down

0 comments on commit bbcda30

Please sign in to comment.