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

Commit f9916da0 authored by Dinesh K Garg's avatar Dinesh K Garg
Browse files

msm: mink: keep clocks enabled for duration of invoke call



Currently, smcinvoke enables clocks for duration of scm_call. However,
if that call initiates a listener based on qseecom, it could be a
problem. So we need to keep clocks until qseecom listeners are also
done.

Change-Id: Ib000bf0ba11d95b21fc1af8f44c33a9d0c339bac
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent b26a24c8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -362,15 +362,16 @@ static int prepare_send_scm_msg(const uint8_t *in_buf, size_t in_buf_len,
	set_msm_bus_request_locked(BW_HIGH);
	mutex_unlock(&smcinvoke_lock);
	ret = scm_call2(SMCINVOKE_TZ_CMD, &desc);
	mutex_lock(&smcinvoke_lock);
	set_msm_bus_request_locked(BW_INACTIVE);
	mutex_unlock(&smcinvoke_lock);

	/* process listener request */
	if (!ret && (desc.ret[0] == QSEOS_RESULT_INCOMPLETE ||
		desc.ret[0] == QSEOS_RESULT_BLOCKED_ON_LISTENER))
		ret = qseecom_process_listener_from_smcinvoke(&desc);

	mutex_lock(&smcinvoke_lock);
	set_msm_bus_request_locked(BW_INACTIVE);
	mutex_unlock(&smcinvoke_lock);

	*smcinvoke_result = (int32_t)desc.ret[1];
	if (ret || desc.ret[1] || desc.ret[2] || desc.ret[0])
		pr_err("SCM call failed with ret val = %d %d %d %d\n",