ipq6018: reset: Do pmic reset if "atf" env variable is set

Change-Id: Ie8e1f1907841cac52c52005209bbcec5690de4de
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
Antony Arun T 2019-09-06 12:09:53 +05:30
parent 57117bb939
commit bc59f37c9b

View file

@ -1150,10 +1150,27 @@ void qti_scm_pshold(void)
writel(0, GCNT_PSHOLD);
}
static void atf_reset(void)
{
if(*tz_wonce == 0 ) { /*COLD REBOOT*/
if(do_pmic_reset())
printf("PMIC Reset failed, please do power cycle\n");
}
else { /*WARM REBOOT*/
psci_sys_reset();
}
while(1);
}
void reset_cpu(unsigned long a)
{
reset_crashdump();
psci_sys_reset();
if(getenv("atf"))
atf_reset();
else
psci_sys_reset();
while(1);
}