mtd: nand: hack ONFI for non-power-of-2 dimensions
[linux/fpc-iii.git] / arch / arm / mach-msm / hotplug.c
blob326a87261f9ac039248bd33f77f516f8c3fef87b
1 /*
2 * Copyright (C) 2002 ARM Ltd.
3 * All Rights Reserved
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.
8 */
9 #include <linux/kernel.h>
10 #include <linux/errno.h>
11 #include <linux/smp.h>
13 #include <asm/smp_plat.h>
15 #include "common.h"
17 static inline void cpu_enter_lowpower(void)
21 static inline void cpu_leave_lowpower(void)
25 static inline void platform_do_lowpower(unsigned int cpu)
27 /* Just enter wfi for now. TODO: Properly shut off the cpu. */
28 for (;;) {
30 * here's the WFI
32 asm("wfi"
35 : "memory", "cc");
37 if (pen_release == cpu_logical_map(cpu)) {
39 * OK, proper wakeup, we're done
41 break;
45 * getting here, means that we have come out of WFI without
46 * having been woken up - this shouldn't happen
48 * The trouble is, letting people know about this is not really
49 * possible, since we are currently running incoherently, and
50 * therefore cannot safely call printk() or anything else
52 pr_debug("CPU%u: spurious wakeup call\n", cpu);
57 * platform-specific code to shutdown a CPU
59 * Called with IRQs disabled
61 void __ref msm_cpu_die(unsigned int cpu)
64 * we're ready for shutdown now, so do it
66 cpu_enter_lowpower();
67 platform_do_lowpower(cpu);
70 * bring this CPU back into the world of cache
71 * coherency, and then restore interrupts
73 cpu_leave_lowpower();