mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-08 21:11:01 +01:00
ARM: qca: scm_call: Added fuseipq support
Added scm_call wrapper to support fuseipq command to work with 64 bit scm_call. Change-Id: Ie1fd2925e9f7ed5b3eb57eb44b1c360d0d7de916 Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
4077f42d0a
commit
4e88bbf154
3 changed files with 23 additions and 3 deletions
|
|
@ -339,6 +339,26 @@ int qca_scm_call(u32 svc_id, u32 cmd_id, void *buf, size_t len)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int qca_scm_fuseipq(u32 svc_id, u32 cmd_id, void *buf, size_t len)
|
||||
{
|
||||
int ret = 0;
|
||||
uint32_t *status;
|
||||
#ifdef CONFIG_SCM_TZ64
|
||||
struct qca_scm_desc desc = {0};
|
||||
|
||||
desc.arginfo = QCA_SCM_ARGS(1, SCM_READ_OP);
|
||||
desc.args[0] = *((unsigned int *)buf);
|
||||
|
||||
ret = scm_call_64(svc_id, cmd_id, &desc);
|
||||
|
||||
status = (uint32_t *)(*(((uint32_t *)buf) + 1));
|
||||
*status = desc.ret[0];
|
||||
#else
|
||||
ret = scm_call(svc_id, cmd_id, buf, len, NULL, 0);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qca_scm_auth_kernel(void *cmd_buf,
|
||||
size_t cmd_len)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ extern int qca_scm_call(u32 svc_id, u32 cmd_id, void *buf, size_t len);
|
|||
int qca_scm_call_write(u32, u32, u32 *, u32);
|
||||
int qca_scm_call_read(u32, u32, u32 *, u32 *);
|
||||
int qca_scm_sdi_v8(void);
|
||||
int qca_scm_fuseipq(u32, u32, void *, size_t);
|
||||
|
||||
#define MAX_QCA_SCM_RETS 3
|
||||
#define MAX_QCA_SCM_ARGS 10
|
||||
|
|
|
|||
|
|
@ -45,9 +45,8 @@ int do_fuseipq(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
|||
fuseip.address = simple_strtoul(argv[1], NULL, 16);
|
||||
fuseip.status = (uint32_t)&fuse_status;
|
||||
|
||||
ret = scm_call(SCM_SVC_FUSE, TZ_BLOW_FUSE_SECDAT,
|
||||
&fuseip, sizeof(fuseip), NULL, 0);
|
||||
|
||||
ret = qca_scm_fuseipq(SCM_SVC_FUSE, TZ_BLOW_FUSE_SECDAT,
|
||||
&fuseip, sizeof(fuseip));
|
||||
|
||||
if (ret || fuse_status)
|
||||
printf("%s: Error in QFPROM write (%d, %d)\n",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue