mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
ipq807x: Reset operation through PSCI
Change-Id: Ib1f2e8f7990101aaa48c3bc259ec293008efca02 Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
71c93c6ee1
commit
9dc890a648
4 changed files with 20 additions and 2 deletions
|
|
@ -221,3 +221,8 @@ ENTRY(psci_cpu_entry)
|
|||
ENDPROC(psci_cpu_entry)
|
||||
|
||||
.popsection
|
||||
|
||||
ENTRY(__invoke_psci_fn_smc)
|
||||
__SMC(0)
|
||||
bx lr
|
||||
ENDPROC(__invoke_psci_fn_smc)
|
||||
|
|
|
|||
|
|
@ -37,4 +37,9 @@ int psci_update_dt(void *fdt);
|
|||
void psci_board_init(void);
|
||||
#endif /* ! __ASSEMBLY__ */
|
||||
|
||||
#define ___inst_arm(x) .long x
|
||||
|
||||
#define __inst_arm(x) ___inst_arm((x) & 0xFFFFFFFF)
|
||||
#define __SMC(imm4) __inst_arm(0xE1600070 | (((imm4) & 0xF) << 0))
|
||||
|
||||
#endif /* __ARM_PSCI_H__ */
|
||||
|
|
|
|||
|
|
@ -25,12 +25,15 @@
|
|||
#include <fdtdec.h>
|
||||
#include <mmc.h>
|
||||
#include <usb.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define GCNT_PSHOLD 0x004AB000
|
||||
qca_mmc mmc_host;
|
||||
|
||||
extern asmlinkage void __invoke_psci_fn_smc(unsigned long, unsigned long, unsigned long, unsigned long);
|
||||
|
||||
extern loff_t board_env_offset;
|
||||
extern loff_t board_env_range;
|
||||
extern loff_t board_env_size;
|
||||
|
|
@ -164,10 +167,15 @@ void reset_crashdump(void)
|
|||
return;
|
||||
}
|
||||
|
||||
void psci_sys_reset(void)
|
||||
{
|
||||
__invoke_psci_fn_smc(0x84000009, 0, 0, 0);
|
||||
}
|
||||
|
||||
void reset_cpu(unsigned long a)
|
||||
{
|
||||
reset_crashdump();
|
||||
writel(0, GCNT_PSHOLD);
|
||||
psci_sys_reset();
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,6 @@ extern loff_t board_env_size;
|
|||
*/
|
||||
|
||||
#define CONFIG_CMD_RUN
|
||||
|
||||
#define CONFIG_ARMV7_PSCI
|
||||
#endif /* _IPQCDP_H */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue