diff --git a/board/qca/arm/ipq807x/ipq807x.c b/board/qca/arm/ipq807x/ipq807x.c index 894becb78e..f159626cc9 100644 --- a/board/qca/arm/ipq807x/ipq807x.c +++ b/board/qca/arm/ipq807x/ipq807x.c @@ -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); } diff --git a/include/configs/ipq807x.h b/include/configs/ipq807x.h index 5f2c4087a6..359dd53d3e 100644 --- a/include/configs/ipq807x.h +++ b/include/configs/ipq807x.h @@ -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