mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to mbox_reset_cold()
mbox_reset_cold() will invoke ATF's PSCI service when running in non-secure mode (EL2). Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
This commit is contained in:
parent
677b420a15
commit
3b07cec93a
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <asm/arch/mailbox_s10.h>
|
#include <asm/arch/mailbox_s10.h>
|
||||||
#include <asm/arch/system_manager.h>
|
#include <asm/arch/system_manager.h>
|
||||||
#include <asm/secure.h>
|
#include <asm/secure.h>
|
||||||
|
#include <asm/system.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -398,6 +399,9 @@ error:
|
||||||
|
|
||||||
int mbox_reset_cold(void)
|
int mbox_reset_cold(void)
|
||||||
{
|
{
|
||||||
|
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_ATF)
|
||||||
|
psci_system_reset();
|
||||||
|
#else
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = mbox_send_cmd(MBOX_ID_UBOOT, MBOX_REBOOT_HPS, MBOX_CMD_DIRECT,
|
ret = mbox_send_cmd(MBOX_ID_UBOOT, MBOX_REBOOT_HPS, MBOX_CMD_DIRECT,
|
||||||
|
@ -406,6 +410,7 @@ int mbox_reset_cold(void)
|
||||||
/* mailbox sent failure, wait for watchdog to kick in */
|
/* mailbox sent failure, wait for watchdog to kick in */
|
||||||
hang();
|
hang();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue