firmware: qcom: tz_log: 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: I1fcf96b3a4ca55a7cd8c928d0f526250be5085bb
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
Zhen Kong 2014-08-07 20:43:53 -07:00 committed by Vikram Mulukutla
parent a59b27ed64
commit e7d75b5cb7
1 changed files with 13 additions and 3 deletions

View File

@ -586,9 +586,19 @@ static void tzdbg_register_qsee_log_buf(void)
req.phy_addr = (uint32_t)pa;
req.len = len;
/* SCM_CALL to register the log buffer */
ret = scm_call(SCM_SVC_TZSCHEDULER, 1, &req, sizeof(req),
&resp, sizeof(resp));
if (!is_scm_armv8()) {
/* SCM_CALL to register the log buffer */
ret = scm_call(SCM_SVC_TZSCHEDULER, 1, &req, sizeof(req),
&resp, sizeof(resp));
} else {
struct scm_desc desc = {0};
desc.args[0] = (uint32_t)pa;
desc.args[1] = len;
desc.arginfo = 0x22;
ret = scm_call2(SCM_QSEEOS_FNID(1, 6), &desc);
resp.result = desc.ret[0];
}
if (ret) {
pr_err("%s: scm_call to register log buffer failed\n",
__func__);