arch/arm/psci: Fixed the poweroff command blocking problem.

Summary:
1. Delete redundant psci_cpu_reset interfaces
2. Adjust the correct interfaces for poweroff and reset

Signed-off-by: wangming9 <wangming9@xiaomi.com>
This commit is contained in:
wangming9 2024-04-24 15:58:10 +08:00 committed by Xiang Xiao
parent c429438f0d
commit aabc458bcd
4 changed files with 6 additions and 36 deletions

View File

@ -162,20 +162,6 @@ int psci_cpu_off(void)
return psci_to_dev_err(ret);
}
int psci_cpu_reset(void)
{
int ret;
if (psci_data.conduit == SMCCC_CONDUIT_NONE)
{
return -EINVAL;
}
ret = psci_data.invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
return psci_to_dev_err(ret);
}
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
{
int ret;
@ -185,7 +171,7 @@ int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
return -EINVAL;
}
ret = psci_data.invoke_psci_fn(PSCI_FN_NATIVE(0_2, CPU_ON),
ret = psci_data.invoke_psci_fn(PSCI_0_2_FN_CPU_ON,
cpuid, (unsigned long)entry_point, 0);
return psci_to_dev_err(ret);
@ -245,7 +231,7 @@ void up_systempoweroff(void)
/* Set up for the system poweroff */
ret = psci_cpu_off();
ret = psci_sys_poweroff();
if (ret)
{
sinfo("Failed to power off CPU, error code: %d\n", ret);
@ -270,7 +256,7 @@ void up_systemreset(void)
/* Set up for the system reset */
ret = psci_cpu_reset();
ret = psci_sys_reset();
if (ret)
{
sinfo("Failed to reset CPU, error code: %d\n", ret);

View File

@ -150,7 +150,6 @@ void arm_smccc_smc(unsigned long a0, unsigned long a1,
uint32_t psci_version(void);
int psci_cpu_off(void);
int psci_cpu_reset(void);
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
int psci_sys_poweroff(void);
int psci_sys_reset(void);

View File

@ -164,20 +164,6 @@ int psci_cpu_off(void)
return psci_to_dev_err(ret);
}
int psci_cpu_reset(void)
{
int ret;
if (psci_data.conduit == SMCCC_CONDUIT_NONE)
{
return -EINVAL;
}
ret = psci_data.invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
return psci_to_dev_err(ret);
}
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
{
int ret;
@ -187,7 +173,7 @@ int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
return -EINVAL;
}
ret = psci_data.invoke_psci_fn(PSCI_FN_NATIVE(0_2, CPU_ON),
ret = psci_data.invoke_psci_fn(PSCI_0_2_FN_CPU_ON,
cpuid, (unsigned long)entry_point, 0);
return psci_to_dev_err(ret);
@ -247,7 +233,7 @@ void up_systempoweroff(void)
/* Set up for the system poweroff */
ret = psci_cpu_off();
ret = psci_sys_poweroff();
if (ret)
{
serr("Failed to power off CPU, error code: %d\n", ret);
@ -272,7 +258,7 @@ void up_systemreset(void)
/* Set up for the system reset */
ret = psci_cpu_reset();
ret = psci_sys_reset();
if (ret)
{
serr("Failed to reset CPU, error code: %d\n", ret);

View File

@ -99,7 +99,6 @@ struct psci_interface
uint32_t psci_version(void);
int psci_cpu_off(void);
int psci_cpu_reset(void);
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
int psci_sys_poweroff(void);
int psci_sys_reset(void);