2 * OMAP4 SMP cpu-hotplug support
4 * Copyright (C) 2010 Texas Instruments, Inc.
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
8 * Platform file needed for the OMAP4 SMP. This file is based on arm
9 * realview smp platform.
10 * Copyright (c) 2002 ARM Limited.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
17 #include <linux/kernel.h>
18 #include <linux/errno.h>
19 #include <linux/smp.h>
22 #include "omap-wakeupgen.h"
24 #include "powerdomain.h"
27 * platform-specific code to shutdown a CPU
28 * Called with IRQs disabled
30 void __ref
omap4_cpu_die(unsigned int cpu
)
32 unsigned int boot_cpu
= 0;
33 void __iomem
*base
= omap_get_wakeupgen_base();
36 * we're ready for shutdown now, so do it
38 if (omap_secure_apis_support()) {
39 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
40 pr_err("Secure clear status failed\n");
42 __raw_writel(0, base
+ OMAP_AUX_CORE_BOOT_0
);
48 * Enter into low power state
50 omap4_hotplug_cpu(cpu
, PWRDM_POWER_OFF
);
52 if (omap_secure_apis_support())
53 boot_cpu
= omap_read_auxcoreboot0();
56 __raw_readl(base
+ OMAP_AUX_CORE_BOOT_0
) >> 5;
58 if (boot_cpu
== smp_processor_id()) {
60 * OK, proper wakeup, we're done
64 pr_debug("CPU%u: spurious wakeup call\n", cpu
);