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:
parent
c429438f0d
commit
aabc458bcd
@ -162,20 +162,6 @@ int psci_cpu_off(void)
|
|||||||
return psci_to_dev_err(ret);
|
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 psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -185,7 +171,7 @@ int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
|
|||||||
return -EINVAL;
|
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);
|
cpuid, (unsigned long)entry_point, 0);
|
||||||
|
|
||||||
return psci_to_dev_err(ret);
|
return psci_to_dev_err(ret);
|
||||||
@ -245,7 +231,7 @@ void up_systempoweroff(void)
|
|||||||
|
|
||||||
/* Set up for the system poweroff */
|
/* Set up for the system poweroff */
|
||||||
|
|
||||||
ret = psci_cpu_off();
|
ret = psci_sys_poweroff();
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
sinfo("Failed to power off CPU, error code: %d\n", 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 */
|
/* Set up for the system reset */
|
||||||
|
|
||||||
ret = psci_cpu_reset();
|
ret = psci_sys_reset();
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
sinfo("Failed to reset CPU, error code: %d\n", ret);
|
sinfo("Failed to reset CPU, error code: %d\n", ret);
|
||||||
|
@ -150,7 +150,6 @@ void arm_smccc_smc(unsigned long a0, unsigned long a1,
|
|||||||
|
|
||||||
uint32_t psci_version(void);
|
uint32_t psci_version(void);
|
||||||
int psci_cpu_off(void);
|
int psci_cpu_off(void);
|
||||||
int psci_cpu_reset(void);
|
|
||||||
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
|
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
|
||||||
int psci_sys_poweroff(void);
|
int psci_sys_poweroff(void);
|
||||||
int psci_sys_reset(void);
|
int psci_sys_reset(void);
|
||||||
|
@ -164,20 +164,6 @@ int psci_cpu_off(void)
|
|||||||
return psci_to_dev_err(ret);
|
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 psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -187,7 +173,7 @@ int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point)
|
|||||||
return -EINVAL;
|
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);
|
cpuid, (unsigned long)entry_point, 0);
|
||||||
|
|
||||||
return psci_to_dev_err(ret);
|
return psci_to_dev_err(ret);
|
||||||
@ -247,7 +233,7 @@ void up_systempoweroff(void)
|
|||||||
|
|
||||||
/* Set up for the system poweroff */
|
/* Set up for the system poweroff */
|
||||||
|
|
||||||
ret = psci_cpu_off();
|
ret = psci_sys_poweroff();
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
serr("Failed to power off CPU, error code: %d\n", 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 */
|
/* Set up for the system reset */
|
||||||
|
|
||||||
ret = psci_cpu_reset();
|
ret = psci_sys_reset();
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
serr("Failed to reset CPU, error code: %d\n", ret);
|
serr("Failed to reset CPU, error code: %d\n", ret);
|
||||||
|
@ -99,7 +99,6 @@ struct psci_interface
|
|||||||
|
|
||||||
uint32_t psci_version(void);
|
uint32_t psci_version(void);
|
||||||
int psci_cpu_off(void);
|
int psci_cpu_off(void);
|
||||||
int psci_cpu_reset(void);
|
|
||||||
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
|
int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point);
|
||||||
int psci_sys_poweroff(void);
|
int psci_sys_poweroff(void);
|
||||||
int psci_sys_reset(void);
|
int psci_sys_reset(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user