2 * Copyright (C) 2002 ARM Ltd.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 #include <linux/kernel.h>
10 #include <linux/errno.h>
11 #include <linux/smp.h>
13 #include <asm/cacheflush.h>
14 #include <asm/smp_plat.h>
18 static inline void cpu_enter_lowpower(void)
20 /* Just flush the cache. Changing the coherency is not yet
21 * available on msm. */
25 static inline void cpu_leave_lowpower(void)
29 static inline void platform_do_lowpower(unsigned int cpu
)
31 /* Just enter wfi for now. TODO: Properly shut off the cpu. */
41 if (pen_release
== cpu_logical_map(cpu
)) {
43 * OK, proper wakeup, we're done
49 * getting here, means that we have come out of WFI without
50 * having been woken up - this shouldn't happen
52 * The trouble is, letting people know about this is not really
53 * possible, since we are currently running incoherently, and
54 * therefore cannot safely call printk() or anything else
56 pr_debug("CPU%u: spurious wakeup call\n", cpu
);
61 * platform-specific code to shutdown a CPU
63 * Called with IRQs disabled
65 void __ref
msm_cpu_die(unsigned int cpu
)
68 * we're ready for shutdown now, so do it
71 platform_do_lowpower(cpu
);
74 * bring this CPU back into the world of cache
75 * coherency, and then restore interrupts