ipq807x: Added support for secure pshold

Change-Id: Ie6369013611eabc6e67a30347cb0e9d87d3ce067
Signed-off-by: Saravanan Jaganathan <sjaganat@codeaurora.org>
This commit is contained in:
Saravanan Jaganathan 2018-01-23 11:45:11 +05:30 committed by Gerrit - the friendly Code Review server
parent ff83336bcd
commit 216b4fdcfe
2 changed files with 12 additions and 1 deletions

View file

@ -205,13 +205,23 @@ void psci_sys_reset(void)
__invoke_psci_fn_smc(0x84000009, 0, 0, 0);
}
void qcom_scm_pshold(void)
{
int ret;
ret = scm_call(SCM_SVC_BOOT, SCM_CMD_TZ_PSHOLD, NULL, 0, NULL, 0);
if (ret != 0)
writel(0, GCNT_PSHOLD);
}
void reset_cpu(unsigned long a)
{
reset_crashdump();
if (is_scm_armv8()) {
psci_sys_reset();
} else {
writel(0, GCNT_PSHOLD);
qcom_scm_pshold();
}
while(1);
}

View file

@ -255,6 +255,7 @@ extern loff_t board_env_size;
#define CLEAR_MAGIC 0x0
#define SCM_CMD_TZ_CONFIG_HW_FOR_RAM_DUMP_ID 0x9
#define SCM_CMD_TZ_FORCE_DLOAD_ID 0x10
#define SCM_CMD_TZ_PSHOLD 0x15
#define BOOT_VERSION 0
#define TZ_VERSION 1
#define RPM_VERSION 3