arm64: implement arch_system_halt
When PSCI is enabled, implement `arch_system_halt` using PSCI_SHUTDOWN. Signed-off-by: Henri Xavier <datacomos@huawei.com>
This commit is contained in:
parent
7668bd3b7c
commit
b54ba9877f
3 changed files with 42 additions and 1 deletions
|
@ -66,6 +66,20 @@ int pm_cpu_on(unsigned long cpuid,
|
|||
return psci_to_dev_err(ret);
|
||||
}
|
||||
|
||||
int pm_system_off(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (psci_data.conduit == SMCCC_CONDUIT_NONE) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* A compliant PSCI implementation will never return from this call */
|
||||
ret = psci_data.invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
|
||||
|
||||
return psci_to_dev_err(ret);
|
||||
}
|
||||
|
||||
static unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
|
||||
unsigned long arg0,
|
||||
unsigned long arg1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue