Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d7046d2 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

soc: qcom: shared_memory: Add support for the new scm_call2 API



The scm library has added support for a new secure world
interface that is more aligned to the ARMv8 SMC calling
convention. Use the new API while maintaining backward
compatibility.

Change-Id: Ie7ebd01be5416baa80b8c8df4880e7493062785f
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 59f10715
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -35,15 +35,20 @@ static int msm_shared_heap_unlock(dma_addr_t base,
		u32 share_type;
	} request;
	int resp = 0;
	struct scm_desc desc = {0};

	request.start = base;
	request.size = size;
	request.proc = proc_type;
	request.share_type = SHARED_HEAP_TYPE_READ |
	desc.arginfo = SCM_ARGS(4);
	desc.args[0] = request.start = base;
	desc.args[1] = request.size = size;
	desc.args[2] = request.proc = proc_type;
	desc.args[3] = request.share_type = SHARED_HEAP_TYPE_READ |
						SHARED_HEAP_TYPE_WRITE;

	if (!is_scm_armv8())
		rc = scm_call(SHARED_HEAP_SVC_ID, SHARED_HEAP_CMD_ID, &request,
				  sizeof(request), &resp, 1);
	else
		rc = scm_call2(SCM_SIP_FNID(SHARED_HEAP_SVC_ID,
			       SHARED_HEAP_CMD_ID), &desc);

	if (rc)
		pr_err("shared_heap: Failed to unlock the shared heap %d\n",