mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
qseecom: Vote for CE clk before loading image
Add support for setting the Crypto HW to operate in high bandwidth mode before issuing a request to load image. This is needed for better performance when using crypto HW to authenticate the image before loading it. Change-Id: Ib976d8227e605b9aad8191c6fe8f1dcc5d28e90e Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
This commit is contained in:
parent
2a59c6fb52
commit
5e5949c4f1
1 changed files with 14 additions and 0 deletions
|
@ -1318,6 +1318,15 @@ static int __qseecom_load_fw(struct qseecom_dev_handle *data, char *appname)
|
|||
/* Populate the remaining parameters */
|
||||
load_req.qsee_cmd_id = QSEOS_APP_START_COMMAND;
|
||||
memcpy(load_req.app_name, appname, MAX_APP_NAME_SIZE);
|
||||
mutex_lock(&app_access_lock);
|
||||
ret = qsee_vote_for_clock(CLK_SFPB);
|
||||
if (ret) {
|
||||
kzfree(img_data);
|
||||
pr_warning("Unable to vote for SFPB clock");
|
||||
mutex_unlock(&app_access_lock);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* SCM_CALL to load the image */
|
||||
ret = scm_call(SCM_SVC_TZSCHEDULER, 1, &load_req,
|
||||
sizeof(struct qseecom_load_app_ireq),
|
||||
|
@ -1325,6 +1334,8 @@ static int __qseecom_load_fw(struct qseecom_dev_handle *data, char *appname)
|
|||
kzfree(img_data);
|
||||
if (ret) {
|
||||
pr_err("scm_call to load failed : ret %d\n", ret);
|
||||
qsee_disable_clock_vote(CLK_SFPB);
|
||||
mutex_unlock(&app_access_lock);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -1347,6 +1358,9 @@ static int __qseecom_load_fw(struct qseecom_dev_handle *data, char *appname)
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
qsee_disable_clock_vote(CLK_SFPB);
|
||||
mutex_unlock(&app_access_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue