mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 03:03:00 +09:00
linux: reboot power down cpu timeout [1/3]
PD#SH-5853 Problem: reboot power down cpu timeout Solution: power down cpus throug bl31 set PWRN_EN bits Verify: S905D3 Signed-off-by: fushan.zeng <fushan.zeng@amlogic.com> Change-Id: Ib0a9bcf5ef4d0115ba0e83864f6497761050d6f5
This commit is contained in:
@@ -48,6 +48,10 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mpu.h>
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
#include <asm/cp15.h>
|
||||
#define MIDR __ACCESS_CP15(c0, 0, c0, 0)
|
||||
#endif
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/ipi.h>
|
||||
|
||||
@@ -575,6 +579,19 @@ static void ipi_cpu_stop(unsigned int cpu)
|
||||
local_fiq_disable();
|
||||
local_irq_disable();
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
/* CORTEX-A55 need power down here for shutdown*/
|
||||
/* If A55 enter WFI here, it is possible quit from wfi,
|
||||
* which cause CPU PACTIVE check fail.
|
||||
*/
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
if (((read_cpuid_id() >> 4) & 0xFFF) == 0xD05) {
|
||||
flush_cache_louis();
|
||||
if (smp_ops.cpu_die)
|
||||
smp_ops.cpu_die(cpu);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
while (1)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/ipi.h>
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
#include <asm/cputype.h>
|
||||
#endif
|
||||
DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number);
|
||||
EXPORT_PER_CPU_SYMBOL(cpu_number);
|
||||
|
||||
@@ -833,6 +836,18 @@ static void ipi_cpu_stop(unsigned int cpu)
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
/* CORTEX-A55 need power down here for shutdown*/
|
||||
/* If A55 enter WFI here, it is possible quit from wfi,
|
||||
* which cause CPU PACTIVE check fail.
|
||||
*/
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
if ((read_cpuid_id() & MIDR_CPU_MODEL_MASK) == MIDR_CORTEX_A55) {
|
||||
if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die)
|
||||
cpu_ops[cpu]->cpu_die(cpu);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
while (1)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user