devfreq: spdm: Fix call to TZ spdm driver

The TZ SPDM driver mandates the number of arguments be constant for a
given command id.  This patch allows the spdm driver to communicate with
the TZ driver correctly.

Change-Id: Id3cfd2490039c4abde6d5381859d8facf545e85e
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
This commit is contained in:
Dan Sneddon 2015-05-07 10:42:33 -06:00 committed by Gerrit - the friendly Code Review server
parent f49550ecde
commit 271a080090

View file

@ -278,7 +278,11 @@ int __spdm_scm_call(struct spdm_args *args, int num_args)
sizeof(args->ret));
} else {
struct scm_desc desc = {0};
desc.arginfo = SCM_ARGS(num_args);
/*
* Need to hard code this, this is a requirement from TZ syscall
* interface.
*/
desc.arginfo = SCM_ARGS(6);
memcpy(desc.args, args->arg,
COPY_SIZE(sizeof(desc.args), sizeof(args->arg)));