0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <linux/kernel.h>
0015 #include <linux/errno.h>
0016 #include <linux/smp.h>
0017 #include <linux/io.h>
0018
0019 #include "omap-wakeupgen.h"
0020 #include "common.h"
0021 #include "powerdomain.h"
0022
0023
0024
0025
0026
0027 void omap4_cpu_die(unsigned int cpu)
0028 {
0029 unsigned int boot_cpu = 0;
0030 void __iomem *base = omap_get_wakeupgen_base();
0031
0032
0033
0034
0035 if (omap_secure_apis_support()) {
0036 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
0037 pr_err("Secure clear status failed\n");
0038 } else {
0039 writel_relaxed(0, base + OMAP_AUX_CORE_BOOT_0);
0040 }
0041
0042
0043 for (;;) {
0044
0045
0046
0047 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
0048
0049 if (omap_secure_apis_support())
0050 boot_cpu = omap_read_auxcoreboot0() >> 9;
0051 else
0052 boot_cpu =
0053 readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;
0054
0055 if (boot_cpu == smp_processor_id()) {
0056
0057
0058
0059 break;
0060 }
0061 pr_debug("CPU%u: spurious wakeup call\n", cpu);
0062 }
0063 }
0064
0065
0066 int omap4_cpu_kill(unsigned int cpu)
0067 {
0068 return 1;
0069 }